<script setup lang="ts">
import { useRouter } from 'vue-router'
import { Collection, Setting } from '@element-plus/icons-vue'

const router = useRouter()
</script>

<template>
  <div class="quiz-shell">
    <header class="quiz-header">
      <button class="quiz-brand" @click="router.push('/quiz')">
        <Collection class="w-5 h-5" />
        <span>QuickQuiz</span>
      </button>
      <ElButton :icon="Setting" circle @click="router.push('/admin')" />
    </header>
    <RouterView />
  </div>
</template>

<style scoped>
.quiz-shell {
  min-height: 100vh;
}

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--qq-line);
  background: rgba(247, 248, 244, 0.94);
  backdrop-filter: blur(12px);
}

.quiz-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--qq-ink);
  font-weight: 800;
  cursor: pointer;
}
</style>
