/* ==========================================================================
   DESIGN SYSTEM & CORE STYLES - PDD TRAINER (DARK THEME)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-main: #090d16;
  --bg-gradient: radial-gradient(circle at 50% 0%, #151c2e 0%, #090d16 100%);
  
  --surface-card: rgba(23, 31, 48, 0.65);
  --surface-card-hover: rgba(30, 41, 64, 0.85);
  --surface-card-active: rgba(37, 50, 77, 0.95);
  
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --accent-primary: #6366f1;
  --accent-primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-cyan-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --accent-emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-rose-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --accent-amber-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.4);

  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.15);
  --danger-border: rgba(244, 63, 94, 0.4);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
#app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.85rem 1.5rem;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.brand-title span {
  background: var(--accent-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search Bar Component */
.search-box-container {
  position: relative;
  flex: 1;
  max-width: 450px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-normal);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

/* Autocomplete Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #111827;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-dropdown.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.search-result-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.highlighted {
  background: rgba(99, 102, 241, 0.15);
}

.result-badge {
  background: var(--accent-primary-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  margin-top: 2px;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-question {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-match {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.result-match mark {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  border-radius: 2px;
  padding: 0 2px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
  user-select: none;
  box-sizing: border-box;
  background-clip: padding-box;
}

.btn:disabled, button:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(40%);
}

.btn-primary {
  background: var(--accent-primary-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, #6d70f2 0%, #9566f7 50%, #df54f0 100%);
}

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--surface-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.btn-glass {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-hover);
}

.btn-success {
  background: var(--accent-emerald-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: var(--accent-rose-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-icon-only {
  padding: 0.65rem;
  border-radius: 50%;
  aspect-ratio: 1;
}

/* Main Content Area */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Dashboard View */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.mode-card {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-primary-gradient);
  opacity: 0;
  transition: var(--transition-normal);
}

.mode-card:hover {
  transform: translateY(-4px);
  background: var(--surface-card-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow);
}

.mode-card:hover::before {
  opacity: 1;
}

.mode-card.exam::before { background: var(--accent-primary-gradient); }
.mode-card.training::before { background: var(--accent-cyan-gradient); }
.mode-card.sequential::before { background: var(--accent-emerald-gradient); }

.mode-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.mode-card.exam .mode-icon { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.mode-card.training .mode-icon { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.mode-card.sequential .mode-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.mode-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.mode-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex: 1;
}

.mode-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Stats Widget */
.stats-banner {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

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

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

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Packs Section */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.pack-card {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition-normal);
}

.pack-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--glass-border-hover);
}

.pack-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pack-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.pack-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.pack-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* QUESTION SCREEN / TICKET CARD */
.question-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.question-number-badge {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.exam-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.exam-timer.warning {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  animation: pulse 1s infinite;
}

.errors-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.error-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition-fast);
}

.error-dot.used {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}

/* Ticket Container Card */
.ticket-card {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-normal);
}

.ticket-image-wrapper {
  width: 100%;
  max-height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  position: relative;
  border: 1px solid var(--glass-border);
  transition: border-color var(--transition-fast);
}

.ticket-image-wrapper:hover {
  border-color: var(--glass-border-hover);
}

.ticket-image-wrapper img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
}

.ticket-image-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.ticket-question-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Options Grid */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--glass-border-hover);
  transform: translateX(4px);
}

.option-number {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.option-text {
  flex: 1;
}

/* Answer States */
.option-btn.correct {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  color: #ecfdf5;
}

.option-btn.correct .option-number {
  background: var(--success);
  color: #fff;
}

.option-btn.wrong {
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
  color: #fff1f2;
}

.option-btn.wrong .option-number {
  background: var(--danger);
  color: #fff;
}

.option-btn:disabled {
  cursor: default;
}

/* Collapsible Explanation Accordion */
details.explanation-accordion {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease;
}

details.explanation-accordion[open] {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(99, 102, 241, 0.35);
}

details.explanation-accordion summary {
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #a5b4fc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
  transition: color 0.15s ease;
}

details.explanation-accordion summary::-webkit-details-marker {
  display: none;
}

details.explanation-accordion summary::after {
  content: '▼';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

details.explanation-accordion[open] summary::after {
  transform: rotate(180deg);
  color: #a5b4fc;
}

details.explanation-accordion summary:hover {
  color: #ffffff;
}

details.explanation-accordion .explanation-content {
  padding: 0.85rem 1rem 1rem 1rem;
  border-top: 1px solid var(--glass-border);
}

/* Explanation Box */
.explanation-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  animation: fadeIn 0.3s ease;
}

.explanation-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #a5b4fc;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.explanation-essence {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.explanation-full {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;

}

