/* ==========================================
   FormSwift Modern Glassmorphism Styling System
   ========================================== */

/* 1. 變數與核心設計系統 */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* 色彩系統 - 精選深海靛藍色系 */
  --primary-hsl: 245, 82%, 67%;
  --primary: hsl(var(--primary-hsl));
  --primary-light: hsl(245, 82%, 75%);
  --primary-dark: hsl(245, 82%, 58%);
  
  --secondary: hsl(215, 25%, 27%);
  --secondary-hover: hsl(215, 25%, 35%);
  
  --bg-gradient: radial-gradient(circle at 10% 20%, hsl(220, 40%, 8%) 0%, hsl(224, 45%, 4%) 90%);
  --accent-glow: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  
  --card-bg: rgba(15, 23, 42, 0.65);
  --card-border: rgba(99, 102, 241, 0.12);
  --card-border-focus: rgba(99, 102, 241, 0.4);
  
  --text: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  --text-inverse: hsl(224, 71%, 4%);
  
  /* 語意色彩 */
  --success: hsl(142, 70%, 50%);
  --success-bg: rgba(16, 185, 129, 0.1);
  --danger: hsl(350, 89%, 60%);
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: hsl(199, 89%, 48%);
  --info-bg: rgba(14, 165, 233, 0.1);
  
  /* 其他樣式標誌 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* 2. 全域重設與基本樣式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-gradient), var(--accent-glow);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* 3. 滾動條美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

/* 4. 排版與標題 */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 5. 高質感導覽列 (App Header) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 6. 按鈕系統 (Buttons) */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

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

.btn-secondary {
  background: var(--secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

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

.btn-info {
  background: var(--info-bg);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: hsl(199, 89%, 60%);
}

.btn-info:hover {
  background: rgba(14, 165, 233, 0.2);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: hsl(350, 89%, 68%);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--danger);
}

.btn-icon svg {
  flex-shrink: 0;
}

.btn-large {
  padding: 0.9rem 1.8rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-dashed {
  border: 2px dashed rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.03);
  color: var(--primary-light);
  width: 100%;
}

.btn-dashed:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
  color: #white;
}

/* 7. 徽章系統 (Badges) */
.badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-user {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary-light);
}

.badge-admin {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: hsl(142, 70%, 65%);
}

.count-badge {
  font-size: 0.85rem;
  background: var(--secondary);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-weight: 600;
}

/* 8. 結構框架與排版 */
.app-main {
  padding: 2rem 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-narrow {
  max-width: 760px;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
  display: block;
}

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

/* 9. 問卷填寫頁面樣式 (User View) */
.survey-hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.survey-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.survey-hero-card h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #fff;
  line-height: 1.3;
}

.survey-hero-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  white-space: pre-line;
}

/* 進度條 */
.progress-wrapper {
  margin-top: 2rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.progress-bar-bg {
  background: rgba(255, 255, 255, 0.05);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  height: 100%;
  width: 0;
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 題目卡片 */
.question-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.question-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(99, 102, 241, 0.05);
}

.question-card.answered {
  border-left: 4px solid var(--primary-light);
}

.question-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.question-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}

.required-dot {
  color: var(--danger);
  margin-left: 0.25rem;
  font-weight: bold;
}

.question-type-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 表單控制項 (自訂 Radio 和 Checkbox) */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-item {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.option-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(3px);
}

/* 隱藏原生控制項 */
.option-item input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* 自訂標籤/勾選盒外觀 */
.custom-control {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.custom-radio {
  border-radius: 50%;
}

.custom-checkbox {
  border-radius: 4px;
}

/* 內核標誌 */
.custom-control::after {
  content: '';
  display: none;
}

.custom-radio::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.custom-checkbox::after {
  /* 勾勾圖案 */
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* 選中狀態樣式 */
.option-item input:checked ~ .custom-control {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.option-item input:checked ~ .custom-control::after {
  display: block;
}

.option-item input:checked ~ .option-label {
  color: #white;
  font-weight: 500;
}

.option-item input:checked ~ .option-item-bg {
  opacity: 1;
}

.option-item-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-light);
  background: rgba(99, 102, 241, 0.05);
  pointer-events: none;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}

.option-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
  width: 100%;
}

