/* ==========================================================================
   設計系統與變數 (Design System & Variables)
   ========================================================================== */
:root {
  /* 配色系統 - 博物館藝術微光主題 (HSL) */
  --bg-dark: hsl(220, 20%, 5%);
  --bg-card: hsla(220, 18%, 10%, 0.75);
  --bg-input: hsla(220, 20%, 6%, 0.85);
  
  --primary-gold: hsl(38, 85%, 55%);
  --primary-gold-hover: hsl(38, 95%, 60%);
  --primary-gold-trans: hsla(38, 85%, 55%, 0.15);
  --primary-gold-dark: hsl(38, 70%, 35%);
  
  --accent-red: hsl(5, 75%, 52%);
  --accent-red-trans: hsla(5, 75%, 52%, 0.15);
  --accent-green: hsl(145, 60%, 45%);
  --accent-green-trans: hsla(145, 60%, 45%, 0.15);
  
  --text-primary: hsl(40, 15%, 94%);
  --text-secondary: hsl(220, 10%, 75%);
  --text-muted: hsl(220, 8%, 55%);
  
  --border-gold: hsla(38, 60%, 55%, 0.3);
  --border-light: hsla(220, 10%, 90%, 0.06);
  --border-focus: hsla(38, 85%, 55%, 0.6);
  
  /* 陰影與濾鏡 */
  --shadow-lg: 0 20px 50px hsla(0, 0%, 0%, 0.6);
  --shadow-sm: 0 4px 15px hsla(0, 0%, 0%, 0.4);
  --glass-blur: blur(20px);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  
  /* 字型設定 */
  --font-serif: "Playfair Display", "Noto Serif TC", Georgia, serif;
  --font-sans: "Inter", "Noto Sans TC", system-ui, -apple-system, sans-serif;
  
  /* 轉場動畫 */
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   全域樣式與重設 (Global Reset)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 背景發光裝飾 */
.bg-glow {
  position: fixed;
  top: 30%;
  left: 20%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, hsla(38, 70%, 50%, 0.035) 0%, hsla(220, 30%, 20%, 0) 70%);
  z-index: -2;
  pointer-events: none;
}

.glow-2 {
  top: 60%;
  left: 70%;
  background: radial-gradient(circle, hsla(220, 50%, 50%, 0.02) 0%, hsla(220, 30%, 20%, 0) 70%);
}

/* 粒子背景 */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  background-color: var(--primary-gold);
  border-radius: 50%;
  opacity: 0.15;
  animation: floatUp 15s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) translateX(0) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-10vh) translateX(50px) scale(1);
    opacity: 0;
  }
}

/* 捲軸美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: hsla(220, 10%, 25%, 0.6);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}

/* ==========================================================================
   通用元件與排版 (Common Components)
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* 面板基底與切換動畫 */
.view-panel {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: 100%;
}

.view-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

@starting-style {
  .view-panel.active {
    opacity: 0;
    transform: translateY(15px);
  }
}

/* 玻璃卡片 */
.card {
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

/* 按鈕設計 */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-gold);
  color: hsl(220, 20%, 5%);
  box-shadow: 0 4px 15px hsla(38, 85%, 55%, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(38, 85%, 55%, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background-color: hsl(220, 10%, 20%);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background-color: hsla(220, 10%, 15%, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: hsla(220, 10%, 22%, 0.8);
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

.btn-block {
  display: flex;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* 微光徽章 */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-gold);
  border: 1px solid var(--border-gold);
  background: var(--primary-gold-trans);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

/* ==========================================================================
   1. 登入/入口頁面樣式
   ========================================================================== */
#login-view {
  max-width: 580px;
  margin: 20px auto;
  text-align: center;
}

.login-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 30px;
}

/* 作品預覽框 */
.artwork-preview {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease, filter 0.8s ease;
}

.artwork-preview:hover .preview-img {
  transform: scale(1.05);
}

.preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, hsla(220, 25%, 4%, 0.95) 20%, transparent 100%);
  padding: 20px;
  text-align: left;
}

.preview-overlay h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--primary-gold);
}

.preview-overlay p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 表單欄位 */
.login-form-section {
  margin-bottom: 25px;
}

