/* ==========================================================================
   FIRE IN INDIA — STRATEGY SELECTOR & INTERACTIVE WIDGET
   Design System & Styling: Modern Fintech Dark Theme with Glassmorphism
   ========================================================================== */

:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette */
  --bg-base: #070a14;
  --bg-surface: #0e1526;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-card-active: rgba(14, 165, 233, 0.12);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(6, 182, 212, 0.5);
  
  /* Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #38bdf8;
  --accent-cyan-glow: rgba(6, 182, 212, 0.28);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.28);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
  
  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px -5px var(--accent-cyan-glow);
  --shadow-emerald: 0 0 25px -5px var(--accent-emerald-glow);
  
  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

/* App Wrapper */
.app-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   HEADER COMPONENT
   ========================================================================== */
.app-header {
  margin-bottom: 28px;
  text-align: center;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 860px;
  margin-bottom: 16px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.flame-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
  animation: pulseFlame 2.5s infinite ease-in-out;
}

@keyframes pulseFlame {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.8)); }
}

.brand-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-ghost-sm {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.main-headline {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-headline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 24px;
}

.sub-headline strong {
  color: var(--accent-cyan-light);
  font-weight: 600;
}

/* Mode Switch Tabs */
.mode-tabs-container {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.8);
  padding: 5px;
  border-radius: 9999px;
  border: 1px solid var(--border-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  gap: 4px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.active {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  box-shadow: 0 2px 14px var(--accent-cyan-glow);
}

/* ==========================================================================
   VIEW SECTIONS
   ========================================================================== */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

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

/* ==========================================================================
   VIEW 1: GUIDED QUIZ
   ========================================================================== */
.quiz-card-container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.progress-bar-container {
  margin-bottom: 30px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.step-label {
  color: var(--accent-cyan);
}

.step-percent {
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: 9999px;
  transition: width var(--transition-normal);
}

/* Steps */
.quiz-step {
  display: none;
}

.quiz-step.active-step {
  display: block;
  animation: stepIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.q-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 4px 12px;
  line-height: 1.2;
}

.question-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

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

/* Option Tile Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.option-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition-fast);
  position: relative;
  user-select: none;
}

.option-tile:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.option-tile.selected {
  background: var(--bg-card-active);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px -3px var(--accent-cyan-glow);
}

.option-tile.selected::after {
  content: '✓';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  background: var(--accent-cyan);
  color: #000000;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.tile-icon-box {
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  line-height: 1;
  flex-shrink: 0;
}

.tile-body {
  flex: 1;
}

.tile-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tile-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.tier-low { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.tier-med { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.tier-high { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tier-highest { background: rgba(244, 63, 94, 0.15); color: #fb7185; }

.freq-daily { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.freq-weekly { background: rgba(139, 92, 246, 0.15); color: #c084fc; }
.freq-monthly { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.asset-etf { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.asset-stock { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.asset-options { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.asset-any { background: rgba(139, 92, 246, 0.15); color: #c084fc; }

.tile-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Navigation Row */
.quiz-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.quiz-nav-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-cyan-glow);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-emerald-glow);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--accent-emerald-glow);
}

.btn-success:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   QUIZ RESULTS VIEW
   ========================================================================== */
.results-header-banner {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.banner-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.results-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.results-persona {
  font-size: 1.05rem;
  color: var(--accent-cyan-light);
  max-width: 650px;
  margin: 0 auto;
}

.results-actions-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   VIEW 2: CATALOG VIEW & FILTERS
   ========================================================================== */
.catalog-controls-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.6;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 44px 14px 44px;
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.clear-search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.filters-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  min-width: 85px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.pill.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--accent-cyan-glow);
}

.catalog-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
}

.count-display {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   STRATEGY CARDS & GRID
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 22px;
}

.strategy-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.strategy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  opacity: 0.6;
}

.strategy-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6), 0 0 20px -5px var(--accent-cyan-glow);
}

.strategy-card.match-highlight {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 30px -8px var(--accent-emerald-glow);
}

.strategy-card.match-highlight::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
  height: 4px;
  opacity: 1;
}

/* Card Header */
.card-top-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-capital { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.badge-freq { background: rgba(139, 92, 246, 0.15); color: #c084fc; }
.badge-asset { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-match { background: rgba(16, 185, 129, 0.25); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }

.card-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-persona-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-based-on {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.45;
}

/* Target & Frequency Metrics Row */
.card-metrics-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.metric-value.booking-speed {
  color: var(--accent-cyan-light);
}

/* Accordion Rules */
.accordion-wrapper {
  margin-bottom: 18px;
}

.accordion-trigger {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.accordion-trigger .chevron {
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.accordion-trigger.expanded .chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.accordion-body.open {
  max-height: 250px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-top: none;
}

.rule-row {
  margin-bottom: 8px;
  font-size: 0.83rem;
  line-height: 1.4;
}

.rule-row:last-child {
  margin-bottom: 0;
}

.rule-tag {
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 6px;
}

.tag-buy { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.tag-sell { background: rgba(244, 63, 94, 0.2); color: #fb7185; }

/* Card Actions */
.card-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.btn-action-yt {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-action-yt:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: #ef4444;
}

.btn-action-sheet-free {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-action-sheet-free:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #ffffff;
  border-color: #10b981;
}

.btn-action-sheet-paid {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-action-sheet-paid:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #ffffff;
  border-color: #f59e0b;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-xl);
  max-width: 500px;
  margin: 30px auto;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ==========================================================================
   MODAL COMPONENT (EMBED WIDGET)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 6px;
}

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

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

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

.modal-body {
  padding: 24px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.code-snippet-box {
  margin-bottom: 20px;
}

.code-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  padding: 12px;
  resize: none;
  outline: none;
}

.embed-instructions h4 {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.embed-instructions ol {
  padding-left: 20px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.embed-instructions li {
  margin-bottom: 4px;
}

.embed-instructions code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-amber);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  border: 1px solid var(--accent-emerald);
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-emerald-glow);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s 2.7s forwards;
}

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

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  margin-top: auto;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.disclaimer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-cyan);
}

.footer-dot {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
  .app-wrapper {
    padding: 16px 12px 40px;
  }

  .main-headline {
    font-size: 1.7rem;
  }

  .sub-headline {
    font-size: 0.92rem;
  }

  .mode-tabs-container {
    width: 100%;
  }

  .mode-tab {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.84rem;
    justify-content: center;
  }

  .quiz-card-container {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .question-title {
    font-size: 1.15rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .catalog-controls-card {
    padding: 18px 16px;
  }
}

@media (max-width: 480px) {
  .brand-row {
    flex-direction: column;
    gap: 10px;
  }

  .quiz-nav-row {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .quiz-nav-row button {
    width: 100%;
  }

  .card-actions-row {
    grid-template-columns: 1fr;
  }
}