/* Navigation controls inside ticket screen */
.ticket-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

/* Result Modal / Screen */
.result-card {
  background: var(--surface-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
  box-shadow: var(--glass-shadow);

}

.result-badge-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.result-card.passed .result-badge-icon {
  background: var(--accent-emerald-gradient);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.result-card.failed .result-badge-icon {
  background: var(--accent-rose-gradient);
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.5);
}

.result-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.result-stat-val {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.result-stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.pack-ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pack-ticket-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pack-ticket-item.dragging {
  opacity: 0.4;
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.pack-ticket-item.drag-over {
  border-top: 2px solid var(--accent-primary);
  background: rgba(99, 102, 241, 0.25);
}

.drag-handle {
  cursor: grab;
  padding: 2px 6px;
  font-size: 1.1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.close-modal-btn:hover {
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Image Zoom Modal */
.image-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  overflow: hidden;
  display: none;
  user-select: none;
}

.image-zoom-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.zoom-controls-toolbar {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  z-index: 3100;
  display: flex;
  gap: 0.4rem;
  background: rgba(15, 22, 36, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-md);
  padding: 5px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
}

.zoom-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.zoom-btn svg {
  display: block;
  pointer-events: none;
}

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

.zoom-btn.active {
  background: var(--accent-primary, #3b82f6);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* Pencil Subtoolbar & Paint Palette */
.pencil-subtoolbar {
  position: fixed;
  top: 4.25rem;
  right: 1.25rem;
  z-index: 3100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 22, 36, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.7);
  animation: fadeInDown 0.2s ease-out;
}

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

.pencil-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pencil-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}

.pencil-tool-btn, .pencil-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pencil-tool-btn:hover, .pencil-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pencil-tool-btn.active {
  background: var(--accent-primary, #3b82f6);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.pencil-colors {
  display: flex;
  align-items: center;
  gap: 5px;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: #ffffff;
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.color-picker-wrapper {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
}

.color-picker-wrapper input[type="color"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.pencil-sizes {
  display: flex;
  align-items: center;
  gap: 4px;
}

.size-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.size-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.size-btn.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--glass-border-hover);
}

.size-btn .dot {
  background: #ffffff;
  border-radius: 50%;
  display: block;
}

.size-btn .dot-sm { width: 4px; height: 4px; }
.size-btn .dot-md { width: 8px; height: 8px; }
.size-btn .dot-lg { width: 13px; height: 13px; }

.zoom-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.zoom-img-wrapper {
  position: relative;
  display: inline-block;
  max-width: 98vw;
  max-height: 96vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  border-radius: var(--radius-sm);
  transition: transform 0.05s ease-out;
  transform-origin: center center;
  will-change: transform;
}

.zoom-img-wrapper img {
  display: block;
  max-width: 98vw;
  max-height: 96vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  user-select: none;
  -webkit-user-drag: none;
}

#zoom-draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  pointer-events: none;
  touch-action: none;
}

.image-zoom-overlay.pencil-mode #zoom-draw-canvas {
  pointer-events: auto;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #1f2937;
  border: 1px solid var(--glass-border-hover);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--accent-primary); }

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

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

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

.shake {
  animation: shake 0.4s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-container {
    flex-wrap: wrap;
  }
  .search-box-container {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 0.5rem;
  }
  .ticket-card {
    padding: 1.25rem;
  }
  .ticket-question-text {
    font-size: 1.1rem;
  }
  .question-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Google AI Search Button */
.btn-google-ai {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.18), rgba(171, 71, 188, 0.18));
  border: 1px solid rgba(171, 71, 188, 0.4);
  color: #f3f4f6;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-google-ai:hover {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.35), rgba(171, 71, 188, 0.35));
  border-color: rgba(171, 71, 188, 0.8);
  box-shadow: 0 0 14px rgba(171, 71, 188, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}


/* ==========================================================================
   READINESS CARD HERO WIDGET (EXAM SUCCESS PROBABILITY)
   ========================================================================== */
.readiness-card {
  position: relative;
  background: radial-gradient(circle at 0% 0%, rgba(30, 41, 64, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.readiness-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  border-radius: 50%;
}

.readiness-main-row {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Gauge Chart */
.gauge-container {
  position: relative;
  width: 145px;
  height: 145px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 7;
}

.gauge-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease-in-out, stroke 0.5s ease;
}

.gauge-center-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
}

.gauge-value {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.gauge-sublabel {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  white-space: nowrap;
}

/* Content Area */
.readiness-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.readiness-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.readiness-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: none !important;
}

.readiness-badge.danger {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}

.readiness-badge.warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fde047;
}

.readiness-badge.success {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.readiness-badge.hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(217, 70, 239, 0.3));
  color: #f472b6;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.3);
}

.readiness-badge.muted {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* Motivation Wish Box */
.readiness-wish-box {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-primary);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e2e8f0;
}

/* Metric Pills Row */
.readiness-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.metric-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-pill-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.metric-pill-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Action Banner at Bottom */
.readiness-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  margin-top: 0.25rem;
}