.form-group-row {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.form-group {
  flex: 1;
  text-align: left;
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 10px hsla(38, 85%, 55%, 0.15);
}

.form-options {
  display: flex;
  gap: 15px;
}

.form-options .btn {
  flex: 1;
}

.login-footer {
  margin-top: 20px;
}

.login-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.teacher-dashboard-link {
  background: transparent;
  border: none;
  color: var(--primary-gold);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
  display: inline-block;
}

.teacher-dashboard-link:hover {
  color: var(--primary-gold-hover);
  transform: translateY(-1px);
}

.teacher-btn-corner {
  position: absolute;
  top: 20px;
  right: 20px;
  background: hsla(38, 85%, 55%, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--primary-gold);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.teacher-btn-corner:hover {
  background: var(--primary-gold);
  color: hsl(220, 20%, 5%);
  box-shadow: 0 6px 15px hsla(38, 85%, 55%, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   2. 參觀地圖頁面 (Exhibition Map)
   ========================================================================== */
#map-view {
  max-width: 960px;
}

.view-header {
  text-align: center;
  margin-bottom: 25px;
}

.view-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.view-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* 進度條狀態面板 */
.map-progress-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: hsla(220, 10%, 15%, 0.5);
  border: 1px solid var(--border-light);
  padding: 15px 25px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.progress-info span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.progress-bar-bg.small {
  height: 10px;
  width: 50%;
}

/* 網格作品卡片 */
.artworks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 35px;
}

.artwork-card {
  background-color: hsla(220, 12%, 14%, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.artwork-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-gold);
  box-shadow: 0 12px 30px hsla(0, 0%, 0%, 0.4);
}

.card-img-wrapper {
  position: relative;
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.artwork-card:hover .card-thumb {
  transform: scale(1.06);
}

/* 藝術品特效濾鏡模擬不同畫作 */
.filter-lobster {
  filter: sepia(0.25) saturate(1.4) hue-rotate(330deg);
}

.filter-forest {
  filter: hue-rotate(90deg) saturate(0.85) contrast(1.1) brightness(0.9);
}

.card-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.badge-not-started {
  background-color: hsl(220, 10%, 20%);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-in-progress {
  background-color: hsla(38, 85%, 55%, 0.15);
  color: var(--primary-gold);
  border: 1px solid var(--border-gold);
}

.badge-completed {
  background-color: hsla(145, 60%, 45%, 0.15);
  color: var(--accent-green);
  border: 1px solid hsla(145, 60%, 45%, 0.3);
}

.card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-info h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--primary-gold);
  margin-bottom: 12px;
}

.card-brief {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 10px;
}

.card-actions .btn {
  flex: 1;
}

.map-bottom-section {
  text-align: center;
}

/* ==========================================================================
   3. 主工作區頁面 (Workspace)
   ========================================================================== */
#workspace-view.active {
  display: flex;
  flex-direction: column;
  height: 90vh;
  max-height: 850px;
}

/* 頂部導覽列 */
.workspace-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 25px;
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-gold);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  flex-shrink: 0;
}

.nav-back-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-light);
}

.nav-back-btn:hover {
  color: var(--primary-gold);
  background-color: hsla(220, 10%, 20%, 0.5);
  border-color: var(--border-gold);
  transform: translateX(-2px);
}

.back-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.workspace-header h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--primary-gold);
}

.workspace-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background-color: hsl(220, 20%, 5%);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border-light);
  border-top: none;
}

/* ==========================================================================
   3-A. 左側作品展示區
   ========================================================================== */
.artwork-viewport {
  flex: 1.25;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px;
  position: relative;
  border-right: 1px solid var(--border-light);
  background: radial-gradient(circle at center, hsl(220, 15%, 12%) 0%, hsl(220, 25%, 3%) 100%);
  overflow: hidden;
}

.image-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 85%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.85);
  border: 3px solid hsl(220, 10%, 15%);
  display: inline-block;
}

.main-artwork-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  transition: filter 0.8s ease;
}

.viewer-instruction {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   3-B. 右側控制與 AI 面板 (Control Panel)
   ========================================================================== */
.control-panel {
  flex: 0.85;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 25px;
  overflow-y: auto;
  position: relative;
}

/* ==========================================================================
   4. 整體欣賞頁面樣式 (Overall View)
   ========================================================================== */
#overall-view {
  max-width: 1000px;
}