/* 提交區域與錯誤提示 */
.submit-action-bar {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  margin-bottom: 4rem;
}

.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-top: 1.5rem;
  font-size: 0.95rem;
  animation: shake 0.5s ease;
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: hsl(350, 89%, 68%);
}

.hidden {
  display: none !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* 10. 後台編輯器網格與卡片 (Admin View) */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--card-border);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.toolbar-title h2 {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.toolbar-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.toolbar-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 992px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    order: -1; /* 小螢幕將側邊欄調到最前 */
  }
}

.editor-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.editor-card .card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.01);
}

.editor-card .card-header h3 {
  font-size: 1.1rem;
  color: #fff;
}

.editor-card .card-body {
  padding: 1.5rem;
}

/* 表單控制項 (後台輸入框) */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: white;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-help {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.tooltip-trigger {
  color: var(--text-muted);
  cursor: help;
  display: flex;
  align-items: center;
}

.tooltip-trigger:hover {
  color: var(--primary-light);
}

/* 題目編輯區區段 */
.editor-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-section-header h3 {
  font-size: 1.3rem;
  color: #fff;
}

/* 可編輯題目卡片 */
.question-edit-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
}

.question-edit-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

.q-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.q-number {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary-light);
  font-size: 1.05rem;
}

.q-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-mini {
  padding: 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-mini:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.btn-mini:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-mini-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: hsl(350, 89%, 68%) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.q-edit-body {
  padding: 1.5rem;
}

.edit-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

@media (max-width: 576px) {
  .edit-row {
    grid-template-columns: 1fr;
  }
}

/* 選項編輯管理 */
.options-editor-section {
  margin-top: 1.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 1.25rem;
}

.options-editor-section h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.option-edit-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.option-edit-row input {
  flex-grow: 1;
}

/* 側邊欄與說明小幫手 */
.sticky-sidebar {
  position: sticky;
  top: 90px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.status-label {
  color: var(--text-muted);
}

.status-value {
  font-weight: 600;
  color: white;
}

.text-success {
  color: var(--success) !important;
}

.sidebar-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 11. 模態視窗與遮罩 (Modal & Overlay) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInModal 0.25s ease forwards;
}

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

.modal-card {
  background: hsl(222, 47%, 10%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-large {
  max-width: 720px;
}

@keyframes slideUpModal {
  from { transform: translateY(30px) scale(0.95); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.modal-header h3 {
  font-size: 1.25rem;
  color: white;
}

.modal-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-info {
  background: var(--info-bg) !important;
  color: hsl(199, 89%, 60%) !important;
}

.close-btn {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-btn:hover {
  color: white;
}

.modal-body {
  padding: 1.75rem;
}

.modal-body.scrollable {
  max-height: 55vh;
  overflow-y: auto;
}

.modal-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.justify-center {
  justify-content: center !important;
}

.password-group {
  position: relative;
}

.error-msg {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* 教學說明排版 */
.tutorial-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.step-num {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1rem;
  color: white;
  margin-bottom: 0.25rem;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.code-block {
  display: block;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.tip-banner {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 1rem;
  border-radius: var(--radius-sm);
  color: hsl(142, 70%, 75%) !important;
  font-size: 0.85rem !important;
  line-height: 1.5;
}

/* 12. 感謝與成功介面 (Success Modal Animation) */
.modal-success {
  max-width: 440px;
}

.text-center {
  text-align: center;
}

.success-checkmark {
  margin: 1.5rem auto 1.5rem;
  width: 80px;
  height: 80px;
}

.check-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.check-icon svg {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.6s 0.2s ease forwards;
}

@keyframes scaleUp {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.success-message {
  font-size: 0.95rem !important;
  line-height: 1.6;
}

/* 13. 簡答題輸入框樣式 */
.text-input-wrapper {
  margin-top: 0.5rem;
}

.custom-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: white;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: var(--transition-smooth);
  resize: vertical;
  min-height: 120px;
}

.custom-textarea:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
}

.custom-textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