.readiness-advice-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
  .readiness-card {
    padding: 1.25rem;
  }
  .readiness-main-row {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
  .readiness-header {
    justify-content: center;
  }
  .readiness-title {
    justify-content: center;
  }
  .readiness-metrics-row {
    grid-template-columns: 1fr;
  }
  .readiness-action-bar {
    flex-direction: column;
    text-align: center;
  }
  .readiness-advice-text {
    margin-bottom: 0.5rem;
  }
}

/* Dashboard Exam Item & Purple Button */
.dashboard-exam-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--glass-border-hover) !important;
}

.btn-more-purple {
  background: rgba(168, 85, 247, 0.15);
  border: none !important;
  color: #c084fc;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-more-purple:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

/* User Widget in Navbar */
.nav-user-widget {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-login-btn {
  background: linear-gradient(135deg, var(--accent-primary), #6366f1);
  color: white;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.nav-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-badge:hover {
  background: var(--glass-bg-hover);
  border-color: var(--accent-primary);
}

.user-avatar-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-email-short {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.nav-logout-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* Auth Modal */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.auth-modal-card {
  background: #111827;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

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

.auth-modal-close:hover {
  color: var(--text-main);
}

.auth-tabs {
  display: flex;
  background: var(--glass-bg);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--accent-primary);
  color: white;
}

.auth-form .form-group {
  margin-bottom: 1.1rem;
}

.auth-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.auth-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: border-color var(--transition-fast);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.auth-submit-btn {
  width: 100%;
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity var(--transition-fast);
}

.auth-submit-btn:hover {
  opacity: 0.9;
}

.auth-divider {
  text-align: center;
  margin: 1.25rem 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-border);
  z-index: 1;
}

.auth-divider span {
  position: relative;
  z-index: 2;
  background: #111827;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.google-login-btn {
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.google-login-btn:hover {
  background: #f9fafb;
}

.auth-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}

.auth-error-msg.info {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

/* Profile View */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-header-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  flex-wrap: wrap;
}

.profile-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.profile-details {
  flex: 1;
  min-width: 220px;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.profile-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.profile-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.profile-joined {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.logout-btn-large {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logout-btn-large:hover {
  background: rgba(239, 68, 68, 0.25);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.profile-section {
  padding: 1.5rem;
}

.profile-section-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.profile-packs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-pack-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.profile-pack-name {
  font-weight: 600;
  display: block;
}

.profile-pack-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GUEST WARNING BANNER
   ========================================================================== */
.guest-warning-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

.guest-warning-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fef3c7;
  font-size: 0.92rem;
  line-height: 1.4;
}

.guest-warning-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.guest-warning-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-amber-gradient);
  color: #0d0f17;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.guest-warning-login-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.guest-warning-login-btn:active {
  transform: translateY(0) scale(0.98);
}

@media (max-width: 640px) {
  .guest-warning-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .guest-warning-login-btn {
    width: 100%;
    justify-content: center;
  }
}