.overall-header {
  text-align: center;
  margin-bottom: 30px;
}

.overall-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.overall-header .subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.overall-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.artwork-static-frame {
  flex: 1;
  border: 4px double var(--border-gold);
  padding: 8px;
  background-color: hsl(220, 20%, 5%);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
}

.overall-artwork-img {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 480px;
  transition: filter 0.5s ease;
}

.reflection-form-container {
  flex: 1.2;
}

.question-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: block;
  border-left: 3px solid var(--primary-gold);
  padding-left: 10px;
}

/* 單選卡片佈局 */
.radio-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.radio-card input[type="radio"] {
  width: auto;
  margin-right: 12px;
  accent-color: var(--primary-gold);
}

.radio-card span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.radio-card:hover {
  border-color: var(--border-gold);
  background-color: hsla(220, 10%, 15%, 0.8);
}

.radio-card input[type="radio"]:checked + span {
  color: var(--primary-gold);
  font-weight: 500;
}

.radio-card:has(input[type="radio"]:checked) {
  border-color: var(--primary-gold);
  background-color: var(--primary-gold-trans);
}

/* ==========================================================================
   5. 單件作品觀看證書頁面 (Certificate)
   ========================================================================== */
#certificate-view {
  max-width: 700px;
  text-align: center;
}

/* ==========================================================================
   6. 總結與創作引導頁面 (AI Creative Guide)
   ========================================================================== */
#creative-view {
  max-width: 800px;
}

/* 分析載入動畫 */
.creative-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}

