/* ==========================================================================
   DERSI.ONLINE — GAMIFICATION & DESIGN SYSTEM V1
   Academic • Gamified • Premium • Motivating • Modern • Mobile-First
   Strictly Zero-Fabrication: Pure semantic CSS visual tokens & components
   ========================================================================== */

:root {
  /* =========================================================================
     1. Canonical Dersi Color Tokens & Semantic Gamification
     ========================================================================= */
  /* Canonical Tokens */
  --dersi-crimson: #E30A17;
  --dersi-crimson-dark: #B80812;
  --dersi-crimson-light: #FDE7E9;
  --dersi-crimson-glow: rgba(227, 10, 23, 0.35);
  --dersi-crimson-subtle: rgba(227, 10, 23, 0.12);

  --dersi-black: #111111;
  --dersi-white: #FFFFFF;
  --dersi-surface: #F5F5F5;
  --dersi-border: #E5E5E5;

  --dersi-xp: #F4B400;              /* XP / Reward / Points (Gold) */
  --dersi-xp-glow: rgba(244, 180, 0, 0.4);
  --dersi-xp-subtle: rgba(244, 180, 0, 0.12);
  --dersi-xp-text: #FCD34D;

  --dersi-streak: #FF6B35;          /* Streak / Continuity (Orange) */
  --dersi-streak-glow: rgba(255, 107, 53, 0.45);
  --dersi-streak-subtle: rgba(255, 107, 53, 0.14);
  --dersi-streak-text: #FB923C;

  --dersi-success: #16A34A;         /* Success / Mastered (Green) */
  --dersi-success-glow: rgba(22, 163, 74, 0.35);
  --dersi-success-subtle: rgba(22, 163, 74, 0.14);

  --dersi-error: #DC2626;           /* Error / Incorrect (Red distinct from Crimson) */
  --dersi-error-glow: rgba(220, 38, 38, 0.35);
  --dersi-error-subtle: rgba(220, 38, 38, 0.14);

  --dersi-warning: #F59E0B;         /* Warning (Amber) */
  --dersi-warning-glow: rgba(245, 158, 11, 0.35);
  --dersi-warning-subtle: rgba(245, 158, 11, 0.12);

  --dersi-info: #2563EB;            /* Educational Info (Blue) */
  --dersi-info-glow: rgba(37, 99, 235, 0.35);
  --dersi-info-subtle: rgba(37, 99, 235, 0.14);

  --dersi-ai: #7C3AED;              /* AI & Intelligence (Purple) */
  --dersi-ai-glow: rgba(124, 58, 237, 0.35);
  --dersi-ai-subtle: rgba(124, 58, 237, 0.14);

  /* Badge Achievement Tiers */
  --badge-bronze: #CD7F32;
  --badge-silver: #A8A8A8;
  --badge-gold: #F4B400;
  --badge-legendary: #E30A17;

  /* Semantic Gamification Aliases */
  /* XP Identity (Gold: What the student earned) */
  --xp-primary: var(--dersi-xp, #F4B400);
  --xp-hover: #D99B00;
  --xp-glow: var(--dersi-xp-glow);
  --xp-subtle: var(--dersi-xp-subtle);
  --xp-text: var(--dersi-xp-text);

  /* Level & Rank (Turkish Crimson: Progression) */
  --level-primary: var(--dersi-crimson, #E30A17);
  --level-hover: var(--dersi-crimson-dark, #B80812);
  --level-glow: var(--dersi-crimson-glow);
  --level-subtle: var(--dersi-crimson-subtle);
  --level-text: #FF8A90;

  /* Streak Energy (Orange: Continuity & Daily Habit) */
  --streak-primary: var(--dersi-streak, #FF6B35);
  --streak-hover: #EA580C;
  --streak-glow: var(--dersi-streak-glow);
  --streak-subtle: var(--dersi-streak-subtle);
  --streak-text: var(--dersi-streak-text);

  /* Achievement & Mastery (Royal amethyst purple) */
  --achievement-primary: var(--dersi-ai, #7C3AED);
  --achievement-hover: #6D28D9;
  --achievement-glow: var(--dersi-ai-glow);
  --achievement-subtle: var(--dersi-ai-subtle);
  --achievement-text: #C4B5FD;

  /* Challenge Tier (Turkish Crimson for rigorous academic focus) */
  --challenge-primary: var(--dersi-crimson, #E30A17);
  --challenge-hover: var(--dersi-crimson-dark, #B80812);
  --challenge-glow: var(--dersi-crimson-glow);
  --challenge-subtle: var(--dersi-crimson-subtle);

  /* Next Best Action (Hero Focus Crimson Accent) */
  --nba-border: var(--dersi-crimson, #E30A17);
  --nba-glow: var(--dersi-crimson-glow);
  --nba-bg-from: rgba(227, 10, 23, 0.15);
  --nba-bg-to: rgba(15, 26, 58, 0.95);

  /* State Tokens */
  --state-locked: rgba(148, 163, 184, 0.3);
  --state-locked-bg: rgba(15, 26, 58, 0.45);
  --state-completed: var(--dersi-success, #16A34A);
  --state-completed-bg: var(--dersi-success-subtle);
}

/* ==========================================================================
   2. Standardized Card Family (Hierarchy & Elevations)
   ========================================================================== */
.card-learning {
  background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(21, 34, 79, 0.85) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card-learning:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-highlight);
}

/* Hero Next Best Action Card */
.card-nba {
  background: linear-gradient(135deg, var(--nba-bg-from) 0%, var(--nba-bg-to) 100%);
  border: 2px solid var(--nba-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 30px var(--nba-glow);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-nba:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(13, 148, 136, 0.45);
}

.card-nba::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 4px;
}

/* Mission & Challenge Card Variants */
.card-mission {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card-mission:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.card-mission.completed {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, var(--bg-main) 0%, rgba(16, 185, 129, 0.06) 100%);
}

.card-challenge {
  background: var(--bg-main);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-inline-start: 4px solid var(--streak-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.card-challenge:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 4px 18px var(--streak-subtle);
  transform: translateY(-2px);
}

.card-challenge.completed {
  border-inline-start-color: var(--state-completed);
  border-color: rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   3. Authoritative Streak Torch Component
   ========================================================================== */
.streak-torch {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-main);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 2px 12px var(--streak-subtle);
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.streak-torch:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px var(--streak-glow);
  border-color: var(--streak-primary);
}

.streak-torch-icon {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.6));
  animation: streakFlame 2.5s ease-in-out infinite;
}

@keyframes streakFlame {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.5)); }
  50% { transform: scale(1.08) rotate(1deg); filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.8)); }
}

.streak-torch-count {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--streak-text);
  font-family: var(--font-tr);
  letter-spacing: -0.5px;
}

/* ==========================================================================
   4. Academic Achievement Badges & Catalog
   ========================================================================== */
.badge-academic {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge-xp {
  background: var(--dersi-xp-subtle, rgba(244, 180, 0, 0.14));
  color: var(--dersi-xp-text, #FCD34D);
  border: 1px solid rgba(244, 180, 0, 0.4);
  font-weight: 800;
}

.badge-level {
  background: var(--dersi-crimson-subtle, rgba(227, 10, 23, 0.14));
  color: #FF8A90;
  border: 1px solid rgba(227, 10, 23, 0.4);
  font-weight: 800;
}

.badge-crimson {
  background: var(--dersi-crimson-subtle, rgba(227, 10, 23, 0.14));
  color: #FF8A90;
  border: 1px solid var(--dersi-crimson-glow);
  font-weight: 800;
}

.badge-gold {
  background: var(--dersi-xp-subtle, rgba(244, 180, 0, 0.14));
  color: var(--dersi-xp-text, #FCD34D);
  border: 1px solid rgba(244, 180, 0, 0.4);
  font-weight: 800;
}

.badge-streak {
  background: var(--dersi-streak-subtle, rgba(255, 107, 53, 0.14));
  color: var(--dersi-streak-text, #FB923C);
  border: 1px solid rgba(255, 107, 53, 0.35);
  font-weight: 800;
}

.badge-success {
  background: var(--dersi-success-subtle, rgba(22, 163, 74, 0.14));
  color: #4ADE80;
  border: 1px solid rgba(22, 163, 74, 0.35);
  font-weight: 800;
}

.badge-error {
  background: var(--dersi-error-subtle, rgba(220, 38, 38, 0.14));
  color: #F87171;
  border: 1px solid rgba(220, 38, 38, 0.35);
  font-weight: 800;
}

.badge-info {
  background: var(--dersi-info-subtle, rgba(37, 99, 235, 0.14));
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-weight: 700;
}

.badge-ai {
  background: var(--dersi-ai-subtle, rgba(124, 58, 237, 0.14));
  color: #C4B5FD;
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-weight: 700;
}

.badge-achievement {
  background: var(--achievement-subtle);
  color: var(--achievement-text);
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-weight: 700;
}

.badge-locked {
  background: var(--state-locked-bg);
  color: var(--text-dim);
  border: 1px solid var(--state-locked);
}

.badge-teal {
  background: var(--primary-subtle);
  color: var(--primary-light);
  border: 1px solid var(--primary-glow);
  font-weight: 700;
}

.badge-orange {
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(255, 107, 53, 0.35);
  font-weight: 700;
}

.badge-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-weight: 600;
}

/* Badge Tiers (Bronze, Silver, Gold, Legendary) */
.badge-tier-bronze {
  background: rgba(205, 127, 50, 0.15);
  color: #E2A76F;
  border: 1px solid rgba(205, 127, 50, 0.45);
}

.badge-tier-silver {
  background: rgba(168, 168, 168, 0.15);
  color: #E2E8F0;
  border: 1px solid rgba(168, 168, 168, 0.45);
}

.badge-tier-gold {
  background: rgba(244, 180, 0, 0.18);
  color: #FCD34D;
  border: 1px solid rgba(244, 180, 0, 0.5);
  box-shadow: 0 0 10px rgba(244, 180, 0, 0.25);
}

.badge-tier-legendary {
  background: linear-gradient(135deg, rgba(227, 10, 23, 0.2) 0%, rgba(244, 180, 0, 0.2) 100%);
  color: #FFF;
  border: 1.5px solid rgba(227, 10, 23, 0.6);
  box-shadow: 0 0 14px rgba(227, 10, 23, 0.35);
}

/* Achievement Item in Catalog */
.achievement-badge-item {
  background: var(--bg-main);
  padding: 0.85rem 0.6rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.achievement-badge-item:hover {
  transform: translateY(-2px);
  border-color: var(--achievement-primary);
  box-shadow: 0 4px 16px var(--achievement-subtle);
}

.achievement-badge-item.unlocked {
  border-color: rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, var(--bg-main) 0%, rgba(139, 92, 246, 0.12) 100%);
  opacity: 1;
}

.achievement-badge-item.locked {
  opacity: 0.4;
  filter: grayscale(80%);
}

.achievement-badge-item.locked:hover {
  opacity: 0.65;
  filter: grayscale(40%);
}

/* ==========================================================================
   5. Standardized Buttons & Gamification Action CTAs
   ========================================================================= */
.btn-gamify-xp {
  background: linear-gradient(135deg, #D99B00 0%, var(--dersi-xp, #F4B400) 100%);
  color: #111111;
  font-weight: 800;
  border: 1px solid rgba(244, 180, 0, 0.5);
  box-shadow: 0 4px 14px var(--dersi-xp-glow);
}

.btn-gamify-xp:hover {
  box-shadow: 0 6px 20px rgba(244, 180, 0, 0.6);
  transform: translateY(-2px);
  color: #000;
}

.btn-gamify-challenge {
  background: linear-gradient(135deg, #EA580C 0%, var(--dersi-streak, #FF6B35) 100%);
  color: #fff;
  font-weight: 800;
  border: 1px solid rgba(255, 107, 53, 0.4);
  box-shadow: 0 4px 14px var(--dersi-streak-glow);
}

.btn-gamify-challenge:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
  transform: translateY(-2px);
}

.btn-gamify-crimson {
  background: linear-gradient(135deg, var(--dersi-crimson-dark, #B80812) 0%, var(--dersi-crimson, #E30A17) 100%);
  color: #fff;
  font-weight: 800;
  border: 1px solid rgba(227, 10, 23, 0.45);
  box-shadow: 0 4px 14px var(--dersi-crimson-glow);
}

.btn-gamify-crimson:hover {
  box-shadow: 0 6px 20px rgba(227, 10, 23, 0.6);
  transform: translateY(-2px);
}

/* ==========================================================================
   6. Progress Bars (Precision Educational Meters)
   ========================================================================== */
.meter-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.meter-track-lg {
  height: 12px;
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.meter-fill-primary {
  background: linear-gradient(90deg, var(--dersi-crimson, #E30A17) 0%, var(--primary-light, #FF4D58) 100%);
}

.meter-fill-xp {
  background: linear-gradient(90deg, #D99B00 0%, var(--dersi-xp, #F4B400) 100%);
}

.meter-fill-streak {
  background: linear-gradient(90deg, #EA580C 0%, var(--dersi-streak, #FF6B35) 100%);
}

.meter-fill-success {
  background: linear-gradient(90deg, #059669 0%, var(--dersi-success, #16A34A) 100%);
}

/* ==========================================================================
   7. Educational Quiz Option Components (Semantic Distinction)
   ========================================================================== */
.quiz-option-academic {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.quiz-option-academic:hover {
  border-color: rgba(227, 10, 23, 0.45);
  background: rgba(227, 10, 23, 0.06);
}

.quiz-option-academic.selected {
  border-color: var(--dersi-crimson, #E30A17);
  background: rgba(227, 10, 23, 0.12);
  box-shadow: 0 0 12px var(--dersi-crimson-subtle);
}

.quiz-option-academic.correct {
  border-color: var(--dersi-success, #16A34A) !important;
  background: rgba(22, 163, 74, 0.14) !important;
  box-shadow: 0 0 12px var(--dersi-success-subtle);
}

.quiz-option-academic.incorrect {
  border-color: var(--dersi-error, #DC2626) !important;
  background: rgba(220, 38, 38, 0.14) !important;
  box-shadow: 0 0 12px var(--dersi-error-subtle);
}

/* ==========================================================================
   8. Standardized Form Controls & Inputs
   ========================================================================== */
.input-academic,
.select-academic,
.textarea-academic {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.input-academic:focus,
.select-academic:focus,
.textarea-academic:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.input-academic::placeholder,
.textarea-academic::placeholder {
  color: var(--text-dim);
}

/* ==========================================================================
   9. Standardized Modals & Drawers
   ========================================================================== */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 30, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInModal 0.2s ease-out;
}

.modal-dialog,
.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes slideUpModal {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Mobile drawer adaptation */
@media (max-width: 640px) {
  .modal-overlay,
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal-dialog,
  .modal-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 85vh;
  }
}

/* ==========================================================================
   10. Professional Academic Tables (Teacher/Admin/Parent)
   ========================================================================== */
.table-academic-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
}

.table-academic {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 0.92rem;
}

.table-academic th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table-academic td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
}

.table-academic tr:last-child td {
  border-bottom: none;
}

.table-academic tr:hover td {
  background: rgba(45, 212, 191, 0.04);
}

/* ==========================================================================
   11. Stat Widget Gamification Elevation
   ========================================================================== */
.stat-widget {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-widget:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   12. Micro-Interactions & Reduced Motion Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .streak-torch-icon,
  .streak-flame {
    animation: none !important;
  }
}

/* ==========================================================================
   13. Responsive & RTL/LTR Safeguards
   ========================================================================== */
/* ==========================================================================
   14. Gamified Groups, Tier Cards & Brand Gradient Typography
   ========================================================================== */
.gamified-title-brand {
  background: linear-gradient(135deg, #FFFFFF 0%, #FDE7E9 40%, var(--dersi-crimson, #E30A17) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.gamified-title-crimson {
  background: linear-gradient(135deg, #FF6B75 0%, #E30A17 50%, #B80812 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.gamified-title-teal {
  background: linear-gradient(135deg, #5EEAD4 0%, #2DD4BF 50%, #0D9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.gamified-title-gold {
  background: linear-gradient(135deg, #FEF08A 0%, #F59E0B 50%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.gamified-group-card {
  background: linear-gradient(145deg, rgba(15, 26, 58, 0.96) 0%, rgba(227, 10, 23, 0.09) 100%);
  border: 1.5px solid rgba(227, 10, 23, 0.28);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 18px rgba(227, 10, 23, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.gamified-group-card:hover {
  transform: translateY(-4px);
  border-color: var(--dersi-crimson, #E30A17);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5), 0 0 28px rgba(227, 10, 23, 0.35);
}

.gamified-xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(244, 180, 0, 0.22), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(244, 180, 0, 0.45);
  color: var(--dersi-xp-text, #FCD34D);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(244, 180, 0, 0.15);
}

.gamified-mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(227, 10, 23, 0.2), rgba(249, 115, 22, 0.15));
  border: 1px solid rgba(227, 10, 23, 0.4);
  color: #FFA5A5;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
}

.gamified-seats-bar {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gamified-seats-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #F59E0B 65%, #E30A17 100%);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   15. Pricing Glassmorphism Headers & Highlighted Large Titles
   ========================================================================== */
.pricing-glass-header {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.pricing-glass-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
}

.pricing-card:hover .pricing-glass-header {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.plan-title-highlight {
  font-family: inherit;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .pricing-glass-header {
    padding: 1rem 0.75rem !important;
  }
  .plan-title-highlight {
    font-size: 1.55rem !important;
  }
}





/* ==========================================================================
   PRICING GLASS CROWN HEADERS (Free, Grup, Özel)
   Single-word glass crown perched on top of each card with all details inside.
   ========================================================================== */
.pricing-glass-crown {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg, 16px);
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  margin-bottom: 1.15rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-glass-crown::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
}

.pricing-card:hover .pricing-glass-crown {
  transform: translateY(-2px);
}

.glass-crown-free {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.5), rgba(45, 212, 191, 0.25)) !important;
  border: 2px solid rgba(45, 212, 191, 0.75) !important;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
}
.pricing-card:hover .glass-crown-free {
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

.glass-crown-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.3)) !important;
  border: 2px solid rgba(168, 85, 247, 0.75) !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
}
.pricing-card:hover .glass-crown-ai {
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

.glass-crown-grup {
  background: linear-gradient(135deg, rgba(227, 10, 23, 0.55), rgba(255, 77, 88, 0.3)) !important;
  border: 2px solid var(--dersi-crimson, #E30A17) !important;
  box-shadow: 0 10px 28px rgba(227, 10, 23, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
}
.pricing-card:hover .glass-crown-grup {
  box-shadow: 0 14px 35px rgba(227, 10, 23, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

.glass-crown-ozel,
.glass-crown-vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(249, 115, 22, 0.3)) !important;
  border: 2px solid rgba(245, 158, 11, 0.8) !important;
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
}
.pricing-card:hover .glass-crown-ozel,
.pricing-card:hover .glass-crown-vip {
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

.plan-crown-title {
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6) !important;
  line-height: 1.1 !important;
}

.plan-sub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.74rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  width: 100%;
  text-align: center;
}

.badge-teal-glass {
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #5EEAD4;
}

.badge-ai-glass {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #D8B4FE;
}

.badge-crimson-glass {
  background: rgba(227, 10, 23, 0.2);
  border: 1px solid rgba(227, 10, 23, 0.4);
  color: #FFA5A5;
}

.badge-vip-glass,
.badge-orange-glass {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #FDE68A;
}

/* 4-Tier Gamified Capsule Card Variants */
.card-arcade-free {
  border: 1.5px solid rgba(45, 212, 191, 0.35) !important;
  background: linear-gradient(165deg, rgba(15, 26, 58, 0.95), rgba(13, 148, 136, 0.08)) !important;
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.15) !important;
}
.card-arcade-free:hover {
  border-color: rgba(45, 212, 191, 0.75) !important;
  box-shadow: 0 14px 38px rgba(13, 148, 136, 0.35) !important;
}

.card-arcade-ai {
  border: 1.5px solid rgba(168, 85, 247, 0.4) !important;
  background: linear-gradient(165deg, rgba(15, 26, 58, 0.95), rgba(99, 102, 241, 0.12)) !important;
}

/* ==========================================================================
   ARCADE CAPSULE TIERS (PIXEL-PERFECT FROM USER SPEC & IMAGE)
   Tight / Contiguous Layout (متلاصقين متجاورين) + Multi-Color Arcade Glow
   ========================================================================== */
.pricing-grid-contiguous {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  align-items: stretch;
  max-width: 1280px;
  margin: 3.5rem auto 0;
  padding: 1.5rem 0.5rem 0.5rem;
  position: relative;
}

@media (max-width: 1140px) {
  .pricing-grid-contiguous {
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 0.85rem;
  }
}

@media (max-width: 640px) {
  .pricing-grid-contiguous {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}

.arcade-capsule-card {
  background: #0d1424;
  background: linear-gradient(180deg, #111a2e 0%, #0a0f1d 100%);
  border-radius: 28px;
  padding: 1.8rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.arcade-capsule-card:hover {
  transform: translateY(-6px);
  z-index: 3;
}

/* Card 1: FREE (Emerald Glow) */
.arcade-card-free {
  border: 2px solid #10B981;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.28), inset 0 0 16px rgba(16, 185, 129, 0.05);
}
.arcade-card-free:hover {
  border-color: #34D399;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.55), 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Card 2: AI PRO (Electric Violet / Indigo Glow) */
.arcade-card-ai {
  border: 2px solid #8B5CF6;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.32), inset 0 0 16px rgba(139, 92, 246, 0.05);
}
.arcade-card-ai:hover {
  border-color: #A78BFA;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.6), 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Card 3: GRUP (Crimson Flame / Pulsing Red Glow - Featured) */
.arcade-card-grup {
  border: 2.5px solid #FF334B;
  box-shadow: 0 0 30px rgba(227, 10, 23, 0.45), inset 0 0 20px rgba(227, 10, 23, 0.08);
}
.arcade-card-grup:hover {
  border-color: #FF5A6E;
  box-shadow: 0 0 45px rgba(227, 10, 23, 0.7), 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Card 4: VIP 1:1 (Imperial Gold / Amber Glow) */
.arcade-card-vip {
  border: 2px solid #F59E0B;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.32), inset 0 0 16px rgba(245, 158, 11, 0.05);
}
.arcade-card-vip:hover {
  border-color: #FBBF24;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.6), 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Top Pill Badge (Identical to user image) */
.arcade-top-pill {
  width: 86%;
  margin: -2.85rem auto 1.15rem;
  padding: 0.55rem 0.5rem;
  border-radius: 50px;
  text-align: center;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  display: block;
}

.pill-free {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.6);
}
.pill-ai {
  background: linear-gradient(135deg, #8B5CF6, #6366F1);
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.6);
}
.pill-grup {
  background: linear-gradient(135deg, #FF334B, #E30A17);
  box-shadow: 0 4px 22px rgba(227, 10, 23, 0.75);
}
.pill-vip {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.6);
}

/* Sub-badge text */
.arcade-badge-tag {
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
}
.tag-free { color: #6EE7B7; }
.tag-ai { color: #C4B5FD; }
.tag-grup { color: #FEF08A; }
.tag-vip { color: #FDE68A; }

.arcade-plan-title {
  color: #FFFFFF;
  font-size: 0.98rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arcade-plan-desc {
  color: #94A3B8;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
  margin: 0 0 0.85rem;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Recessed Inner Price Box (Identical to user image) */
.arcade-price-box {
  background: #080D1A;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1rem 0.75rem;
  margin: 0 0 1.25rem;
  text-align: center;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.arcade-price-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1;
}

.arcade-price-val {
  color: #FFFFFF;
  font-size: 2.85rem;
  font-weight: 900;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  letter-spacing: -0.5px;
}

.arcade-price-period {
  color: #CBD5E1;
  font-size: 0.92rem;
  font-weight: 700;
}

.arcade-price-strike {
  color: #94A3B8;
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 0.4rem;
}

.arcade-price-period {
  color: #CBD5E1;
  font-size: 0.92rem;
  font-weight: 700;
}

.arcade-price-strike {
  color: #94A3B8;
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 0.4rem;
}

/* Features List & Circular Checks (Identical to user image) */
.arcade-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-grow: 1;
}

.arcade-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: #E2E8F0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.arcade-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
  color: #FFFFFF;
}

.check-free {
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
.check-ai {
  background: #8B5CF6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}
.check-grup {
  background: #E30A17;
  box-shadow: 0 0 8px rgba(227, 10, 23, 0.7);
}
.check-vip {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* Bottom Large Pill CTA Button (Identical to user image) */
.arcade-btn-cta {
  width: 100%;
  border-radius: 50px;
  padding: 0.82rem 1rem;
  font-size: 0.96rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.arcade-btn-cta:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
  color: #FFFFFF;
}

.btn-cta-free {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}
.btn-cta-ai {
  background: linear-gradient(135deg, #8B5CF6, #6366F1);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}
.btn-cta-grup {
  background: linear-gradient(135deg, #FF334B, #E30A17);
  box-shadow: 0 6px 24px rgba(227, 10, 23, 0.6);
}
.btn-cta-vip {
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}



/* ==========================================================================
   MEB FREE TOOLS HUB & INTERACTIVE CALCULATORS
   ========================================================================== */
.meb-hub-section {
  padding: 4.5rem 0;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.12), transparent 70%),
              radial-gradient(circle at 100% 100%, rgba(227, 10, 23, 0.08), transparent 60%),
              var(--bg-main, #070B18);
}

.meb-tab-nav {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.meb-tab-btn {
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full, 9999px);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.meb-tab-btn:hover {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.meb-tab-btn.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.4), rgba(45, 212, 191, 0.2));
  border-color: var(--teal-light, #2DD4BF);
  color: #fff;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.35);
}

.meb-tab-content {
  display: none;
  animation: fadeInHub 0.35s ease forwards;
}

.meb-tab-content.active {
  display: block;
}

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

.calc-grid-input {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
}

.calc-subject-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 1.15rem;
  transition: border-color 0.2s;
}

.calc-subject-card:hover {
  border-color: rgba(45, 212, 191, 0.3);
}

.calc-num-input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: var(--radius-sm, 8px);
  padding: 0.5rem 0.75rem;
  width: 100%;
  text-align: center;
}

.countdown-clock-box {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.countdown-unit {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.5));
  border: 1.5px solid rgba(45, 212, 191, 0.3);
  border-radius: var(--radius-lg, 16px);
  padding: 1rem 1.35rem;
  min-width: 85px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.countdown-num {
  font-size: 2.3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.5);
}

.countdown-lbl {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 0.35rem;
}

.gamified-trex-pill { display: inline-flex; align-items: center; gap: 4px; background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: #FBBF24; font-weight: 800; font-size: 0.75rem; padding: 2px 8px; border-radius: 20px; }