.loader-gold {
  width: 60px;
  height: 60px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.creative-loading-box h2 {
  font-family: var(--font-serif);
  color: var(--primary-gold);
  font-size: 1.6rem;
  margin-bottom: 30px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
  max-width: 320px;
  margin: 0 auto;
}

.step-load {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.step-load.active {
  opacity: 1;
}

.step-load.done {
  opacity: 0.6;
}

.step-load.done .bullet {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
}

.step-load.done .bullet::after {
  content: "✓";
  color: hsl(220, 20%, 5%);
  font-size: 8px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-load .bullet {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-muted);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

.step-load.active .bullet {
  border-color: var(--primary-gold);
  background-color: var(--primary-gold-trans);
  box-shadow: 0 0 8px var(--primary-gold);
}

.step-load .text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.step-load.active .text {
  color: var(--text-primary);
  font-weight: 500;
}

/* 創作嚮導 */
.creative-wizard {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wizard-header {
  text-align: center;
  margin-bottom: 30px;
}

.wizard-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.wizard-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* AI 分析報告卡 */
.ai-report-card {
  background-color: var(--primary-gold-trans);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.report-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.report-header .sparkle {
  color: var(--primary-gold);
  font-size: 1.3rem;
  animation: pulseText 1.5s infinite;
}

.report-header h3 {
  font-size: 1.05rem;
  color: var(--primary-gold);
  font-weight: 600;
}

#ai-report-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* 步驟精美卡片 */
.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.wizard-step-card {
  background-color: hsla(220, 10%, 15%, 0.4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 25px;
}

.wizard-step-card h4 {
  font-size: 1.05rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
  font-weight: 600;
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* 複選框網格 */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.check-card {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.check-card input[type="checkbox"] {
  width: auto;
  margin-right: 12px;
  accent-color: var(--primary-gold);
}

.check-card span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.check-card:hover {
  border-color: var(--border-gold);
  background-color: hsla(220, 10%, 15%, 0.8);
}

.check-card input[type="checkbox"]:checked + span {
  color: var(--primary-gold);
  font-weight: 500;
}

.check-card:has(input[type="checkbox"]:checked) {
  border-color: var(--primary-gold);
  background-color: var(--primary-gold-trans);
}

/* 橫向單選 */
.grid-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 日常物件輸入 */
.items-inputs-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.item-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-num {
  width: 26px;
  height: 26px;
  background-color: var(--primary-gold-trans);
  color: var(--primary-gold);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  flex-shrink: 0;
}

.item-input-row input[type="text"]:first-of-type {
  flex: 1;
}

.item-input-row input[type="text"]:last-of-type {
  flex: 2;
}

/* ==========================================================================
   7. 最終創作構想卡展示頁面 (Creative Card View)
   ========================================================================== */
#creative-card-view {
  max-width: 700px;
  text-align: center;
}

.creative-card-header {
  margin-bottom: 25px;
}

.creative-card-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.creative-card-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 創作藍圖卡片樣式 */
.creative-blueprint-card .cert-border-inner {
  padding: 30px 35px;
}

.blueprint-user-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(220, 20%, 35%);
  border-bottom: 1px dashed hsl(38, 40%, 75%);
  padding-bottom: 8px;
}

.blueprint-theme-badge {
  color: hsl(38, 70%, 35%);
}

.blueprint-section {
  width: 100%;
  text-align: left;
  margin-bottom: 18px;
}

.blueprint-section h4 {
  font-size: 0.82rem;
  color: hsl(38, 70%, 30%);
  margin-bottom: 6px;
  letter-spacing: 1px;
  border-bottom: 1.5px solid hsl(38, 50%, 75%);
  padding-bottom: 2px;
}

.bp-title-value {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: hsl(220, 30%, 15%);
  margin-top: 4px;
}

.blueprint-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  width: 100%;
  text-align: left;
  margin-bottom: 18px;
}

.blueprint-sub-sec h5 {
  font-size: 0.72rem;
  color: hsl(220, 10%, 45%);
  margin-bottom: 4px;
}

.blueprint-sub-sec p {
  font-size: 0.88rem;
  color: hsl(220, 20%, 15%);
  font-weight: 600;
}

.blueprint-items-list {
  list-style: none;
  font-size: 0.85rem;
  color: hsl(220, 15%, 25%);
  line-height: 1.6;
}

.blueprint-items-list li {
  margin-bottom: 4px;
}

.blueprint-items-list strong {
  color: hsl(38, 70%, 35%);
}

.ai-critique-box {
  background-color: white;
  border-left: 3px solid hsl(38, 70%, 45%);
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: hsl(220, 20%, 25%);
}

/* ==========================================================================
   8. 教師管理後台頁面 (Teacher View)
   ========================================================================== */
#teacher-view {
  max-width: 1100px;
}

.teacher-header {
  text-align: center;
  margin-bottom: 30px;
}

.teacher-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.teacher-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 儀表板數據 */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-stat-card {
  background-color: hsla(220, 10%, 15%, 0.5);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.dashboard-sections-split {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.dashboard-left-panel {
  flex: 1.3;
  background-color: hsla(220, 10%, 15%, 0.3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.dashboard-left-panel h3,
.dashboard-right-panel h3 {
  font-size: 1rem;
  color: var(--primary-gold);
  margin-bottom: 15px;
  border-left: 3px solid var(--primary-gold);
  padding-left: 8px;
}

/* 學生名冊表格 */
.table-wrapper {
  overflow-x: auto;
  max-height: 380px;
  overflow-y: auto;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.student-table th, 
.student-table td {
  padding: 12px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.student-table th {
  background-color: hsla(220, 10%, 20%, 0.6);
  color: var(--text-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 30px;
}

.status-badge.completed {
  background-color: var(--accent-green-trans);
  color: var(--accent-green);
  border: 1px solid hsla(145, 60%, 45%, 0.2);
}

.status-badge.in-progress {
  background-color: var(--primary-gold-trans);
  color: var(--primary-gold);
  border: 1px solid var(--border-gold);
}

.status-badge.not-started {
  background-color: hsla(220, 10%, 20%, 0.6);
  color: var(--text-muted);
}

.dashboard-right-panel {
  flex: 0.9;
  background-color: hsla(220, 10%, 15%, 0.3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 熱點分析長條圖 */
.question-hotspot-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hotspot-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hotspot-lbl-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hotspot-bar-bg {
  width: 100%;
  height: 6px;
  background-color: hsla(220, 10%, 20%, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.hotspot-bar-fill {
  height: 100%;
  background-color: var(--accent-red);
  border-radius: 4px;
}

.teacher-action-card {
  background-color: var(--primary-gold-trans);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.teacher-action-card h4 {
  font-size: 0.88rem;
  color: var(--primary-gold);
  margin-bottom: 6px;
}

.teacher-action-card p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.teacher-actions-bar {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

/* ==========================================================================
   2-C. 對話與標記點互動細部樣式
   ========================================================================== */
.active-marker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.marker-category-badge {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background-color: hsla(220, 10%, 30%, 0.5);
  border: 1px solid var(--border-light);
  padding: 3px 10px;
  border-radius: 50px;
}

.guide-box {
  background-color: hsla(220, 10%, 20%, 0.4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 15px;
}

.guide-step {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.guide-step:last-child {
  margin-bottom: 0;
}

.step-num {
  width: 18px;
  height: 18px;
  background-color: hsla(220, 10%, 30%, 0.6);
  color: var(--text-primary);
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-num.highlight {
  background-color: var(--primary-gold-trans);
  color: var(--primary-gold);
  border: 1px solid var(--border-gold);
}

.guide-step p {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.task-step p {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   AI 對話區樣式
   ========================================================================== */
.ai-chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: hsla(220, 15%, 8%, 0.65);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 250px;
}

.chat-header {
  background-color: hsla(220, 10%, 18%, 0.6);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, var(--primary-gold) 0%, hsl(38, 70%, 40%) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px hsla(38, 85%, 55%, 0.35);
}

.avatar-spark {
  color: hsl(220, 20%, 5%);
  font-size: 1rem;
  font-weight: bold;
}

.tutor-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.tutor-status {
  font-size: 0.7rem;
  color: var(--accent-green);
  display: block;
}

/* 訊息容器 */
.chat-messages-container {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 180px;
}

.message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.ai {
  background-color: hsla(220, 10%, 18%, 0.75);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-light);
}

.message.user {
  background-color: var(--primary-gold-trans);
  color: var(--text-primary);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  border: 1px solid var(--border-gold);
}

/* 打字機遊標效果 */
.typing-cursor::after {
  content: "▊";
  color: var(--primary-gold);
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* 快捷鍵區 */
.quick-questions-wrapper {
  padding: 10px 15px;
  border-top: 1px solid var(--border-light);
  background-color: hsla(220, 10%, 12%, 0.6);
}

.quick-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.quick-questions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-btn {
  background-color: hsla(220, 10%, 20%, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  color: var(--text-secondary);
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quick-btn:hover {
  background-color: var(--primary-gold-trans);
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

/* 自訂輸入框區 */
.chat-input-area {
  display: flex;
  border-top: 1px solid var(--border-light);
  background-color: hsla(220, 10%, 15%, 0.85);
}

.chat-input-area input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  padding: 14px 16px;
  font-size: 0.88rem;
  font-family: var(--font-sans);
}

.chat-input-area input:focus {
  outline: none;
}

.send-message-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chat-input-area input:valid + .send-message-btn,
.send-message-btn:hover {
  color: var(--primary-gold);
}

/* 底部功能解鎖區 */
.panel-bottom-action {
  margin-top: 15px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  flex-shrink: 0;
}

.btn-pulse {
  position: relative;
}

.btn-pulse:not(:disabled) {
  animation: pulseButton 2.0s infinite;
}

@keyframes pulseButton {
  0% { box-shadow: 0 0 0 0 hsla(38, 85%, 55%, 0.4); }
  70% { box-shadow: 0 0 0 10px hsla(38, 85%, 55%, 0); }
  100% { box-shadow: 0 0 0 0 hsla(38, 85%, 55%, 0); }
}

/* ==========================================================================
   標記點樣式 (Hotspots)
   ========================================================================== */
.hotspot {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.hotspot-dot {
  width: 14px;
  height: 14px;
  background-color: var(--primary-gold);
  border: 2px solid hsl(220, 20%, 5%);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-gold);
  transition: var(--transition-bounce);
  z-index: 2;
}

.hotspot-ring {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid var(--primary-gold);
  border-radius: 50%;
  opacity: 0;
  animation: pulseGlow 2s infinite ease-out;
  z-index: 1;
}

.hotspot:hover .hotspot-dot {
  background-color: var(--text-primary);
  transform: scale(1.3);
  box-shadow: 0 0 15px var(--text-primary);
}

.hotspot.completed .hotspot-dot {
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.hotspot.completed .hotspot-ring {
  border-color: var(--accent-green);
}

.hotspot.active .hotspot-dot {
  background-color: var(--text-primary);
  border-color: var(--primary-gold);
  transform: scale(1.4);
  box-shadow: 0 0 20px var(--primary-gold), 0 0 0 4px hsla(38, 85%, 55%, 0.3);
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* ==========================================================================
   5. 單件作品觀看證書預覽框與古典卡片 (Certificate Style)
   ========================================================================== */
.cert-card {
  width: 100%;
  max-width: 580px;
  margin: 0 auto 30px auto;
  background-color: hsl(40, 20%, 94%);
  color: hsl(220, 25%, 12%);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  position: relative;
  overflow: hidden;
}

.cert-border-outer {
  border: 2px solid hsl(38, 60%, 40%);
  padding: 6px;
  height: 100%;
}

.cert-border-inner {
  border: 1px solid hsl(38, 40%, 65%);
  padding: 25px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-gold-corners::before,
.cert-gold-corners::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: hsl(38, 70%, 45%);
  border-style: solid;
  pointer-events: none;
}

.cert-border-inner::before, .cert-border-inner::after,
.cert-gold-corners::before, .cert-gold-corners::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  border-color: hsl(38, 70%, 45%);
  border-style: solid;
  pointer-events: none;
}

.cert-border-inner::before { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.cert-border-inner::after { top: 10px; right: 10px; border-width: 2px 2px 0 0; }
.cert-gold-corners::before { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; }
.cert-gold-corners::after { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

.cert-logo {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: hsl(38, 60%, 35%);
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.cert-card h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: hsl(220, 25%, 15%);
  letter-spacing: 4px;
  margin-bottom: 15px;
  border-bottom: 2px solid hsl(38, 60%, 45%);
  padding-bottom: 6px;
  width: 80%;
  text-align: center;
}

.cert-recipient {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: hsl(220, 30%, 15%);
  margin-bottom: 15px;
}

.cert-recipient span {
  border-bottom: 1px solid hsl(220, 20%, 30%);
  padding: 0 6px;
  margin: 0 2px;
}

.cert-congrats {
  font-size: 0.9rem;
  line-height: 1.6;
  color: hsl(220, 15%, 25%);
  margin-bottom: 18px;
  text-align: center;
  max-width: 85%;
}

.cert-congrats strong {
  color: hsl(38, 70%, 35%);
  font-family: var(--font-serif);
}

.cert-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  background-color: hsla(38, 50%, 55%, 0.08);
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  border: 1px dashed hsla(38, 60%, 45%, 0.3);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: hsl(220, 25%, 12%);
}

.stat-lbl {
  font-size: 0.7rem;
  color: hsl(220, 10%, 45%);
}

.cert-summary-box {
  background-color: white;
  border-left: 3px solid hsl(38, 70%, 45%);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-align: left;
  margin-bottom: 20px;
  width: 90%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.cert-summary-box h4 {
  font-size: 0.78rem;
  color: hsl(38, 70%, 35%);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.cert-summary-box p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: hsl(220, 20%, 25%);
  font-style: italic;
}

.cert-signature-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

.sig-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sig-title {
  font-size: 0.65rem;
  color: hsl(220, 10%, 50%);
  margin-bottom: 4px;
}

.sig-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: hsl(220, 20%, 20%);
}

.sig-name.italic {
  font-family: var(--font-serif);
  font-style: italic;
}

.sig-seal {
  width: 46px;
  height: 46px;
  border: 2px solid hsl(5, 75%, 45%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-10deg);
  position: relative;
}

.seal-inner {
  width: 38px;
  height: 38px;
  border: 1px dashed hsl(5, 75%, 45%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 0.52rem;
  color: hsl(5, 75%, 45%);
  line-height: 1.1;
}

.certificate-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* ==========================================================================
   響應式設計 (Responsive Media Queries)
   ========================================================================== */
@media (max-width: 900px) {
  .app-container {
    padding: 10px;
  }
  
  .artworks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #workspace-view.active {
    height: auto;
    max-height: none;
  }
  
  .workspace-layout {
    flex-direction: column;
    overflow: visible;
  }
  
  .artwork-viewport {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 15px;
    flex: none;
  }
  
  .main-artwork-img {
    max-height: 360px;
  }
  
  .control-panel {
    flex: none;
    height: auto;
    padding: 20px;
    overflow-y: visible;
  }
  
  .chat-messages-container {
    max-height: 180px;
  }
  
  .overall-layout {
    flex-direction: column;
    align-items: center;
  }
  
  .artwork-static-frame {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
  }
  
  .reflection-form-container {
    width: 100%;
  }
  
  .progress-container {
    width: 50%;
  }
  
  .dashboard-sections-split {
    flex-direction: column;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .artworks-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-options {
    flex-direction: column;
  }
  
  .workspace-header {
    padding: 10px 15px;
    gap: 10px;
  }
  
  .progress-container {
    width: 45%;
    gap: 8px;
  }
  
  .progress-label {
    font-size: 0.75rem;
  }
  
  .cert-border-inner {
    padding: 20px 12px;
  }
  
  .cert-card h2 {
    font-size: 1.3rem;
  }
  
  .cert-stats {
    gap: 15px;
    padding: 6px 15px;
  }
  
  .certificate-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  
  .certificate-actions .btn {
    width: 100%;
  }
  
  .checkbox-grid, .grid-row {
    grid-template-columns: 1fr;
  }
  
  .item-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
  }
  
  .row-num {
    align-self: flex-start;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .teacher-actions-bar {
    flex-direction: column;
    gap: 10px;
  }
}

/* ==========================================================================
   輔助功能與減低動效 (Accessibility)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hotspot-ring {
    animation: none;
    opacity: 0.4;
  }
  
  .btn-pulse {
    animation: none;
  }
  
  .preview-img {
    transition: none;
  }
  
  .preview-img:hover {
    transform: none;
  }
  
  .view-panel {
    transition: none;
    transform: none;
  }
  
  .particle {
    animation: none;
    display: none;
  }
}

/* ==========================================================================
   QR Code 鎖定、相機與提示樣式
   ========================================================================== */
.image-wrapper.blurred .main-artwork-img {
  filter: blur(18px) brightness(0.35) contrast(0.95);
}

.qr-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  transition: var(--transition-smooth);
  border-radius: var(--radius-sm);
}

.lock-card {
  background: hsla(220, 18%, 10%, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 24px;
  width: 85%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lock-icon-glow {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--primary-gold-trans);
  border: 2px solid var(--primary-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-gold);
  box-shadow: 0 0 20px hsla(38, 85%, 55%, 0.4);
  animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px hsla(38, 85%, 55%, 0.3); }
  50% { transform: scale(1.06); box-shadow: 0 0 25px hsla(38, 85%, 55%, 0.6); }
}

.lock-card h3 {
  font-family: var(--font-serif);
  color: var(--primary-gold);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.lock-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.4;
}

.lock-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lock-actions .btn {
  width: 100%;
}

/* 全螢幕相機掃描器 Overlay */
.scanner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.scanner-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 600px;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px;
}

#scanner-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.scanner-simulation-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #161c26 0%, #06080d 100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 15px;
}

.sim-camera-icon {
  font-size: 3.2rem;
  animation: pulseText 1.5s infinite;
  color: var(--primary-gold);
}

.scanner-viewfinder {
  position: relative;
  width: 250px;
  height: 250px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.65);
  z-index: 10;
  margin: auto;
  border-radius: 8px;
}

.corner-br {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 4px solid var(--primary-gold);
}

.border-top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.border-top-right { top: -2px; right: -2px; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.border-bottom-left { bottom: -2px; left: -2px; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.border-bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; border-bottom-right-radius: 6px; }

.scanner-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--accent-green), transparent);
  box-shadow: 0 0 10px var(--accent-green);
  z-index: 12;
  animation: scan-line 2.5s linear infinite;
}

@keyframes scan-line {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.scanner-info {
  z-index: 10;
  text-align: center;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  color: var(--text-primary);
  margin-bottom: 20px;
  max-width: 90%;
  box-shadow: var(--shadow-sm);
}

.scanner-info p {
  font-size: 0.88rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.scanner-status {
  font-size: 0.75rem;
  color: var(--primary-gold);
  font-weight: bold;
}

.scanner-close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: var(--transition-smooth);
}

.scanner-close-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  transform: scale(1.05);
}

/* 提示彈窗 (Hint Modal) */
.hint-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.hint-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 90%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hint-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.hint-modal-header h3 {
  font-family: var(--font-serif);
  color: var(--primary-gold);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.hint-close-btn:hover {
  color: var(--accent-red);
}

.hint-modal-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-line;
}

.hint-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.hint-modal-footer .btn {
  padding: 8px 20px;
}


/* 匿名體驗按鈕點擊保護 */
#anonymous-btn {
  position: relative;
  z-index: 100;
  pointer-events: auto;
  touch-action: manipulation;
}
.login-form-section, .form-options, #login-form {
  position: relative;
  z-index: 50;
}

/* ==========================================================================
   學生版 AI 分析數據呈現（Demo：跳過原步驟一、二）
   ========================================================================== */
.enhanced-report-card {
  margin-bottom: 22px;
}

.student-insight-dashboard {
  margin: 22px 0 28px;
  display: grid;
  gap: 18px;
}

.insight-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid hsla(38, 85%, 55%, 0.32);
  background:
    radial-gradient(circle at 15% 20%, hsla(38, 85%, 55%, 0.18), transparent 36%),
    linear-gradient(135deg, hsla(220, 16%, 16%, 0.92), hsla(220, 24%, 7%, 0.94));
  box-shadow: 0 18px 45px hsla(0, 0%, 0%, 0.35);
  overflow: hidden;
  position: relative;
}

.insight-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, hsla(255, 100%, 100%, 0.05) 48%, transparent 70%);
  pointer-events: none;
}

.insight-kicker {
  display: inline-flex;
  color: var(--primary-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.insight-hero-left h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.insight-hero-left p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
  max-width: 650px;
}

.insight-score-ring {
  width: 132px;
  height: 132px;
  border-radius: 999px;
  flex: 0 0 132px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid hsla(38, 85%, 55%, 0.48);
  background:
    radial-gradient(circle, hsla(38, 85%, 55%, 0.22), hsla(220, 18%, 8%, 0.9) 66%),
    conic-gradient(from 180deg, var(--primary-gold), hsla(38, 85%, 55%, 0.2), var(--primary-gold));
  box-shadow: 0 0 32px hsla(38, 85%, 55%, 0.18);
  position: relative;
  z-index: 1;
}

.insight-score-ring span {
  font-family: var(--font-serif);
  font-size: 2.7rem;
  font-weight: 700;
  color: var(--primary-gold);
  line-height: 1;
}

.insight-score-ring small {
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 1px;
}

.insight-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.insight-stat-card {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--border-light);
  background: hsla(220, 12%, 14%, 0.72);
  box-shadow: 0 10px 24px hsla(0, 0%, 0%, 0.22);
}

.stat-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: hsla(38, 85%, 55%, 0.12);
  margin-bottom: 12px;
}

.insight-stat-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary-gold);
  line-height: 1;
  margin-bottom: 6px;
}

.insight-stat-card small {
  display: block;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 12px;
}

.stat-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: hsla(220, 10%, 28%, 0.62);
  overflow: hidden;
}

.stat-bar span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-gold-dark), var(--primary-gold-hover));
  transition: width 0.75s ease;
}

.insight-tags-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border: 1px solid hsla(38, 85%, 55%, 0.2);
  border-radius: 18px;
  background: hsla(38, 85%, 55%, 0.08);
}

.tag-title {
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 0.9rem;
}

.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.insight-tags span,
.planning-step-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  background: hsla(220, 18%, 8%, 0.82);
  border: 1px solid hsla(38, 85%, 55%, 0.28);
  color: var(--primary-gold);
  font-weight: 700;
  font-size: 0.84rem;
}

.auto-skip-step {
  display: none !important;
}

.creative-planning-card {
  border-color: hsla(38, 85%, 55%, 0.36);
  background:
    linear-gradient(180deg, hsla(38, 85%, 55%, 0.09), hsla(220, 12%, 14%, 0.66));
}

.creative-planning-card h4 {
  margin-top: 10px;
  font-size: 1.45rem;
}

@media (max-width: 780px) {
  .insight-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .insight-score-ring {
    align-self: center;
  }
  .insight-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .insight-stats-grid {
    grid-template-columns: 1fr;
  }
}
