/* ============================================================
   RA'VEN ULTIMATE — css/main.css
   Universal Learning Platform · PWA Native Standards
   v4.0.0 — Modüler Mimari + Module Hub + Fill-in-Blank + Matching
   ============================================================

   İÇİNDEKİLER:
   01. Google Fonts Import
   02. CSS Reset & Global Base
   03. Safe Area Utility Variables
   04. Theme: Classic (Default)
   05. Theme: Cyber
   06. Theme: Arcade
   07. Scrollbar Styles
   08. Global Component Base Styles
   09. SPA View Routing Transitions
   10. Lobi (Lobby) Arayüzü
   11. Animasyonlar (Keyframes)
   12. Oyun Motoru — Game Engine Stilleri
   13. Oyun — Fill-in-Blank Bileşeni (YENİ v4.0.0)
   14. Oyun — Matching (Eşleştirme) Bileşeni (YENİ v4.0.0)
   15. Module Hub Ekranı (YENİ v4.0.0)
   16. Responsive Utilities
   17. Erişilebilirlik
   ============================================================ */


/* ============================================================
   01. GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');


/* ============================================================
   02. CSS RESET & GLOBAL BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html {
  height: 100%;
  height: -webkit-fill-available;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  transition: background-color 0.35s ease, color 0.35s ease;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

button, a {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  border: none;
  background: none;
  text-decoration: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  touch-action: manipulation;
}


/* ============================================================
   03. SAFE AREA UTILITY VARIABLES & GLOBAL TOKENS
   ============================================================ */
:root {
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);

  /* Layout */
  --header-height: calc(64px + var(--safe-top));
  --bottom-bar:    calc(56px + var(--safe-bottom));
  --modal-radius:  20px;
  --card-radius:   16px;
  --btn-radius:    12px;
  --input-radius:  10px;

  /* Motion */
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 280ms;
  --duration-slow: 450ms;

  /* Z-Layers */
  --z-base:    1;
  --z-card:    10;
  --z-header:  100;
  --z-modal:   1000;
  --z-toast:   2000;
}


/* ============================================================
   04. THEME: CLASSIC (DEFAULT)
   Modern · Notion/Duolingo style · Plus Jakarta Sans
   ============================================================ */
[data-theme="classic"] {
  /* Brand Colors */
  --color-accent:       #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-soft:  #dbeafe;
  --color-accent-glow:  rgba(37, 99, 235, 0.18);
  --color-success:      #10b981;
  --color-warning:      #f59e0b;
  --color-danger:       #ef4444;
  --color-premium:      #8b5cf6;

  /* Backgrounds */
  --bg-root:     #f8fafc;
  --bg-surface:  #ffffff;
  --bg-elevated: #ffffff;
  --bg-sunken:   #f1f5f9;
  --bg-overlay:  rgba(15, 23, 42, 0.55);

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-tertiary:  #94a3b8;
  --text-inverse:   #ffffff;
  --text-accent:    #2563eb;

  /* Borders */
  --border-subtle:  #e2e8f0;
  --border-default: #cbd5e1;
  --border-accent:  #2563eb;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.14), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-accent: 0 4px 20px rgba(37, 99, 235, 0.32);
  --shadow-card:   0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);

  /* Card Gradients */
  --card-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --card-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --card-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --card-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

  /* Header */
  --header-bg:     rgba(255, 255, 255, 0.88);
  --header-border: rgba(226, 232, 240, 0.8);
  --header-blur:   16px;

  /* Typography */
  --font-sans:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Font Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  /* Input */
  --input-bg:     #f8fafc;
  --input-border: #e2e8f0;
  --input-focus:  #2563eb;
  --input-text:   #0f172a;

  /* Modal */
  --modal-bg:     #ffffff;
  --modal-header: #f8fafc;

  /* Lobby */
  --lobby-tab-bg:          #f1f5f9;
  --lobby-tab-active-bg:   #ffffff;
  --lobby-tab-active-text: #2563eb;
  --lobby-tab-border:      #e2e8f0;
  --lobby-header-bg:       linear-gradient(135deg, rgba(37,99,235,0.08) 0%, rgba(139,92,246,0.06) 100%);
  --lobby-header-border:   rgba(37, 99, 235, 0.15);
  --dropzone-bg:           #f8fafc;
  --dropzone-border:       #cbd5e1;
  --dropzone-hover-bg:     #eff6ff;
  --dropzone-hover-border: #2563eb;
  --dropzone-icon-color:   #94a3b8;
  --dropzone-active-bg:    #dbeafe;
  --dropzone-active-border:#2563eb;
  --back-btn-bg:           #f1f5f9;
  --back-btn-color:        #475569;
  --back-btn-hover-bg:     #e2e8f0;
  --empty-state-icon-bg:   #f1f5f9;

  /* Scrollbar */
  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;

  /* Misc */
  --divider: #e2e8f0;
  --skeleton: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);

  /* ─── Oyun Motoru Değişkenleri ─── */
  --game-hud-bg:           rgba(255, 255, 255, 0.92);
  --game-hud-border:       #e2e8f0;
  --game-hud-blur:         16px;
  --game-viewport-bg:      #f8fafc;
  --game-card-bg:          #ffffff;
  --game-card-border:      #e2e8f0;
  --game-card-shadow:      0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --game-summary-bg:       linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  --game-summary-border:   #bfdbfe;
  --game-summary-text:     #1e40af;
  --game-quiz-bg:          #ffffff;
  --game-quiz-front-bg:    linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --game-quiz-back-bg:     linear-gradient(135deg, #059669 0%, #0891b2 100%);
  --game-quiz-text:        #ffffff;
  --game-test-bg:          #ffffff;
  --game-option-bg:        #f8fafc;
  --game-option-border:    #e2e8f0;
  --game-option-hover:     #eff6ff;
  --game-option-hover-border: #2563eb;
  --game-option-correct:   #dcfce7;
  --game-option-correct-border: #16a34a;
  --game-option-wrong:     #fee2e2;
  --game-option-wrong-border: #dc2626;
  --game-option-disabled:  #f1f5f9;
  --game-option-text:      #0f172a;
  --game-feedback-correct-bg: #f0fdf4;
  --game-feedback-correct-border: #86efac;
  --game-feedback-correct-text: #166534;
  --game-feedback-wrong-bg: #fff1f2;
  --game-feedback-wrong-border: #fca5a5;
  --game-feedback-wrong-text: #9f1239;
  --game-badge-summary-bg: #dbeafe;
  --game-badge-summary-color: #1d4ed8;
  --game-badge-quiz-bg:    #ede9fe;
  --game-badge-quiz-color: #5b21b6;
  --game-badge-test-bg:    #d1fae5;
  --game-badge-test-color: #065f46;
  --game-badge-fill-bg:    #fef3c7;
  --game-badge-fill-color: #92400e;
  --game-badge-match-bg:   #fce7f3;
  --game-badge-match-color:#9d174d;
  --game-progress-bg:      #e2e8f0;
  --game-progress-fill:    linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
  --game-footer-bg:        rgba(255, 255, 255, 0.95);
  --game-footer-border:    #e2e8f0;
  --game-exit-bg:          #fee2e2;
  --game-exit-color:       #dc2626;
  --game-exit-border:      #fca5a5;
  --game-nav-next-bg:      var(--color-accent);
  --game-nav-next-color:   #ffffff;
  --game-nav-back-bg:      #f1f5f9;
  --game-nav-back-color:   #475569;
  --game-score-bg:         #f0fdf4;
  --game-score-border:     #86efac;
  --game-score-color:      #065f46;
  --game-complete-bg:      linear-gradient(160deg, #eff6ff 0%, #f0fdf4 100%);
  --game-complete-score-color: var(--color-accent);

  /* ─── Module Hub Değişkenleri ─── */
  --hub-bg:                linear-gradient(160deg, #eff6ff 0%, #f0fdf4 100%);
  --hub-card-bg:           #ffffff;
  --hub-card-border:       #e2e8f0;
  --hub-card-shadow:       0 8px 32px rgba(37,99,235,0.10), 0 2px 8px rgba(0,0,0,0.05);
  --hub-learn-gradient:    linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --hub-test-gradient:     linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --hub-mixed-gradient:    linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --hub-btn-text:          #ffffff;

  /* ─── Fill-in-Blank Değişkenleri ─── */
  --fill-input-bg:         #f8fafc;
  --fill-input-border:     #cbd5e1;
  --fill-input-focus:      #2563eb;
  --fill-input-correct-bg: #dcfce7;
  --fill-input-correct-border: #16a34a;
  --fill-input-wrong-bg:   #fee2e2;
  --fill-input-wrong-border: #dc2626;

  /* ─── Matching Değişkenleri ─── */
  --match-item-bg:         #f8fafc;
  --match-item-border:     #e2e8f0;
  --match-item-hover-bg:   #eff6ff;
  --match-item-hover-border: #2563eb;
  --match-item-selected-bg:  #dbeafe;
  --match-item-selected-border: #2563eb;
  --match-item-correct-bg: #dcfce7;
  --match-item-correct-border: #16a34a;
  --match-item-wrong-bg:   #fee2e2;
  --match-item-wrong-border: #dc2626;
  --match-line-color:      rgba(37, 99, 235, 0.3);
}

[data-theme="classic"] body {
  font-family: var(--font-sans);
  background-color: var(--bg-root);
  color: var(--text-primary);
}


/* ============================================================
   05. THEME: CYBER
   Dark · Neon Green Hacker · JetBrains Mono
   ============================================================ */
[data-theme="cyber"] {
  /* Brand Colors */
  --color-accent:       #00ff41;
  --color-accent-hover: #00cc34;
  --color-accent-soft:  rgba(0, 255, 65, 0.12);
  --color-accent-glow:  rgba(0, 255, 65, 0.25);
  --color-success:      #00ff41;
  --color-warning:      #ffb700;
  --color-danger:       #ff3131;
  --color-premium:      #bf5fff;
  --color-secondary-accent: #00d4ff;

  /* Backgrounds */
  --bg-root:     #050505;
  --bg-surface:  #0d0d0d;
  --bg-elevated: #111111;
  --bg-sunken:   #030303;
  --bg-overlay:  rgba(0, 0, 0, 0.82);

  /* Text */
  --text-primary:   #d0d8e0;
  --text-secondary: #7a8a94;
  --text-tertiary:  #3d4f5c;
  --text-inverse:   #050505;
  --text-accent:    #00ff41;

  /* Borders */
  --border-subtle:  #1a1a1a;
  --border-default: #222222;
  --border-accent:  #00ff41;

  /* Shadows (neon glow) */
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.6);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.7);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.8);
  --shadow-xl:  0 24px 80px rgba(0,0,0,0.9);
  --shadow-accent: 0 0 20px rgba(0, 255, 65, 0.5), 0 0 40px rgba(0, 255, 65, 0.2);
  --shadow-card:   0 0 0 1px #1a1a1a, 0 4px 20px rgba(0,0,0,0.6);

  /* Card Gradients */
  --card-gradient-1: linear-gradient(135deg, #003300 0%, #001a00 100%);
  --card-gradient-2: linear-gradient(135deg, #001133 0%, #000a1a 100%);
  --card-gradient-3: linear-gradient(135deg, #1a0033 0%, #0d001a 100%);
  --card-gradient-4: linear-gradient(135deg, #330011 0%, #1a0008 100%);
  --card-gradient-5: linear-gradient(135deg, #0d1a00 0%, #050d00 100%);

  /* Header */
  --header-bg:     rgba(5, 5, 5, 0.92);
  --header-border: rgba(0, 255, 65, 0.15);
  --header-blur:   12px;

  /* Typography */
  --font-sans:    'JetBrains Mono', 'Courier New', monospace;
  --font-mono:    'JetBrains Mono', monospace;
  --font-display: 'JetBrains Mono', monospace;

  /* Font Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  /* Input */
  --input-bg:     #0d0d0d;
  --input-border: #1e2d1e;
  --input-focus:  #00ff41;
  --input-text:   #d0d8e0;

  /* Modal */
  --modal-bg:     #0d0d0d;
  --modal-header: #050505;

  /* Lobby */
  --lobby-tab-bg:          #0d0d0d;
  --lobby-tab-active-bg:   #111111;
  --lobby-tab-active-text: #00ff41;
  --lobby-tab-border:      rgba(0, 255, 65, 0.2);
  --lobby-header-bg:       linear-gradient(135deg, rgba(0,255,65,0.05) 0%, rgba(0,212,255,0.03) 100%);
  --lobby-header-border:   rgba(0, 255, 65, 0.2);
  --dropzone-bg:           #0d0d0d;
  --dropzone-border:       #1e2d1e;
  --dropzone-hover-bg:     #0a1a0a;
  --dropzone-hover-border: #00ff41;
  --dropzone-icon-color:   #3d4f5c;
  --dropzone-active-bg:    rgba(0, 255, 65, 0.08);
  --dropzone-active-border:#00ff41;
  --back-btn-bg:           #0d0d0d;
  --back-btn-color:        #7a8a94;
  --back-btn-hover-bg:     #111111;
  --empty-state-icon-bg:   #0d0d0d;

  /* Scrollbar */
  --scrollbar-track: #0d0d0d;
  --scrollbar-thumb: #1e2d1e;

  /* Misc */
  --divider: #1a1a1a;
  --skeleton: linear-gradient(90deg, #0d0d0d 25%, #1a1a1a 50%, #0d0d0d 75%);

  /* Unique cyber effects */
  --scanline-opacity: 0.03;
  --glitch-color-1: #00ff41;
  --glitch-color-2: #00d4ff;

  /* ─── Oyun Motoru — Cyber ─── */
  --game-hud-bg:           rgba(5, 5, 5, 0.94);
  --game-hud-border:       rgba(0, 255, 65, 0.2);
  --game-hud-blur:         12px;
  --game-viewport-bg:      #050505;
  --game-card-bg:          #0d0d0d;
  --game-card-border:      rgba(0, 255, 65, 0.2);
  --game-card-shadow:      0 0 0 1px rgba(0, 255, 65, 0.15), 0 8px 32px rgba(0,0,0,0.8);
  --game-summary-bg:       linear-gradient(135deg, #001a00 0%, #000d0d 100%);
  --game-summary-border:   rgba(0, 255, 65, 0.3);
  --game-summary-text:     #00ff41;
  --game-quiz-bg:          #0d0d0d;
  --game-quiz-front-bg:    linear-gradient(135deg, #001a00 0%, #000a1a 100%);
  --game-quiz-back-bg:     linear-gradient(135deg, #001a0d 0%, #001a1a 100%);
  --game-quiz-text:        #00ff41;
  --game-test-bg:          #0d0d0d;
  --game-option-bg:        #0d0d0d;
  --game-option-border:    rgba(0, 255, 65, 0.15);
  --game-option-hover:     rgba(0, 255, 65, 0.06);
  --game-option-hover-border: #00ff41;
  --game-option-correct:   rgba(0, 255, 65, 0.15);
  --game-option-correct-border: #00ff41;
  --game-option-wrong:     rgba(255, 49, 49, 0.15);
  --game-option-wrong-border: #ff3131;
  --game-option-disabled:  #080808;
  --game-option-text:      #d0d8e0;
  --game-feedback-correct-bg: rgba(0, 255, 65, 0.08);
  --game-feedback-correct-border: rgba(0, 255, 65, 0.4);
  --game-feedback-correct-text: #00ff41;
  --game-feedback-wrong-bg: rgba(255, 49, 49, 0.08);
  --game-feedback-wrong-border: rgba(255, 49, 49, 0.4);
  --game-feedback-wrong-text: #ff6666;
  --game-badge-summary-bg: rgba(0, 255, 65, 0.1);
  --game-badge-summary-color: #00ff41;
  --game-badge-quiz-bg:    rgba(0, 212, 255, 0.1);
  --game-badge-quiz-color: #00d4ff;
  --game-badge-test-bg:    rgba(191, 95, 255, 0.1);
  --game-badge-test-color: #bf5fff;
  --game-badge-fill-bg:    rgba(255, 183, 0, 0.1);
  --game-badge-fill-color: #ffb700;
  --game-badge-match-bg:   rgba(0, 212, 255, 0.08);
  --game-badge-match-color:#00d4ff;
  --game-progress-bg:      #1a1a1a;
  --game-progress-fill:    linear-gradient(90deg, #00ff41 0%, #00d4ff 100%);
  --game-footer-bg:        rgba(5, 5, 5, 0.96);
  --game-footer-border:    rgba(0, 255, 65, 0.15);
  --game-exit-bg:          rgba(255, 49, 49, 0.1);
  --game-exit-color:       #ff3131;
  --game-exit-border:      rgba(255, 49, 49, 0.3);
  --game-nav-next-bg:      #00ff41;
  --game-nav-next-color:   #050505;
  --game-nav-back-bg:      #111111;
  --game-nav-back-color:   #7a8a94;
  --game-score-bg:         rgba(0, 255, 65, 0.08);
  --game-score-border:     rgba(0, 255, 65, 0.3);
  --game-score-color:      #00ff41;
  --game-complete-bg:      linear-gradient(160deg, #001a00 0%, #000a1a 100%);
  --game-complete-score-color: #00ff41;

  /* ─── Module Hub — Cyber ─── */
  --hub-bg:                linear-gradient(160deg, #001a00 0%, #000a1a 100%);
  --hub-card-bg:           #0d0d0d;
  --hub-card-border:       rgba(0, 255, 65, 0.2);
  --hub-card-shadow:       0 0 0 1px rgba(0, 255, 65, 0.15), 0 8px 32px rgba(0,0,0,0.8);
  --hub-learn-gradient:    linear-gradient(135deg, #003300 0%, #001a0d 100%);
  --hub-test-gradient:     linear-gradient(135deg, #001133 0%, #000a1a 100%);
  --hub-mixed-gradient:    linear-gradient(135deg, #0d1a00 0%, #050d00 100%);
  --hub-btn-text:          #00ff41;

  /* ─── Fill-in-Blank — Cyber ─── */
  --fill-input-bg:         #0d0d0d;
  --fill-input-border:     rgba(0, 255, 65, 0.2);
  --fill-input-focus:      #00ff41;
  --fill-input-correct-bg: rgba(0, 255, 65, 0.12);
  --fill-input-correct-border: #00ff41;
  --fill-input-wrong-bg:   rgba(255, 49, 49, 0.12);
  --fill-input-wrong-border: #ff3131;

  /* ─── Matching — Cyber ─── */
  --match-item-bg:         #0d0d0d;
  --match-item-border:     rgba(0, 255, 65, 0.15);
  --match-item-hover-bg:   rgba(0, 255, 65, 0.06);
  --match-item-hover-border: #00ff41;
  --match-item-selected-bg:  rgba(0, 255, 65, 0.12);
  --match-item-selected-border: #00ff41;
  --match-item-correct-bg: rgba(0, 255, 65, 0.15);
  --match-item-correct-border: #00ff41;
  --match-item-wrong-bg:   rgba(255, 49, 49, 0.15);
  --match-item-wrong-border: #ff3131;
  --match-line-color:      rgba(0, 255, 65, 0.4);
}

[data-theme="cyber"] body {
  font-family: var(--font-sans);
  background-color: var(--bg-root);
  color: var(--text-primary);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 65, 0.015) 2px,
      rgba(0, 255, 65, 0.015) 4px
    );
}


/* ============================================================
   06. THEME: ARCADE
   Deep Purple/Black · Neon Pink & Yellow · Pixel/Retro
   ============================================================ */
[data-theme="arcade"] {
  /* Brand Colors */
  --color-accent:       #ff2a6d;
  --color-accent-hover: #e0005a;
  --color-accent-soft:  rgba(255, 42, 109, 0.15);
  --color-accent-glow:  rgba(255, 42, 109, 0.35);
  --color-success:      #05ffa1;
  --color-warning:      #f5e642;
  --color-danger:       #ff2a6d;
  --color-premium:      #f5e642;
  --color-secondary-accent: #01c8ee;

  /* Backgrounds */
  --bg-root:     #0a0010;
  --bg-surface:  #12001e;
  --bg-elevated: #180028;
  --bg-sunken:   #060008;
  --bg-overlay:  rgba(0, 0, 0, 0.85);

  /* Text */
  --text-primary:   #f0e6ff;
  --text-secondary: #9370b8;
  --text-tertiary:  #5a3a7a;
  --text-inverse:   #0a0010;
  --text-accent:    #ff2a6d;

  /* Borders */
  --border-subtle:  #1e0030;
  --border-default: #2d0044;
  --border-accent:  #ff2a6d;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.8);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.85);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.9);
  --shadow-xl:  0 24px 80px rgba(0,0,0,0.95);
  --shadow-accent: 0 0 16px rgba(255, 42, 109, 0.7), 0 0 40px rgba(255, 42, 109, 0.3), inset 0 0 20px rgba(255, 42, 109, 0.1);
  --shadow-card:   0 0 0 2px #ff2a6d, 0 4px 24px rgba(255, 42, 109, 0.2);

  /* Card Gradients */
  --card-gradient-1: linear-gradient(135deg, #3d0060 0%, #180028 100%);
  --card-gradient-2: linear-gradient(135deg, #600020 0%, #280010 100%);
  --card-gradient-3: linear-gradient(135deg, #003060 0%, #001028 100%);
  --card-gradient-4: linear-gradient(135deg, #003330 0%, #001410 100%);
  --card-gradient-5: linear-gradient(135deg, #333300 0%, #141400 100%);

  /* Header */
  --header-bg:     rgba(10, 0, 16, 0.94);
  --header-border: rgba(255, 42, 109, 0.4);
  --header-blur:   8px;

  /* Typography */
  --font-sans:    'Courier New', 'Lucida Console', monospace;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'Courier New', monospace;

  /* Font Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  /* Input */
  --input-bg:     #0e0018;
  --input-border: #2d0044;
  --input-focus:  #ff2a6d;
  --input-text:   #f0e6ff;

  /* Modal */
  --modal-bg:     #12001e;
  --modal-header: #0a0010;

  /* Lobby */
  --lobby-tab-bg:          #0a0010;
  --lobby-tab-active-bg:   #12001e;
  --lobby-tab-active-text: #ff2a6d;
  --lobby-tab-border:      rgba(255, 42, 109, 0.3);
  --lobby-header-bg:       linear-gradient(135deg, rgba(255,42,109,0.07) 0%, rgba(245,230,66,0.04) 100%);
  --lobby-header-border:   rgba(255, 42, 109, 0.35);
  --dropzone-bg:           #0a0010;
  --dropzone-border:       #2d0044;
  --dropzone-hover-bg:     #12001e;
  --dropzone-hover-border: #ff2a6d;
  --dropzone-icon-color:   #5a3a7a;
  --dropzone-active-bg:    rgba(255, 42, 109, 0.1);
  --dropzone-active-border:#ff2a6d;
  --back-btn-bg:           #12001e;
  --back-btn-color:        #9370b8;
  --back-btn-hover-bg:     #1e0030;
  --empty-state-icon-bg:   #12001e;

  /* Scrollbar */
  --scrollbar-track: #0a0010;
  --scrollbar-thumb: #2d0044;

  /* Misc */
  --divider: #1e0030;
  --skeleton: linear-gradient(90deg, #12001e 25%, #1e0030 50%, #12001e 75%);

  /* Arcade-specific */
  --border-radius-override: 0px;
  --pixel-border: 2px solid #ff2a6d;

  /* ─── Oyun Motoru — Arcade ─── */
  --game-hud-bg:           rgba(10, 0, 16, 0.96);
  --game-hud-border:       rgba(255, 42, 109, 0.5);
  --game-hud-blur:         8px;
  --game-viewport-bg:      #0a0010;
  --game-card-bg:          #12001e;
  --game-card-border:      rgba(255, 42, 109, 0.4);
  --game-card-shadow:      0 0 0 2px rgba(255, 42, 109, 0.3), 0 8px 32px rgba(0,0,0,0.9);
  --game-summary-bg:       linear-gradient(135deg, #12001e 0%, #060008 100%);
  --game-summary-border:   rgba(255, 42, 109, 0.5);
  --game-summary-text:     #f0e6ff;
  --game-quiz-bg:          #12001e;
  --game-quiz-front-bg:    linear-gradient(135deg, #3d0060 0%, #180028 100%);
  --game-quiz-back-bg:     linear-gradient(135deg, #003060 0%, #001428 100%);
  --game-quiz-text:        #f0e6ff;
  --game-test-bg:          #12001e;
  --game-option-bg:        #0a0010;
  --game-option-border:    rgba(255, 42, 109, 0.3);
  --game-option-hover:     rgba(255, 42, 109, 0.08);
  --game-option-hover-border: #ff2a6d;
  --game-option-correct:   rgba(5, 255, 161, 0.12);
  --game-option-correct-border: #05ffa1;
  --game-option-wrong:     rgba(255, 42, 109, 0.15);
  --game-option-wrong-border: #ff2a6d;
  --game-option-disabled:  #060008;
  --game-option-text:      #f0e6ff;
  --game-feedback-correct-bg: rgba(5, 255, 161, 0.1);
  --game-feedback-correct-border: rgba(5, 255, 161, 0.4);
  --game-feedback-correct-text: #05ffa1;
  --game-feedback-wrong-bg: rgba(255, 42, 109, 0.1);
  --game-feedback-wrong-border: rgba(255, 42, 109, 0.4);
  --game-feedback-wrong-text: #ff6a96;
  --game-badge-summary-bg: rgba(255, 42, 109, 0.15);
  --game-badge-summary-color: #ff2a6d;
  --game-badge-quiz-bg:    rgba(245, 230, 66, 0.12);
  --game-badge-quiz-color: #f5e642;
  --game-badge-test-bg:    rgba(1, 200, 238, 0.12);
  --game-badge-test-color: #01c8ee;
  --game-badge-fill-bg:    rgba(245, 230, 66, 0.12);
  --game-badge-fill-color: #f5e642;
  --game-badge-match-bg:   rgba(1, 200, 238, 0.12);
  --game-badge-match-color:#01c8ee;
  --game-progress-bg:      #1e0030;
  --game-progress-fill:    linear-gradient(90deg, #ff2a6d 0%, #f5e642 100%);
  --game-footer-bg:        rgba(10, 0, 16, 0.97);
  --game-footer-border:    rgba(255, 42, 109, 0.4);
  --game-exit-bg:          rgba(255, 42, 109, 0.12);
  --game-exit-color:       #ff2a6d;
  --game-exit-border:      rgba(255, 42, 109, 0.4);
  --game-nav-next-bg:      #ff2a6d;
  --game-nav-next-color:   #0a0010;
  --game-nav-back-bg:      #12001e;
  --game-nav-back-color:   #9370b8;
  --game-score-bg:         rgba(245, 230, 66, 0.08);
  --game-score-border:     rgba(245, 230, 66, 0.3);
  --game-score-color:      #f5e642;
  --game-complete-bg:      linear-gradient(160deg, #18002e 0%, #060012 100%);
  --game-complete-score-color: #f5e642;

  /* ─── Module Hub — Arcade ─── */
  --hub-bg:                linear-gradient(160deg, #18002e 0%, #060012 100%);
  --hub-card-bg:           #12001e;
  --hub-card-border:       rgba(255, 42, 109, 0.4);
  --hub-card-shadow:       0 0 0 2px rgba(255, 42, 109, 0.3), 0 8px 32px rgba(0,0,0,0.9);
  --hub-learn-gradient:    linear-gradient(135deg, #3d0060 0%, #180028 100%);
  --hub-test-gradient:     linear-gradient(135deg, #600020 0%, #280010 100%);
  --hub-mixed-gradient:    linear-gradient(135deg, #003060 0%, #001028 100%);
  --hub-btn-text:          #f0e6ff;

  /* ─── Fill-in-Blank — Arcade ─── */
  --fill-input-bg:         #0e0018;
  --fill-input-border:     rgba(255, 42, 109, 0.3);
  --fill-input-focus:      #ff2a6d;
  --fill-input-correct-bg: rgba(5, 255, 161, 0.12);
  --fill-input-correct-border: #05ffa1;
  --fill-input-wrong-bg:   rgba(255, 42, 109, 0.15);
  --fill-input-wrong-border: #ff2a6d;

  /* ─── Matching — Arcade ─── */
  --match-item-bg:         #0a0010;
  --match-item-border:     rgba(255, 42, 109, 0.3);
  --match-item-hover-bg:   rgba(255, 42, 109, 0.08);
  --match-item-hover-border: #ff2a6d;
  --match-item-selected-bg:  rgba(255, 42, 109, 0.15);
  --match-item-selected-border: #ff2a6d;
  --match-item-correct-bg: rgba(5, 255, 161, 0.12);
  --match-item-correct-border: #05ffa1;
  --match-item-wrong-bg:   rgba(255, 42, 109, 0.15);
  --match-item-wrong-border: #ff2a6d;
  --match-line-color:      rgba(255, 42, 109, 0.4);
}

[data-theme="arcade"] body {
  font-family: var(--font-sans);
  background-color: var(--bg-root);
  color: var(--text-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255, 42, 109, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(1, 200, 238, 0.04) 0%, transparent 60%);
}

/* Arcade tüm elemanlara sharp köşe uygular */
[data-theme="arcade"] *:not(body):not(html) {
  border-radius: 0 !important;
}


/* ============================================================
   07. SCROLLBAR STYLES (cross-theme)
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track, transparent);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb, #ccc);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb, #ccc) var(--scrollbar-track, transparent);
}


/* ============================================================
   08. GLOBAL COMPONENT BASE STYLES (theme-agnostic structure)
   ============================================================ */

/* ─── App Shell ─── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--bg-root);
  position: relative;
}

/* ─── Header / HUD ─── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  padding-top: var(--safe-top);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(var(--header-blur));
  -webkit-backdrop-filter: blur(var(--header-blur));
  display: flex;
  align-items: center;
  padding-left: clamp(12px, 4vw, 24px);
  padding-right: clamp(12px, 4vw, 24px);
  gap: 12px;
}

.header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

/* ─── Player Profile Chip ─── */
.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
  cursor: pointer;
  transition: box-shadow var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.player-chip:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-default);
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  border: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-sans);
  flex-shrink: 0;
}

.player-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.player-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.player-status {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

/* ─── Spacer ─── */
.header-spacer {
  flex: 1;
}

/* ─── Header Action Buttons ─── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--btn-radius);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.btn-lang {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ─── Primary CTA Button ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 38px;
  background: var(--color-accent);
  color: var(--text-inverse);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  box-shadow: var(--shadow-accent);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-accent), 0 8px 30px var(--color-accent-glow);
}

.btn-primary:hover::before {
  opacity: 1;
}

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

/* ─── Secondary Button ─── */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  height: 44px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

/* ─── Main Content Area ─── */
.app-main {
  flex: 1;
  padding-top: var(--header-height);
  padding-bottom: var(--safe-bottom);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.main-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px clamp(12px, 4vw, 32px);
}

/* ─── Dashboard Welcome Banner ─── */
.dashboard-hero {
  margin-bottom: 32px;
  animation: fadeSlideUp 0.5s var(--ease-spring) both;
}

.dashboard-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.dashboard-hero-title span {
  color: var(--color-accent);
}

.dashboard-hero-sub {
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 400;
}

/* ─── Section Labels ─── */
.section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ─── Mode Cards Grid ─── */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ─── Mode Card ─── */
.mode-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-base) var(--ease-spring),
              box-shadow var(--duration-base) var(--ease-smooth);
  animation: fadeSlideUp 0.5s var(--ease-spring) both;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.mode-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.mode-card:active {
  transform: translateY(-1px) scale(0.99);
}

.mode-card-bg {
  position: absolute;
  inset: 0;
  opacity: 0.92;
  transition: opacity var(--duration-base);
}

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

.mode-card-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.mode-card-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.mode-card-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-display);
  margin-bottom: 6px;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.mode-card-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.82);
  font-family: var(--font-sans);
  line-height: 1.5;
  flex: 1;
}

.mode-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-top: 14px;
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  backdrop-filter: blur(4px);
  width: fit-content;
  letter-spacing: 0.03em;
  font-family: var(--font-sans);
}

.mode-card-badge.badge-new  { background: rgba(16, 185, 129, 0.9); }
.mode-card-badge.badge-hot  { background: rgba(239, 68, 68, 0.9); }
.mode-card-badge.badge-soon { background: rgba(100, 100, 100, 0.6); }

/* ─── Stats Strip ─── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  animation: fadeSlideUp 0.45s var(--ease-spring) 0.1s both;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Modal Overlay ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--bg-overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--safe-bottom);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-smooth);
}

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

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding-bottom: 0;
  }
}

/* ─── Modal Sheet ─── */
.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--modal-bg);
  border-radius: var(--modal-radius) var(--modal-radius) 0 0;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  box-shadow: var(--shadow-xl);
  max-height: 92dvh;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(40px);
  transition: transform var(--duration-slow) var(--ease-spring);
}

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

@media (min-width: 600px) {
  .modal-sheet {
    border-radius: var(--modal-radius);
    border-bottom: 1px solid var(--border-subtle);
    max-height: 88dvh;
    max-height: 88vh;
  }
}

/* ─── Modal Drag Handle ─── */
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-default);
  border-radius: 99px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .modal-handle { display: none; }
}

/* ─── Modal Header ─── */
.modal-header {
  background: var(--modal-header);
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}

/* ─── Modal Tabs ─── */
.modal-tabs {
  display: flex;
  padding: 12px 20px 0;
  gap: 4px;
  border-bottom: 1px solid var(--divider);
  background: var(--modal-bg);
  flex-shrink: 0;
}

.modal-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--btn-radius) var(--btn-radius) 0 0;
  border-bottom: 3px solid transparent;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.modal-tab:hover {
  color: var(--text-primary);
  background: var(--bg-sunken);
}

.modal-tab.tab-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 700;
}

/* ─── Modal Body ─── */
.modal-body {
  padding: 24px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* ─── Form Elements ─── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  font-family: var(--font-sans);
}

.form-label.required::after {
  content: ' *';
  color: var(--color-danger);
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--input-radius);
  font-size: var(--text-base);
  color: var(--input-text);
  font-family: var(--font-sans);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-input.input-password {
  padding-right: 44px;
}

.form-input-wrapper {
  position: relative;
}

.input-icon-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 18px;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

/* ─── Modal Footer ─── */
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--divider);
  background: var(--modal-bg);
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
  height: 52px;
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--btn-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ─── Divider with text ─── */
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ─── Info Note ─── */
.form-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  margin-top: 6px;
  line-height: 1.5;
}

/* ─── Toast Notification ─── */
.toast-container {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.toast {
  background: var(--text-primary);
  color: var(--bg-root);
  padding: 12px 20px;
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  animation: toastIn 0.35s var(--ease-spring) both;
}

/* ─── Skeleton Loader ─── */
.skeleton {
  background: var(--skeleton);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--btn-radius);
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

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

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}


/* ============================================================
   09. SPA VIEW ROUTING — view-section transitions
   ============================================================ */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  will-change: opacity, transform;
}

.view-section.active {
  display: block;
  animation: viewEnter var(--duration-slow) var(--ease-spring) both;
}

.view-section.exiting {
  display: block;
  animation: viewExit var(--duration-base) var(--ease-smooth) both;
  pointer-events: none;
}

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

@keyframes viewExit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-12px) scale(0.99); }
}

/* ─── #view-game özel görünüm (flex layout) ─── */
#view-game.active {
  display: flex !important;
}

#view-game {
  height: calc(100dvh - var(--header-height));
  display: none;
  flex-direction: column;
  background: var(--bg-root);
  overflow: hidden;
}

/* ─── #view-module-hub özel görünüm ─── */
#view-module-hub {
  min-height: calc(100dvh - var(--header-height));
}


/* ============================================================
   10. LOBİ (LOBBY) ARAYÜZÜ STİLLERİ
   ============================================================ */

/* ─── Lobi Wrapper ─── */
.lobby-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px clamp(12px, 4vw, 32px) 40px;
}

/* ─── Lobi Üst Başlık Bandı ─── */
.lobby-header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--lobby-header-bg);
  border: 1px solid var(--lobby-header-border);
  border-radius: var(--card-radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeSlideUp 0.4s var(--ease-spring) both;
}

.lobby-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--back-btn-bg);
  color: var(--back-btn-color);
  border: 1px solid var(--border-subtle);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.lobby-back-btn:hover {
  background: var(--back-btn-hover-bg);
  color: var(--text-primary);
  transform: translateX(-2px);
  box-shadow: var(--shadow-md);
}

.lobby-back-btn:active {
  transform: translateX(0);
}

.lobby-back-arrow {
  font-size: 1.1em;
  line-height: 1;
  display: inline-block;
  transition: transform var(--duration-fast);
}

.lobby-back-btn:hover .lobby-back-arrow {
  transform: translateX(-3px);
}

.lobby-title-block {
  flex: 1;
  min-width: 0;
}

.lobby-mode-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  margin-bottom: 3px;
}

.lobby-mode-name {
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-mode-name span.lobby-mode-accent {
  color: var(--color-accent);
}

/* ─── Lobi Sekme Navigasyonu ─── */
.lobby-tabs-nav {
  display: flex;
  gap: 0;
  background: var(--lobby-tab-bg);
  border: 1px solid var(--lobby-tab-border);
  border-radius: var(--card-radius);
  padding: 4px;
  margin-bottom: 20px;
  animation: fadeSlideUp 0.4s var(--ease-spring) 0.05s both;
}

.lobby-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: calc(var(--card-radius) - 4px);
  background: transparent;
  border: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-smooth);
  white-space: nowrap;
  position: relative;
}

.lobby-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.lobby-tab-btn.lobby-tab-active {
  background: var(--lobby-tab-active-bg);
  color: var(--lobby-tab-active-text);
  box-shadow: var(--shadow-sm);
}

.lobby-tab-icon  { font-size: 1em; line-height: 1; }
.lobby-tab-label { display: none; }

@media (min-width: 480px) {
  .lobby-tab-label { display: inline; }
}

/* ─── Lobi Panel İçerikleri ─── */
.lobby-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.lobby-panel.lobby-panel-active {
  display: block;
  animation: lobbyPanelEnter 0.3s var(--ease-spring) both;
}

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

/* ─── Lobi: Boş Durum ─── */
.lobby-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  gap: 12px;
}

.lobby-empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--empty-state-icon-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 4px;
  box-shadow: var(--shadow-sm);
}

.lobby-empty-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-display);
  line-height: 1.3;
}

.lobby-empty-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  line-height: 1.6;
  max-width: 300px;
}

.lobby-empty-action {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  height: 40px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
}

.lobby-empty-action:hover {
  background: var(--color-accent);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

/* ─── Lobi: Klan kilit rozeti ─── */
.lobby-clan-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ─── Dropzone Alanı ─── */
.lobby-upload-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 10px;
}

.lobby-upload-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lobby-upload-intro-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lobby-upload-intro-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  line-height: 1.6;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  background: var(--dropzone-bg);
  border: 2px dashed var(--dropzone-border);
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-smooth);
  text-align: center;
  min-height: 220px;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity var(--duration-base);
  pointer-events: none;
  border-radius: inherit;
}

.dropzone:hover {
  background: var(--dropzone-hover-bg);
  border-color: var(--dropzone-hover-border);
  border-style: solid;
  transform: scale(1.005);
}

.dropzone:hover::before { opacity: 0.03; }

.dropzone.dropzone-dragover {
  background: var(--dropzone-active-bg);
  border-color: var(--dropzone-active-border);
  border-style: solid;
  transform: scale(1.01);
  box-shadow: 0 0 0 4px var(--color-accent-glow), var(--shadow-md);
}

.dropzone.dropzone-dragover::before { opacity: 0.05; }

.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.dropzone-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--empty-state-icon-bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: all var(--duration-base) var(--ease-spring);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.dropzone:hover .dropzone-icon-wrap,
.dropzone.dropzone-dragover .dropzone-icon-wrap {
  transform: scale(1.1) translateY(-3px);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.dropzone-main-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1.3;
  pointer-events: none;
}

.dropzone-sub-text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  line-height: 1.5;
  pointer-events: none;
}

.dropzone-sub-text strong {
  color: var(--color-accent);
  font-weight: 700;
}

.dropzone-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  pointer-events: none;
}

.dropzone-format-chip {
  padding: 3px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.lobby-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lobby-or-divider::before,
.lobby-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ─── Metin Yapıştırma ─── */
.lobby-paste-area    { display: flex; flex-direction: column; gap: 8px; }
.lobby-paste-label   { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); font-family: var(--font-sans); display: flex; align-items: center; gap: 6px; }

.lobby-paste-textarea {
  width: 100%;
  min-height: 120px;
  max-height: 280px;
  padding: 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--input-radius);
  font-size: var(--text-sm);
  color: var(--input-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  -webkit-appearance: none;
}

.lobby-paste-textarea::placeholder { color: var(--text-tertiary); font-style: italic; }
.lobby-paste-textarea:focus        { border-color: var(--input-focus); box-shadow: 0 0 0 3px var(--color-accent-glow); }

/* ─── Üretim Ayarları Satırı ─── */
.lobby-generate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--bg-surface);
  padding: 14px 0 4px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.lobby-generate-btn {
  flex: 1;
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  background: var(--color-accent);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--btn-radius);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  box-shadow: var(--shadow-accent);
  position: relative;
  overflow: hidden;
}

.lobby-generate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.lobby-generate-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-accent), 0 8px 30px var(--color-accent-glow);
}

.lobby-generate-btn:hover::before { opacity: 1; }
.lobby-generate-btn:active        { transform: translateY(0) scale(0.98); }
.lobby-generate-btn:disabled      { opacity: 0.5; cursor: not-allowed; transform: none; }

.lobby-count-select {
  height: 50px;
  padding: 0 34px 0 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--input-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--input-text);
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  flex-shrink: 0;
}

.lobby-count-select:focus { border-color: var(--input-focus); box-shadow: 0 0 0 3px var(--color-accent-glow); }

/* ─── Dosya Listesi ─── */
.dropzone-file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.dropzone-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--btn-radius);
  box-shadow: var(--shadow-sm);
  animation: fadeSlideUp 0.25s var(--ease-spring) both;
}

.dropzone-file-icon   { font-size: 1.25rem; flex-shrink: 0; }
.dropzone-file-name   { flex: 1; font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); font-family: var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-file-size   { font-size: var(--text-xs); color: var(--text-tertiary); font-family: var(--font-mono); flex-shrink: 0; }
.dropzone-file-remove { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-sunken); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-tertiary); cursor: pointer; flex-shrink: 0; transition: all var(--duration-fast); }
.dropzone-file-remove:hover { background: var(--color-danger); color: white; border-color: var(--color-danger); }

/* ─── Info Banner ─── */
.lobby-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-glow);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  color: var(--text-accent);
  font-family: var(--font-sans);
  line-height: 1.5;
}

.lobby-info-banner-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ─── Tema Özel Lobi Efektleri ─── */
[data-theme="cyber"] .dropzone               { border-color: #1e2d1e; }
[data-theme="cyber"] .dropzone:hover         { border-color: var(--color-accent); box-shadow: 0 0 20px rgba(0, 255, 65, 0.1); }
[data-theme="cyber"] .dropzone.dropzone-dragover { box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.3), 0 0 40px rgba(0, 255, 65, 0.2); }
[data-theme="cyber"] .lobby-tabs-nav         { border-color: rgba(0, 255, 65, 0.15); }
[data-theme="cyber"] .lobby-tab-btn.lobby-tab-active { box-shadow: 0 0 10px rgba(0, 255, 65, 0.15); border-bottom: 2px solid var(--color-accent); }
[data-theme="cyber"] .lobby-generate-btn     { animation: cyberPulse 3s ease-in-out infinite; }
[data-theme="cyber"] .lobby-mode-name        { text-shadow: 0 0 20px rgba(0, 255, 65, 0.3); }

[data-theme="arcade"] .lobby-header-bar      { border-width: 2px; }
[data-theme="arcade"] .lobby-tabs-nav        { border-width: 2px; }
[data-theme="arcade"] .lobby-tab-btn.lobby-tab-active { border: 2px solid var(--color-accent); outline: none; }
[data-theme="arcade"] .dropzone              { border-width: 2px; }
[data-theme="arcade"] .dropzone.dropzone-dragover    { box-shadow: 0 0 0 3px rgba(255, 42, 109, 0.5), 0 0 30px rgba(255, 42, 109, 0.3); }
[data-theme="arcade"] .lobby-generate-btn    { text-transform: uppercase; letter-spacing: 0.06em; animation: arcadeFlicker 5s step-start infinite; }
[data-theme="arcade"] .lobby-mode-name       { text-transform: uppercase; letter-spacing: 0.04em; }


/* ============================================================
   11. ANIMASYONLAR (KEYFRAMES)
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

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

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

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes cyberPulse {
  0%, 100% { box-shadow: var(--shadow-accent); }
  50%       { box-shadow: 0 0 30px rgba(0, 255, 65, 0.7), 0 0 60px rgba(0, 255, 65, 0.3); }
}

@keyframes arcadeFlicker {
  0%, 95%, 100% { opacity: 1; }
  96%            { opacity: 0.7; }
  97%            { opacity: 1; }
  98%            { opacity: 0.85; }
}

@keyframes gameSlideIn {
  from { opacity: 0; transform: translateX(30px) scale(0.98); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes gameSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(-30px) scale(0.98); }
}

@keyframes gameCompleteIconPop {
  from { transform: scale(0.4) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes gameCompleteScoreCount {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes gameOptionFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes matchItemPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

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

@keyframes fillCorrectPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Staggered mode card animation delays */
.mode-card:nth-child(1) { animation-delay: 0.05s; }
.mode-card:nth-child(2) { animation-delay: 0.10s; }
.mode-card:nth-child(3) { animation-delay: 0.15s; }
.mode-card:nth-child(4) { animation-delay: 0.20s; }
.mode-card:nth-child(5) { animation-delay: 0.25s; }
.mode-card:nth-child(6) { animation-delay: 0.30s; }


/* ============================================================
   12. OYUN MOTORU — GAME ENGINE STİLLERİ
   ============================================================ */

/* ─── Oyun HUD (üst bant) ─── */
.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(10px, 3vw, 20px);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  height: 70px;
  flex-shrink: 0;
  gap: 16px;
}

/* ─── Oyundan Çıkış Butonu ─── */
.game-exit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-sunken);
  color: var(--text-secondary);
  border: none;
  padding: 8px 14px;
  border-radius: var(--btn-radius);
  font-weight: 700;
  font-family: var(--font-sans);
  transition: all 0.2s;
  flex-shrink: 0;
}

.game-exit-btn:hover   { background: var(--color-danger); color: white; }
.game-exit-label       { display: none; }
.game-exit-arrow       { font-size: 14px; line-height: 1; }

@media (min-width: 480px) {
  .game-exit-label { display: inline; }
}

/* ─── İlerleme Çubuğu ─── */
.game-progress-wrap {
  flex: 1;
  max-width: 400px;
  height: 12px;
  background: var(--bg-sunken);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.game-progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 20px;
  transition: width 0.4s var(--ease-spring);
}

.game-progress-label {
  position: absolute;
  top: -20px;
  opacity: 0;
}

/* ─── Puan Chip ─── */
.game-score-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-warning);
  color: #000;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.game-score-icon  { font-size: 14px; line-height: 1; }

.game-score-value {
  font-size: var(--text-sm);
  font-weight: 800;
  font-family: var(--font-mono);
  min-width: 24px;
  text-align: right;
  transition: color var(--duration-base);
}

/* ─── Oyun Viewport ─── */
.game-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 30px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Adım Geçiş Animasyonları ─── */
.game-step-enter { animation: gameSlideIn 0.4s var(--ease-spring) both; }
.game-step-exit  { animation: gameSlideOut 0.3s var(--ease-smooth) both; }

/* ─── Ortak Kart Yapısı ─── */
.game-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  margin: auto;
}

/* ─── Kart Rozeti ─── */
.game-card-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-subtle);
}

.game-badge-label   { font-weight: 800; color: var(--color-accent); font-size: var(--text-sm); }
.game-badge-counter { margin-left: auto; font-family: var(--font-mono); color: var(--text-tertiary); font-size: var(--text-xs); }
.game-badge-icon    { font-size: 1rem; line-height: 1; }

/* Rozet renk varyantları */
.game-card-summary .game-card-badge  { background: var(--game-badge-summary-bg); }
.game-card-summary .game-badge-label,
.game-card-summary .game-badge-icon  { color: var(--game-badge-summary-color); }

.game-card-quiz .game-card-badge     { background: var(--game-badge-quiz-bg); }
.game-card-quiz .game-badge-label,
.game-card-quiz .game-badge-icon     { color: var(--game-badge-quiz-color); }

.game-card-test .game-card-badge     { background: var(--game-badge-test-bg); }
.game-card-test .game-badge-label,
.game-card-test .game-badge-icon     { color: var(--game-badge-test-color); }

.game-card-fill .game-card-badge     { background: var(--game-badge-fill-bg); }
.game-card-fill .game-badge-label,
.game-card-fill .game-badge-icon     { color: var(--game-badge-fill-color); }

.game-card-match .game-card-badge    { background: var(--game-badge-match-bg); }
.game-card-match .game-badge-label,
.game-card-match .game-badge-icon    { color: var(--game-badge-match-color); }

/* ─── Özet Adımı ─── */
.game-summary-text {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.game-card-footer-hint {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ─── Flashcard (Quiz) ─── */
.game-flashcard-scene {
  perspective: 1000px;
  width: 100%;
  min-height: 250px;
}

.game-flashcard {
  width: 100%;
  height: 100%;
  min-height: 250px;
  position: relative;
  transition: transform 0.6s var(--ease-spring);
  transform-style: preserve-3d;
  cursor: pointer;
}

.game-flashcard.game-flashcard-flipped {
  transform: rotateX(180deg);
}

.game-flashcard-front,
.game-flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--card-radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 2px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.game-flashcard-back {
  transform: rotateX(180deg);
  border-color: var(--color-success);
}

.game-flashcard-label {
  position: absolute;
  top: 16px; left: 20px;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
}

.game-flashcard-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.game-flip-hint {
  position: absolute;
  bottom: 16px;
  font-size: var(--text-xs);
  color: var(--color-accent);
  animation: pulse 2s infinite;
}

.game-flip-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: none;
  border-radius: var(--btn-radius);
  font-weight: 700;
  font-size: var(--text-base);
  transition: background 0.2s;
}

.game-flip-btn:hover { background: var(--color-accent); color: var(--text-inverse); }

/* ─── Test (Çoktan Seçmeli) ─── */
.game-test-question {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.game-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-option-btn {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 16px;
  padding: 16px;
  background: var(--bg-sunken);
  border: 2px solid var(--border-subtle);
  border-radius: var(--btn-radius);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 0.2s;
  animation: gameOptionFadeIn 0.25s var(--ease-spring) both;
}

.game-option-btn:nth-child(1) { animation-delay: 0.02s; }
.game-option-btn:nth-child(2) { animation-delay: 0.06s; }
.game-option-btn:nth-child(3) { animation-delay: 0.10s; }
.game-option-btn:nth-child(4) { animation-delay: 0.14s; }
.game-option-btn:nth-child(5) { animation-delay: 0.18s; }

.game-option-btn:not(:disabled):hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  transform: translateX(4px);
}

.game-option-letter {
  background: var(--bg-surface);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.game-option-correct {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: var(--color-success) !important;
}

.game-option-correct .game-option-letter {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.game-option-wrong {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: var(--color-danger) !important;
  opacity: 0.8;
}

.game-option-wrong .game-option-letter {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.game-option-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Geri Bildirim Bandı ─── */
.game-feedback-band {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--btn-radius);
  animation: fadeSlideUp 0.3s var(--ease-spring);
}

.game-feedback-correct {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--color-success);
}

.game-feedback-wrong {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--color-danger);
}

.game-feedback-result      { font-weight: 800; font-size: var(--text-lg); margin-bottom: 8px; }
.game-feedback-explanation { font-size: var(--text-sm); line-height: 1.6; color: var(--text-secondary); }

/* ─── Footer (Navigasyon) ─── */
.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 40px);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 10;
}

.game-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--btn-radius);
  font-weight: 800;
  font-size: var(--text-base);
  transition: all 0.2s;
  border: none;
}

.game-nav-back             { background: var(--bg-sunken); color: var(--text-secondary); }
.game-nav-back:hover       { background: var(--border-subtle); color: var(--text-primary); }
.game-nav-next             { background: var(--color-accent); color: white; box-shadow: var(--shadow-accent); }
.game-nav-next:hover       { transform: translateY(-2px); box-shadow: 0 8px 25px var(--color-accent-glow); }

/* ─── Adım Nokta Göstergeleri ─── */
.game-step-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 200px;
}

.game-dot          { width: 8px; height: 8px; border-radius: 50%; background: var(--border-subtle); transition: 0.3s; flex-shrink: 0; }
.game-dot-active   { transform: scale(1.5); background: var(--color-accent); }
.game-dot-done     { background: var(--color-accent-soft); }
.game-dot-summary  { background: var(--game-badge-summary-color); }
.game-dot-quiz     { background: var(--game-badge-quiz-color); }
.game-dot-test     { background: var(--game-badge-test-color); }
.game-dot-fill     { background: var(--game-badge-fill-color); }
.game-dot-match    { background: var(--game-badge-match-color); }

/* ─── v6.1 Footer Orta Sarmalayıcı ─── */
.game-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* ─── v6.1 Mod İçi Geçiş Pill Bar ─── */
.game-subtype-bar {
  display: flex;
  gap: 4px;
  background: var(--bg-sunken);
  border-radius: 10px;
  padding: 3px;
  flex-wrap: wrap;
  justify-content: center;
}

.game-subtype-pill {
  padding: 5px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.3;
}

.game-subtype-pill:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.game-subtype-pill.active {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--color-accent-glow, rgba(59,130,246,0.3));
}

@media (max-width: 479px) {
  .game-subtype-pill { padding: 4px 8px; font-size: 11px; }
  .game-subtype-bar  { gap: 2px; padding: 2px; }
}

/* ═══════════════════════════════════════════════════════════════════
   KLAN MERKEZİ STİLLERİ — v6.2.0
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Onboarding Grid (Klan Yok Durumu) ─── */
.clan-onboard-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  width: 100%; max-width: 400px; margin-top: 16px;
}
.clan-onboard-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 14px; border-radius: 14px;
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.clan-onboard-card:hover {
  border-color: var(--color-accent); background: var(--color-accent-soft);
  transform: translateY(-2px); box-shadow: 0 8px 24px var(--color-accent-glow);
}
.clan-ob-icon { font-size: 28px; }
.clan-ob-title { font-size: 13px; font-weight: 800; color: var(--text-primary); }
.clan-ob-desc { font-size: 11px; color: var(--text-tertiary); line-height: 1.5; }

/* ─── Klan Dashboard ─── */
.clan-dashboard { display: flex; flex-direction: column; gap: 0; overflow-y: auto; }

/* ─── Klan Topbar (tam ekran view için) ─── */
.clan-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface); flex-shrink: 0;
}
.clan-topbar-back {
  background: var(--bg-sunken); color: var(--text-secondary); border: none;
  padding: 8px 14px; border-radius: var(--btn-radius); font-weight: 700;
  font-family: var(--font-sans); cursor: pointer; transition: 0.2s; font-size: 13px;
}
.clan-topbar-back:hover { background: var(--border-subtle); color: var(--text-primary); }
.clan-topbar-title { font-size: 15px; font-weight: 800; color: var(--text-primary); }

/* ─── Profil Kartı ─── */
.clan-profile-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--bg-sunken); border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0; gap: 12px;
}
.clan-profile-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.clan-profile-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-accent-soft); border: 2px solid var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: var(--color-accent);
}
.clan-profile-info { min-width: 0; }
.clan-profile-name { font-size: 14px; font-weight: 800; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clan-profile-dept { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.clan-profile-right { flex-shrink: 0; text-align: right; }
.clan-profile-level { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.clan-level-badge {
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 6px;
  background: var(--color-accent); color: #fff; letter-spacing: 0.5px;
}
.clan-xp-bar-wrap {
  width: 100px; height: 6px; border-radius: 3px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); overflow: hidden;
}
.clan-xp-bar { height: 100%; border-radius: 3px; background: var(--color-accent); transition: width 0.4s ease; }
.clan-xp-text { font-size: 10px; color: var(--text-tertiary); }

/* ─── Hızlı İstatistik Şeridi ─── */
.clan-quick-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.clan-qs-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; text-align: center;
}
.clan-qs-item + .clan-qs-item { border-left: 1px solid var(--border-subtle); }
.clan-qs-value { font-size: 16px; font-weight: 800; color: var(--color-accent); }
.clan-qs-label { font-size: 9px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.3px; }

/* ─── Rozet Sistemi ─── */
.clan-badges-section {
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0; background: var(--bg-surface);
}
.clan-badges-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.clan-badges-container { display: flex; flex-direction: column; gap: 8px; }
.clan-badges-row { display: flex; flex-wrap: wrap; gap: 6px; }
.clan-badge-item {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700;
  transition: 0.2s;
}
.clan-badge-earned {
  background: var(--color-accent-soft); border: 1px solid var(--color-accent);
  color: var(--color-accent);
}
.clan-badge-locked {
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  color: var(--text-tertiary); opacity: 0.5;
}
.clan-badge-icon { font-size: 14px; }
.clan-badge-name { font-size: 10px; }
.clan-badges-locked-row { margin-top: 2px; }

@media (max-width: 479px) {
  .clan-badge-item { padding: 3px 7px; font-size: 10px; }
  .clan-badge-icon { font-size: 12px; }
  .clan-badge-name { font-size: 9px; }
}

/* Klan Başlık */
.clan-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-sunken); flex-shrink: 0;
}
.clan-header-tag { font-size: 10px; font-weight: 800; color: var(--text-tertiary); letter-spacing: 1.5px; }
.clan-header-name { font-size: 16px; font-weight: 800; color: var(--color-accent); margin-top: 2px; }
.clan-stat-chip {
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  padding: 4px 10px; border-radius: 8px;
}

/* ─── Klan İç Tab Menüsü ─── */
.clan-tab-nav {
  display: flex; flex-shrink: 0;
  border-bottom: 1px solid var(--border-subtle); background: var(--bg-surface);
}
.clan-tab-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 6px; font-size: 12px; font-weight: 700;
  color: var(--text-tertiary); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  font-family: var(--font-sans); transition: 0.2s;
}
.clan-tab-btn:hover { color: var(--text-secondary); }
.clan-tab-btn.clan-tab-active {
  color: var(--color-accent); border-bottom-color: var(--color-accent);
}

/* ─── Tab Content ─── */
.clan-tab-content { display: none; flex: 1; overflow-y: auto; padding: 14px; flex-direction: column; gap: 12px; }
.clan-tab-content.clan-tab-content-active { display: flex; }

/* ─── Üye Kartları ─── */
.clan-members-list { display: flex; flex-direction: column; gap: 6px; }
.clan-member-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--border-subtle); transition: 0.15s;
}
.clan-member-card.clan-member-me { border-color: var(--color-accent); background: var(--color-accent-soft); }
.clan-member-card.clan-member-leader { border-color: #f0b429; background: rgba(240,180,41,0.06); }
.clan-member-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--color-accent);
}
.clan-member-info { flex: 1; min-width: 0; }
.clan-member-name { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clan-member-meta { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.clan-member-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: 0.3px;
}
.clan-badge-leader { background: rgba(240,180,41,0.12); border: 1px solid rgba(240,180,41,0.3); color: #f0b429; }
.clan-badge-member { background: var(--bg-sunken); border: 1px solid var(--border-subtle); color: var(--text-tertiary); }

/* ─── Operasyon Notu ─── */
.clan-goal-section {
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 12px; margin-top: 4px;
}
.clan-goal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.clan-goal-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.clan-goal-save {
  font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 6px;
  background: var(--color-accent-soft); color: var(--color-accent);
  border: 1px solid var(--color-accent); cursor: pointer; transition: 0.2s;
  font-family: var(--font-sans);
}
.clan-goal-save:hover { background: var(--color-accent); color: #fff; }
.clan-goal-textarea {
  width: 100%; background: transparent; border: none; color: var(--text-primary);
  font-family: var(--font-sans); font-size: 13px; line-height: 1.6;
  resize: none; outline: none; min-height: 40px; max-height: 80px;
}
.clan-goal-textarea::placeholder { color: var(--text-tertiary); }
.clan-goal-textarea:read-only { color: var(--text-tertiary); cursor: default; }

/* ─── Aksiyon Butonları ─── */
.clan-actions { display: flex; gap: 8px; margin-top: 4px; }
.clan-action-btn {
  flex: 1; padding: 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
  font-family: var(--font-sans); cursor: pointer; transition: 0.2s; text-align: center;
}
.clan-action-invite {
  background: var(--color-accent-soft); color: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.clan-action-invite:hover { background: var(--color-accent); color: #fff; }
.clan-action-leave {
  background: rgba(239,68,68,0.08); color: var(--color-danger);
  border: 1px solid var(--color-danger);
  flex: 0 0 auto; padding: 10px 16px;
}
.clan-action-leave:hover { background: var(--color-danger); color: #fff; }

/* ─── Kasa (Vault) ─── */
.clan-vault-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.clan-vault-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.clan-vault-share-btn {
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 6px;
  background: var(--color-accent-soft); color: var(--color-accent);
  border: 1px solid var(--color-accent); cursor: pointer;
  font-family: var(--font-sans); transition: 0.2s;
}
.clan-vault-share-btn:hover { background: var(--color-accent); color: #fff; }
.clan-vault-list { display: flex; flex-direction: column; gap: 6px; }
.clan-vault-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 36px 16px; color: var(--text-tertiary); font-size: 12px; text-align: center;
}
.clan-vault-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: 0.15s;
}
.clan-vault-item:hover { border-color: var(--color-accent); }
.clan-vault-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: var(--color-accent-soft); border: 1px solid var(--color-accent);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.clan-vault-info { flex: 1; min-width: 0; }
.clan-vault-name { font-size: 12px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clan-vault-meta { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.clan-vault-tag {
  font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--color-accent-soft); color: var(--color-accent);
}

/* ─── Planlayıcı ─── */
.clan-planner-wrap { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.clan-stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clan-stat-cards-4 { grid-template-columns: repeat(4, 1fr); }
.clan-stat-card {
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 14px; text-align: center;
}
.clan-stat-label { font-size: 10px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.5px; }
.clan-stat-value { font-size: 28px; font-weight: 800; color: var(--color-accent); margin: 4px 0 2px; }
.clan-stat-value-accent2 { color: var(--text-primary); }
.clan-stat-unit { font-size: 10px; color: var(--text-tertiary); }

/* Ders Dağılımı Listesi */
.clan-distribution-list { display: flex; flex-direction: column; gap: 6px; }
.clan-dist-row {
  display: flex; align-items: center; gap: 8px;
}
.clan-dist-color { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.clan-dist-name { font-size: 11px; font-weight: 700; color: var(--text-primary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clan-dist-bar-wrap { flex: 2; height: 6px; border-radius: 3px; background: var(--bg-sunken); overflow: hidden; }
.clan-dist-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; min-width: 3px; }
.clan-dist-hrs { font-size: 10px; font-weight: 700; color: var(--text-secondary); min-width: 40px; text-align: right; }

@media (max-width: 600px) {
  .clan-stat-cards-4 { grid-template-columns: repeat(2, 1fr); }
}

.clan-chart-card {
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 14px;
}
.clan-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.clan-chart-total {
  font-size: 11px; font-weight: 700; color: var(--color-accent);
  background: var(--color-accent-soft); padding: 3px 10px; border-radius: 6px;
}
.clan-chart-container { position: relative; height: 140px; }

/* Haftalık Grid */
.clan-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.clan-day-col {
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  border-radius: 10px; min-height: 120px; display: flex; flex-direction: column;
}
.clan-day-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 6px; border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.clan-day-name { font-size: 10px; font-weight: 700; color: var(--text-secondary); }
.clan-day-total { font-size: 10px; color: var(--text-tertiary); }
.clan-day-cards { flex: 1; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.clan-day-chip {
  border-radius: 6px; padding: 5px 7px; font-size: 10px; font-weight: 700;
  background: var(--bg-surface); border-left: 3px solid; line-height: 1.4;
  position: relative;
}
.clan-day-chip-name { color: var(--text-primary); }
.clan-day-chip-dur { font-size: 9px; color: var(--text-tertiary); }
.clan-day-chip-del {
  position: absolute; top: 3px; right: 4px; font-size: 10px; opacity: 0;
  color: var(--color-danger); cursor: pointer; background: none; border: none;
  font-family: var(--font-sans); transition: 0.15s;
}
.clan-day-chip:hover .clan-day-chip-del { opacity: 1; }
.clan-day-add {
  width: 100%; padding: 8px 0; font-size: 11px; font-weight: 700;
  color: var(--color-accent); background: var(--color-accent-soft);
  border: 1px dashed var(--color-accent); border-radius: 6px;
  cursor: pointer; transition: 0.2s; font-family: var(--font-sans);
  margin-top: auto;
}
.clan-day-add:hover { background: var(--color-accent); color: #fff; }

@media (max-width: 768px) {
  .clan-week-grid { grid-template-columns: 1fr; gap: 10px; }
  .clan-day-col { min-height: auto; }
}
@media (max-width: 479px) {
  .clan-onboard-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   ANTRENMAN MODU STİLLERİ — v6.3.0
   ═══════════════════════════════════════════════════════════════════ */

.training-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-subtle); background: var(--bg-surface);
}
.training-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 4px; text-align: center;
}
.training-stat + .training-stat { border-left: 1px solid var(--border-subtle); }
.training-stat-value { font-size: 20px; font-weight: 800; color: var(--color-accent); }
.training-stat-label { font-size: 9px; font-weight: 700; color: var(--text-tertiary); }

.training-actions { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.training-start-btn {
  width: 100%; padding: 14px; border-radius: 10px; font-size: 14px; font-weight: 800;
  background: var(--color-accent); color: #fff; border: none; cursor: pointer;
  font-family: var(--font-sans); transition: 0.2s;
}
.training-start-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.training-start-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.training-filter-btns { display: flex; gap: 8px; }
.training-filter-btn {
  flex: 1; padding: 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: var(--bg-sunken); color: var(--text-secondary); border: 1px solid var(--border-subtle);
  cursor: pointer; font-family: var(--font-sans); transition: 0.2s; text-align: center;
}
.training-filter-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.training-filter-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.training-list { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.training-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--border-subtle); transition: 0.15s;
}
.training-item-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
}
.training-item-info { flex: 1; min-width: 0; }
.training-item-question {
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.training-item-meta {
  display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap;
}
.training-item-tag {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
}
.training-item-del {
  flex-shrink: 0; background: none; border: none; color: var(--text-tertiary);
  cursor: pointer; font-size: 14px; padding: 4px; transition: 0.2s;
  font-family: var(--font-sans);
}
.training-item-del:hover { color: var(--color-danger); }

.training-footer { padding: 16px; text-align: center; }
.training-clear-btn {
  padding: 8px 20px; border-radius: 8px; font-size: 11px; font-weight: 700;
  background: rgba(239,68,68,0.08); color: var(--color-danger);
  border: 1px solid rgba(239,68,68,0.2); cursor: pointer;
  font-family: var(--font-sans); transition: 0.2s;
}
.training-clear-btn:hover { background: var(--color-danger); color: #fff; }

.training-empty { padding: 40px 16px; }

@media (max-width: 479px) {
  .training-filter-btns { flex-direction: column; }
}

/* ─── Klan Modalları ─── */
.clan-modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.clan-modal-overlay.show { display: flex; }
.clan-modal-box {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 16px; width: 100%; max-width: 440px; padding: 24px;
  position: relative; animation: clanModalIn 0.25s ease;
  max-height: 80vh; overflow-y: auto;
}
@keyframes clanModalIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.clan-modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--text-tertiary); cursor: pointer; font-size: 18px; font-family: var(--font-sans);
}
.clan-modal-close:hover { color: var(--text-primary); }
.clan-modal-title { font-size: 16px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.clan-modal-desc { font-size: 12px; color: var(--text-tertiary); margin-bottom: 16px; line-height: 1.5; }
.clan-modal-input {
  width: 100%; background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  color: var(--text-primary); padding: 11px 14px; border-radius: 10px;
  font-family: var(--font-sans); font-size: 13px; margin-bottom: 10px;
  outline: none; transition: 0.2s;
}
.clan-modal-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-glow); }
.clan-modal-primary {
  width: 100%; padding: 12px; background: var(--color-accent); color: #fff;
  border: none; border-radius: 10px; font-family: var(--font-sans);
  font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s;
  margin-top: 4px;
}
.clan-modal-primary:hover { opacity: 0.9; transform: translateY(-1px); }

/* Share List Items */
.clan-share-list { display: flex; flex-direction: column; gap: 5px; max-height: 280px; overflow-y: auto; margin-bottom: 12px; }
.clan-share-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: 0.15s;
}
.clan-share-item:hover { border-color: var(--color-accent); }
.clan-share-item.selected { background: var(--color-accent-soft); border-color: var(--color-accent); }
.clan-share-item-info { flex: 1; min-width: 0; }
.clan-share-item-name { font-size: 12px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clan-share-item-meta { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.clan-share-item-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border-subtle); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 800;
}
.clan-share-item.selected .clan-share-item-check { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.clan-loading { font-size: 12px; color: var(--text-tertiary); text-align: center; padding: 24px; }

/* ─── Yükleme / Placeholder ─── */
.game-step-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 24px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

.game-loading-icon { font-size: 3rem; animation: pulse 1.5s ease-in-out infinite; }
.game-loading-text { font-size: var(--text-base); font-weight: 600; font-family: var(--font-mono); }

/* ─── Tamamlandı Ekranı ─── */
.game-complete-card {
  text-align: center;
  max-width: 500px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: gameSlideIn 0.5s var(--ease-spring) both;
}

.game-complete-icon         { font-size: 5rem; margin-bottom: 20px; animation: bounceIn 0.8s var(--ease-spring); }
.game-complete-title        { font-size: var(--text-3xl); font-weight: 800; font-family: var(--font-display); margin-bottom: 8px; }
.game-complete-sub          { color: var(--text-secondary); font-size: var(--text-lg); margin-bottom: 30px; max-width: 320px; }
.game-complete-score-wrap   { background: var(--color-warning); padding: 20px; border-radius: var(--card-radius); color: #000; margin-bottom: 30px; }
.game-complete-score-label  { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; }
.game-complete-score-value  { font-size: var(--text-4xl); font-weight: 800; animation: gameCompleteScoreCount 0.8s var(--ease-spring) 0.3s both; }
.game-complete-stats        { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.game-complete-stat         { background: var(--bg-sunken); padding: 8px 16px; border-radius: 20px; font-size: var(--text-sm); font-weight: 600; }

.game-complete-btn {
  width: 100%;
  padding: 16px;
  background: var(--color-accent);
  color: white;
  font-weight: 800;
  border-radius: var(--btn-radius);
  font-size: var(--text-lg);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
}

.game-complete-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 28px var(--color-accent-glow); }

/* ─── Tema Özel Oyun Efektleri ─── */
[data-theme="classic"] .game-card         { box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08), 0 1px 4px rgba(0,0,0,0.05); }
[data-theme="classic"] .game-progress-bar { box-shadow: 0 0 8px rgba(37, 99, 235, 0.4); }

[data-theme="cyber"] .game-card           { box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.2), 0 8px 32px rgba(0,0,0,0.8); }
[data-theme="cyber"] .game-hud            { border-bottom-color: rgba(0, 255, 65, 0.2); }
[data-theme="cyber"] .game-progress-bar   { box-shadow: 0 0 12px rgba(0, 255, 65, 0.6), 0 0 24px rgba(0, 255, 65, 0.2); }
[data-theme="cyber"] .game-nav-next       { animation: cyberPulse 2.5s ease-in-out infinite; color: #050505; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }
[data-theme="cyber"] .game-score-value    { text-shadow: 0 0 12px rgba(0, 255, 65, 0.5); }
[data-theme="cyber"] .game-option-btn:not(:disabled):hover { box-shadow: 0 0 12px rgba(0, 255, 65, 0.25); }
[data-theme="cyber"] #view-game::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 65, 0.008) 2px, rgba(0, 255, 65, 0.008) 4px);
  pointer-events: none;
  z-index: 0;
}

[data-theme="arcade"] .game-card          { box-shadow: 0 0 0 2px rgba(255, 42, 109, 0.4), 0 8px 32px rgba(0,0,0,0.9); }
[data-theme="arcade"] .game-hud           { border-bottom: 2px solid rgba(255, 42, 109, 0.5); }
[data-theme="arcade"] .game-progress-bar  { box-shadow: 0 0 10px rgba(255, 42, 109, 0.6), 0 0 20px rgba(245, 230, 66, 0.2); }
[data-theme="arcade"] .game-nav-next      { animation: arcadeFlicker 4s step-start infinite; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); }
[data-theme="arcade"] .game-option-btn    { text-transform: uppercase; font-size: var(--text-xs); letter-spacing: 0.04em; }
[data-theme="arcade"] .game-option-btn:not(:disabled):hover { box-shadow: 0 0 10px rgba(255, 42, 109, 0.4); }
[data-theme="arcade"] .game-flashcard-front,
[data-theme="arcade"] .game-flashcard-back { border-width: 3px; }

/* ─── Oyun Motoru Tema Özellikleri ─── */
[data-theme="cyber"]  .mode-card:hover    { box-shadow: 0 0 0 1px var(--color-accent), 0 12px 40px rgba(0, 0, 0, 0.8); }
[data-theme="arcade"] .mode-card          { border-width: 2px; border-color: var(--color-accent); }
[data-theme="arcade"] .mode-card:hover    { box-shadow: 0 0 0 2px var(--color-warning), 0 0 30px rgba(255, 42, 109, 0.4); }

/* ─── Arcade / Cyber tema buton özellikleri ─── */
[data-theme="arcade"] .btn-primary        { animation: arcadeFlicker 5s step-start infinite; text-transform: uppercase; letter-spacing: 0.06em; }
[data-theme="arcade"] .player-avatar      { border-width: 2px; image-rendering: pixelated; }


/* ============================================================
   13. OYUN — FILL-IN-BLANK (BOŞLUK DOLDURMA) BİLEŞENİ (YENİ v4.0.0)
   ============================================================ */

/* ─── Ana Kart Wrapper ─── */
.game-fill-blank-card {
  /* .game-card stili zaten uygulanır; ekstra yapı yok */
}

/* ─── Cümle Alanı ─── */
.game-fill-blank-sentence-wrap {
  font-size: var(--text-lg);
  line-height: 2.2;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  margin-bottom: 24px;
  word-break: break-word;
}

/* ─── Boşluk input alanı (cümle içinde inline) ─── */
.fill-blank-input {
  display: inline-block;
  min-width: 120px;
  max-width: 240px;
  height: 40px;
  padding: 0 14px;
  background: var(--fill-input-bg);
  border: 2px solid var(--fill-input-border);
  border-radius: var(--input-radius);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--input-text);
  text-align: center;
  outline: none;
  transition:
    border-color var(--duration-fast),
    background var(--duration-fast),
    box-shadow var(--duration-fast);
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
}

.fill-blank-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.fill-blank-input:focus {
  border-color: var(--fill-input-focus);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Doğru cevap durumu */
.fill-blank-input.fill-correct {
  background: var(--fill-input-correct-bg);
  border-color: var(--fill-input-correct-border);
  color: var(--game-feedback-correct-text);
  animation: fillCorrectPop 0.4s var(--ease-spring) both;
}

/* Yanlış cevap durumu */
.fill-blank-input.fill-wrong {
  background: var(--fill-input-wrong-bg);
  border-color: var(--fill-input-wrong-border);
  color: var(--game-feedback-wrong-text);
  animation: fillShake 0.5s var(--ease-smooth) both;
}

/* ─── Gönder Butonu ─── */
.fill-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  width: 100%;
  height: 48px;
  background: var(--color-accent);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--btn-radius);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  box-shadow: var(--shadow-accent);
}

.fill-submit-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-accent), 0 8px 24px var(--color-accent-glow);
}

.fill-submit-btn:active  { transform: translateY(0) scale(0.98); }
.fill-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Geri Bildirim Alanı (cevap sonrası) ─── */
.fill-feedback-wrap {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--btn-radius);
  animation: fadeSlideUp 0.3s var(--ease-spring) both;
  display: none;
}

.fill-feedback-wrap.fill-feedback-visible {
  display: block;
}

.fill-feedback-wrap.fill-feedback-correct-band {
  background: var(--game-feedback-correct-bg);
  border: 1px solid var(--game-feedback-correct-border);
  border-left: 4px solid var(--game-feedback-correct-border);
}

.fill-feedback-wrap.fill-feedback-wrong-band {
  background: var(--game-feedback-wrong-bg);
  border: 1px solid var(--game-feedback-wrong-border);
  border-left: 4px solid var(--game-feedback-wrong-border);
}

.fill-feedback-result {
  font-size: var(--text-base);
  font-weight: 800;
  font-family: var(--font-sans);
  margin-bottom: 6px;
}

.fill-feedback-result.fill-feedback-result-correct {
  color: var(--game-feedback-correct-text);
}

.fill-feedback-result.fill-feedback-result-wrong {
  color: var(--game-feedback-wrong-text);
}

.fill-correct-answer {
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--text-secondary);
  line-height: 1.5;
}

.fill-correct-answer strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ─── Tema Özel Fill-in-Blank Efektleri ─── */
[data-theme="cyber"] .fill-blank-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.3), 0 0 20px rgba(0, 255, 65, 0.1);
}

[data-theme="cyber"] .fill-blank-input.fill-correct {
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

[data-theme="cyber"] .fill-blank-input.fill-wrong {
  box-shadow: 0 0 12px rgba(255, 49, 49, 0.4);
}

[data-theme="arcade"] .fill-blank-input {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

[data-theme="arcade"] .fill-submit-btn {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ============================================================
   14. OYUN — MATCHING (EŞLEŞTİRME) BİLEŞENİ (YENİ v4.0.0)
   ============================================================ */

/* ─── Talimat Metni ─── */
.game-matching-instruction {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-glow);
  border-radius: var(--btn-radius);
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-matching-instruction-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ─── Grid Wrapper ─── */
.game-matching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .game-matching-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .matching-definitions-col {
    border-top: 1px dashed var(--border-subtle);
    padding-top: 8px;
    margin-top: 8px;
  }
}

/* ─── Kolon Başlıkları ─── */
.matching-col-header {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 10px;
  padding-left: 4px;
}

/* ─── Kolon Listesi ─── */
.matching-terms-col,
.matching-definitions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Eşleştirme Öğesi (temel) ─── */
.matching-item {
  padding: 12px 14px;
  background: var(--match-item-bg);
  border: 2px solid var(--match-item-border);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-smooth),
    border-color var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
  line-height: 1.4;
  text-align: left;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.matching-item:hover:not(.matching-item-locked) {
  background: var(--match-item-hover-bg);
  border-color: var(--match-item-hover-border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.matching-item:active:not(.matching-item-locked) {
  transform: translateY(0);
}

/* ─── Seçili Durum ─── */
.matching-item.matching-item-selected {
  background: var(--match-item-selected-bg);
  border-color: var(--match-item-selected-border);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
  animation: matchItemPop 0.3s var(--ease-spring) both;
}

/* ─── Doğru Eşleşme ─── */
.matching-item.matching-item-correct {
  background: var(--match-item-correct-bg);
  border-color: var(--match-item-correct-border);
  cursor: default;
  animation: matchItemPop 0.4s var(--ease-spring) both;
}

.matching-item.matching-item-correct::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--game-feedback-correct-text);
  opacity: 0.8;
}

/* ─── Yanlış Eşleşme ─── */
.matching-item.matching-item-wrong {
  background: var(--match-item-wrong-bg);
  border-color: var(--match-item-wrong-border);
  animation: fillShake 0.5s var(--ease-smooth) both;
}

.matching-item.matching-item-wrong::after {
  content: '✗';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--game-feedback-wrong-text);
  opacity: 0.8;
}

/* ─── Kilitlenmiş (zaten eşleştirilmiş) Durum ─── */
.matching-item.matching-item-locked {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* ─── Eşleştirilmiş Çift Bandı ─── */
.matching-pair-band {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--match-item-correct-bg);
  border: 1px solid var(--match-item-correct-border);
  border-radius: var(--btn-radius);
  font-size: var(--text-xs);
  font-family: var(--font-sans);
  animation: fadeSlideUp 0.3s var(--ease-spring) both;
  margin-bottom: 6px;
}

.matching-pair-term {
  font-weight: 700;
  color: var(--game-feedback-correct-text);
  flex: 1;
}

.matching-pair-arrow {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.matching-pair-def {
  color: var(--text-secondary);
  flex: 1;
  text-align: right;
}

/* ─── Tamamlanan Eşleşmeler Özet Kutusu ─── */
.matching-pairs-summary {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--btn-radius);
}

.matching-pairs-summary-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

/* ─── Kontrol Et Butonu ─── */
.matching-check-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  background: var(--color-accent);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--btn-radius);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  box-shadow: var(--shadow-accent);
  margin-top: 8px;
}

.matching-check-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-accent), 0 8px 24px var(--color-accent-glow);
}

.matching-check-btn:active   { transform: translateY(0) scale(0.98); }
.matching-check-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Puan Göstergesi (matching sonrası) ─── */
.matching-score-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--text-secondary);
}

.matching-score-value {
  color: var(--color-accent);
  font-weight: 800;
  font-family: var(--font-mono);
}

/* ─── Tema Özel Matching Efektleri ─── */
[data-theme="cyber"] .matching-item:hover:not(.matching-item-locked) {
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

[data-theme="cyber"] .matching-item.matching-item-selected {
  box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.3), 0 0 20px rgba(0, 255, 65, 0.1);
}

[data-theme="cyber"] .matching-item.matching-item-correct {
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

[data-theme="cyber"] .matching-check-btn {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="arcade"] .matching-item {
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

[data-theme="arcade"] .matching-item.matching-item-selected {
  box-shadow: 0 0 0 3px rgba(255, 42, 109, 0.4), 0 0 16px rgba(255, 42, 109, 0.2);
}

[data-theme="arcade"] .matching-item.matching-item-correct {
  box-shadow: 0 0 10px rgba(5, 255, 161, 0.3);
}

[data-theme="arcade"] .matching-check-btn {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}


/* ============================================================
   15. MODULE HUB EKRANI (YENİ v4.0.0)
   Kullanıcı OYNA'ya bastığında lobi → oyun arasında açılan
   mod seçim ekranı.
   ============================================================ */

/* ─── View Wrapper ─── */
.view-module-hub {
  min-height: calc(100dvh - var(--header-height));
  padding-top: var(--header-height);
  background: var(--hub-bg, var(--bg-root));
  display: flex;
  flex-direction: column;
}

/* ─── Hub Inner Container ─── */
.module-hub-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px clamp(16px, 5vw, 48px);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  gap: 32px;
}

/* ─── Hub Başlık Alanı ─── */
.module-hub-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeSlideUp 0.45s var(--ease-spring) both;
}

.module-hub-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--back-btn-bg);
  color: var(--back-btn-color);
  border: 1px solid var(--border-subtle);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
  margin-bottom: 8px;
}

.module-hub-back-btn:hover {
  background: var(--back-btn-hover-bg);
  color: var(--text-primary);
  transform: translateX(-2px);
}

.module-hub-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.module-hub-module-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  max-width: 600px;
  text-align: center;
  line-height: 1.3;
}

.module-hub-title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.module-hub-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 400;
  max-width: 400px;
  text-align: center;
  line-height: 1.6;
}

/* ─── Hub 3 Buton Grid'i ─── */
.module-hub-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  animation: fadeSlideUp 0.5s var(--ease-spring) 0.1s both;
}

@media (max-width: 680px) {
  .module-hub-buttons {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .module-hub-buttons {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* ─── Hub Mod Butonu (Dev Kart) ─── */
.hub-mode-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 24px;
  border: none;
  border-radius: var(--card-radius);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition:
    transform var(--duration-base) var(--ease-spring),
    box-shadow var(--duration-base) var(--ease-smooth);
  min-height: 260px;
  box-shadow: var(--hub-card-shadow, var(--shadow-md));
}

/* Gradient arka planlar */
.hub-mode-btn-learn  { background: var(--hub-learn-gradient); }
.hub-mode-btn-test   { background: var(--hub-test-gradient); }
.hub-mode-btn-mixed  { background: var(--hub-mixed-gradient); }

.hub-mode-btn:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.hub-mode-btn:active {
  transform: translateY(-2px) scale(0.99);
}

/* ─── Buton İç Katmanları ─── */
.hub-mode-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.4));
  z-index: 1;
  position: relative;
}

.hub-mode-label {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-family: var(--font-display);
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  line-height: 1.2;
  z-index: 1;
  position: relative;
}

.hub-mode-desc {
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  z-index: 1;
  position: relative;
  flex: 1;
}

.hub-mode-content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 1;
  position: relative;
  margin-top: auto;
}

.hub-mode-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  letter-spacing: 0.04em;
}

/* Dekoratif arka plan şekil efekti */
.hub-mode-btn::before {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  transition: transform var(--duration-base) var(--ease-spring);
}

.hub-mode-btn::after {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.hub-mode-btn:hover::before {
  transform: scale(2.5) translate(10px, 10px);
}

/* ─── Hub Alt Bilgi ─── */
.module-hub-footer-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  text-align: center;
  animation: fadeIn 0.5s var(--ease-smooth) 0.3s both;
}

/* ─── Tema Özel Hub Efektleri ─── */
[data-theme="cyber"] .module-hub-title {
  text-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

[data-theme="cyber"] .hub-mode-btn:hover {
  box-shadow: 0 0 0 1px var(--color-accent), 0 20px 60px rgba(0, 0, 0, 0.9);
}

[data-theme="cyber"] .hub-mode-label {
  color: var(--hub-btn-text);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="cyber"] .hub-mode-desc {
  color: rgba(208, 216, 224, 0.7);
}

[data-theme="cyber"] .hub-mode-tag {
  border: 1px solid rgba(0, 255, 65, 0.3);
  background: rgba(0, 255, 65, 0.1);
  color: var(--color-accent);
}

[data-theme="arcade"] .module-hub-title {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="arcade"] .hub-mode-btn {
  border: 2px solid var(--color-accent);
}

[data-theme="arcade"] .hub-mode-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

[data-theme="arcade"] .hub-mode-tag {
  background: rgba(255, 42, 109, 0.3);
  border: 1px solid rgba(255, 42, 109, 0.5);
}

[data-theme="arcade"] .hub-mode-btn:hover {
  box-shadow: 0 0 0 2px var(--color-warning), 0 0 30px rgba(255, 42, 109, 0.5), 0 20px 60px rgba(0, 0, 0, 0.9);
}


/* ============================================================
   16. RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 400px) {
  .player-info    { display: none; }
  .btn-primary    { padding: 0 12px; font-size: var(--text-xs); }
  .game-nav-btn   { padding: 0 12px; font-size: var(--text-xs); }
  .game-hud       { gap: 6px; padding: 0 8px; }
}

@media (min-width: 600px) {
  .game-viewport  { padding-top: 32px; padding-bottom: 120px; }
}

@media (min-width: 768px) {
  .modes-grid            { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .lobby-generate-row    { flex-wrap: nowrap; }
}

@media (min-width: 1024px) {
  .modes-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ============================================================
   17. ERİŞİLEBİLİRLİK
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

::selection {
  background: var(--color-accent);
  color: var(--text-inverse);
}

/* ============================================================
   18. SENARYO MODU — Interactive Case / Scenario Simulator
   YENİ v4.1.0
   ============================================================

   Bileşenler:
   - #view-scenario           : Ana görünüm kabuk
   - .scenario-hud            : Üst bilgi şeridi (exit, başlık, progress, score, health)
   - .scenario-health-*       : Animasyonlu durum barı (yeşil→sarı→kırmızı)
   - .scenario-main           : 2 sütunlu ana alan
   - .scenario-history-panel  : Sol: Vaka geçmişi scroll akışı
   - .scenario-action-panel   : Sağ: Aktif adım + şıklar + feedback
   - .scenario-option-btn     : Aksiyon butonları (normal/correct/wrong/reveal)
   - .scenario-feedback-band  : Feedback bandı (correct/wrong/critical)
   - .scenario-next-btn       : "Sonraki Adım" butonu
   - .scenario-end-card       : Tamamlandı / Başarısız bitiş ekranı
   ============================================================ */

/* ── Tema Token'ları — Üç tema için senaryo değişkenleri ── */
[data-theme="classic"] {
  --scenario-health-good:      #16a34a;
  --scenario-health-warn:      #d97706;
  --scenario-health-danger:    #dc2626;
  --scenario-hud-bg:           var(--bg-secondary);
  --scenario-hud-border:       var(--border-color);
  --scenario-history-bg:       var(--bg-surface);
  --scenario-history-border:   var(--border-color);
  --scenario-action-bg:        var(--bg-primary);
  --scenario-card-bg:          var(--bg-surface);
  --scenario-card-border:      var(--border-color);
  --scenario-card-shadow:      var(--shadow-md);
  --scenario-narrative-color:  var(--text-primary);
  --scenario-question-color:   var(--color-accent);
  --scenario-option-bg:        var(--bg-surface);
  --scenario-option-border:    var(--border-color);
  --scenario-option-hover:     var(--bg-secondary);
  --scenario-option-correct:   rgba(22, 163, 74, 0.12);
  --scenario-option-wrong:     rgba(220, 38, 38, 0.10);
  --scenario-feedback-correct-bg: rgba(22, 163, 74, 0.10);
  --scenario-feedback-correct-border: #16a34a;
  --scenario-feedback-wrong-bg: rgba(220, 38, 38, 0.08);
  --scenario-feedback-wrong-border: #dc2626;
  --scenario-feedback-critical-bg: rgba(185, 28, 28, 0.15);
  --scenario-feedback-critical-border: #b91c1c;
  --scenario-next-bg:          var(--color-accent);
  --scenario-next-color:       var(--text-inverse);
  --scenario-progress-bg:      var(--bg-secondary);
  --scenario-progress-fill:    var(--color-accent);
  --scenario-health-track-bg:  var(--bg-secondary);
}

[data-theme="cyber"] {
  --scenario-health-good:      #00ff41;
  --scenario-health-warn:      #ffdd00;
  --scenario-health-danger:    #ff2a6d;
  --scenario-hud-bg:           var(--bg-secondary);
  --scenario-hud-border:       var(--border-color);
  --scenario-history-bg:       var(--bg-surface);
  --scenario-history-border:   rgba(0, 255, 65, 0.2);
  --scenario-action-bg:        var(--bg-primary);
  --scenario-card-bg:          var(--bg-surface);
  --scenario-card-border:      rgba(0, 255, 65, 0.25);
  --scenario-card-shadow:      0 0 20px rgba(0, 255, 65, 0.08);
  --scenario-narrative-color:  var(--text-primary);
  --scenario-question-color:   #00ff41;
  --scenario-option-bg:        var(--bg-surface);
  --scenario-option-border:    rgba(0, 255, 65, 0.2);
  --scenario-option-hover:     rgba(0, 255, 65, 0.06);
  --scenario-option-correct:   rgba(0, 255, 65, 0.12);
  --scenario-option-wrong:     rgba(255, 42, 109, 0.12);
  --scenario-feedback-correct-bg: rgba(0, 255, 65, 0.08);
  --scenario-feedback-correct-border: #00ff41;
  --scenario-feedback-wrong-bg: rgba(255, 42, 109, 0.10);
  --scenario-feedback-wrong-border: #ff2a6d;
  --scenario-feedback-critical-bg: rgba(255, 42, 109, 0.18);
  --scenario-feedback-critical-border: #ff0055;
  --scenario-next-bg:          #00ff41;
  --scenario-next-color:       #000;
  --scenario-progress-bg:      rgba(0, 255, 65, 0.1);
  --scenario-progress-fill:    #00ff41;
  --scenario-health-track-bg:  rgba(0, 255, 65, 0.1);
}

[data-theme="arcade"] {
  --scenario-health-good:      #39ff14;
  --scenario-health-warn:      #ffd700;
  --scenario-health-danger:    #ff2a6d;
  --scenario-hud-bg:           var(--bg-secondary);
  --scenario-hud-border:       var(--color-accent);
  --scenario-history-bg:       var(--bg-surface);
  --scenario-history-border:   var(--color-accent);
  --scenario-action-bg:        var(--bg-primary);
  --scenario-card-bg:          var(--bg-surface);
  --scenario-card-border:      var(--color-accent);
  --scenario-card-shadow:      0 0 0 2px var(--color-accent), 0 4px 20px rgba(255,42,109,0.2);
  --scenario-narrative-color:  var(--text-primary);
  --scenario-question-color:   var(--color-accent);
  --scenario-option-bg:        var(--bg-surface);
  --scenario-option-border:    var(--color-accent);
  --scenario-option-hover:     rgba(255, 42, 109, 0.08);
  --scenario-option-correct:   rgba(57, 255, 20, 0.12);
  --scenario-option-wrong:     rgba(255, 42, 109, 0.12);
  --scenario-feedback-correct-bg: rgba(57, 255, 20, 0.08);
  --scenario-feedback-correct-border: #39ff14;
  --scenario-feedback-wrong-bg: rgba(255, 42, 109, 0.10);
  --scenario-feedback-wrong-border: #ff2a6d;
  --scenario-feedback-critical-bg: rgba(255, 0, 0, 0.15);
  --scenario-feedback-critical-border: #ff0000;
  --scenario-next-bg:          var(--color-accent);
  --scenario-next-color:       #fff;
  --scenario-progress-bg:      rgba(255, 42, 109, 0.15);
  --scenario-progress-fill:    var(--color-accent);
  --scenario-health-track-bg:  rgba(255, 42, 109, 0.15);
}


/* ─────────────────────────────────────────────────────────────
   SENARYO KEYFRAMES
   ───────────────────────────────────────────────────────────── */
@keyframes healthShake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-4px); }
  40%  { transform: translateX(4px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

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

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

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

@keyframes healthPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

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


/* ─────────────────────────────────────────────────────────────
   #view-scenario — Kök Kap
   ───────────────────────────────────────────────────────────── */
#view-scenario {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
}




/* ─────────────────────────────────────────────────────────────
   SENARYO HUD — Üst Şerit
   ───────────────────────────────────────────────────────────── */
.scenario-hud {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 64px;
  min-height: 64px;
  background: var(--scenario-hud-bg);
  border-bottom: 1px solid var(--scenario-hud-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

/* Sol: Çıkış + Başlık */
.scenario-hud-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.scenario-exit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--scenario-hud-border);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all var(--duration-fast) var(--ease-smooth);
  flex-shrink: 0;
}

.scenario-exit-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  color: #dc2626;
}

.scenario-hud-title-block {
  min-width: 0;
  overflow: hidden;
}

.scenario-hud-subject {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-hud-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Orta: İlerleme */
.scenario-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}

.scenario-progress-track {
  flex: 1;
  height: 6px;
  background: var(--scenario-progress-bg);
  border-radius: 99px;
  overflow: hidden;
}

.scenario-progress-bar {
  height: 100%;
  background: var(--scenario-progress-fill);
  border-radius: 99px;
  transition: width 0.4s var(--ease-spring);
  width: 0%;
}

.scenario-progress-label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Sağ: Puan + Health Bar */
.scenario-hud-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.scenario-score-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--scenario-card-bg);
  border: 1px solid var(--scenario-card-border);
  border-radius: 20px;
}

.scenario-score-icon {
  font-size: 13px;
}

.scenario-score-value {
  font-size: var(--text-sm);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  min-width: 24px;
}

/* ── Health / Durum Barı ── */
.scenario-health-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 110px;
  max-width: 160px;
}

.scenario-health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.scenario-health-label-text {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.scenario-health-value {
  font-size: var(--text-xs);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.scenario-health-track {
  height: 8px;
  background: var(--scenario-health-track-bg);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}

.scenario-health-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s var(--ease-spring), background 0.4s ease;
}

.scenario-health-fill.health-shake {
  animation: healthShake 0.4s ease;
}

/* Health barı %30 altında nabız atar */
.scenario-health-fill[style*="width: 2"],
.scenario-health-fill[style*="width: 1"],
.scenario-health-fill[style*="width: 0"] {
  animation: healthPulse 1.2s infinite;
}


/* ─────────────────────────────────────────────────────────────
   SENARYO MAIN — 2 Sütun Düzeni
   ───────────────────────────────────────────────────────────── */
.scenario-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}


/* ─────────────────────────────────────────────────────────────
   SOL PANEL — Vaka Geçmişi
   Terminal / rapor hissiyatı
   ───────────────────────────────────────────────────────────── */
.scenario-history-panel {
  width: 300px;
  min-width: 240px;
  max-width: 340px;
  flex-shrink: 0;
  background: var(--scenario-history-bg);
  border-right: 1px solid var(--scenario-history-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scenario-history-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--scenario-history-border);
  flex-shrink: 0;
}

.scenario-history-panel-title {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Scrollable geçmiş alanı */
.scenario-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;

  /* Özel scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

.scenario-history::-webkit-scrollbar { width: 4px; }
.scenario-history::-webkit-scrollbar-track { background: transparent; }
.scenario-history::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 2px; }

/* Geçmiş girdisi */
.scenario-history-entry {
  background: var(--scenario-card-bg);
  border: 1px solid var(--scenario-card-border);
  border-radius: 8px;
  padding: 10px 12px;
  animation: scenarioEntryFade 0.35s var(--ease-smooth) both;
}

.scenario-context-entry {
  border-color: var(--color-accent);
  border-left: 3px solid var(--color-accent);
}

.scenario-history-correct {
  border-left: 3px solid var(--scenario-health-good);
}

.scenario-history-wrong {
  border-left: 3px solid var(--scenario-health-danger);
}

.scenario-history-badge {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.scenario-history-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
}

.scenario-history-narrative {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  border-top: 1px dashed var(--scenario-card-border);
  margin-top: 6px;
  padding-top: 6px;
}

.scenario-history-choice {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 4px;
}

.scenario-history-impact {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 800;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
}

.impact-positive {
  color: var(--scenario-health-good);
  background: rgba(22, 163, 74, 0.1);
}

.impact-negative {
  color: var(--scenario-health-danger);
  background: rgba(220, 38, 38, 0.1);
}


/* ─────────────────────────────────────────────────────────────
   SAĞ PANEL — Aktif Adım + Aksiyon Alanı
   ───────────────────────────────────────────────────────────── */
.scenario-action-panel {
  flex: 1;
  overflow-y: auto;
  background: var(--scenario-action-bg);
  scroll-behavior: smooth;

  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

.scenario-action-panel::-webkit-scrollbar { width: 4px; }
.scenario-action-panel::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 2px; }

.scenario-action-area {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 740px;
  margin: 0 auto;
}


/* ─────────────────────────────────────────────────────────────
   SENARYO ADIM KARTI
   ───────────────────────────────────────────────────────────── */
.scenario-step-card {
  background: var(--scenario-card-bg);
  border: 1px solid var(--scenario-card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--scenario-card-shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.3s, transform 0.35s var(--ease-spring);
}

.scenario-step-card.scenario-step-enter {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Narrative bölümü */
.scenario-narrative {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--scenario-card-border);
  background: var(--bg-surface);
}

.scenario-narrative-badge {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scenario-narrative-text {
  font-size: var(--text-base);
  color: var(--scenario-narrative-color);
  line-height: 1.65;
  font-weight: 500;
}

/* Soru bölümü */
.scenario-question {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--scenario-card-border);
}

.scenario-question-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.scenario-question-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--scenario-question-color);
  line-height: 1.5;
}

/* Seçenekler */
.scenario-options {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* ─────────────────────────────────────────────────────────────
   AKSİYON BUTONLARI
   ───────────────────────────────────────────────────────────── */
.scenario-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: var(--scenario-option-bg);
  border: 1.5px solid var(--scenario-option-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  transition:
    background var(--duration-fast) var(--ease-smooth),
    border-color var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

.scenario-option-btn:not(:disabled):hover {
  background: var(--scenario-option-hover);
  border-color: var(--color-accent);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.scenario-option-btn:not(:disabled):active {
  transform: translateX(1px) scale(0.99);
}

.scenario-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--scenario-option-border);
  font-size: var(--text-xs);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.scenario-option-text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  flex: 1;
}

/* Doğru seçenek */
.scenario-option-btn.scenario-option-correct {
  background: var(--scenario-option-correct);
  border-color: var(--scenario-health-good);
}

.scenario-option-btn.scenario-option-correct .scenario-option-letter {
  background: var(--scenario-health-good);
  color: #fff;
  border-color: var(--scenario-health-good);
}

/* Yanlış seçenek */
.scenario-option-btn.scenario-option-wrong {
  background: var(--scenario-option-wrong);
  border-color: var(--scenario-health-danger);
}

.scenario-option-btn.scenario-option-wrong .scenario-option-letter {
  background: var(--scenario-health-danger);
  color: #fff;
  border-color: var(--scenario-health-danger);
}

/* Doğru seçeneği ortaya çıkar (kullanıcı yanlış seçtiyse) */
.scenario-option-btn.scenario-option-reveal-correct {
  background: rgba(22, 163, 74, 0.06);
  border-color: var(--scenario-health-good);
  opacity: 0.75;
}

.scenario-option-btn.scenario-option-reveal-correct .scenario-option-letter {
  background: transparent;
  color: var(--scenario-health-good);
  border-color: var(--scenario-health-good);
}

/* Kilitli butonlar */
.scenario-option-btn.scenario-option-locked {
  cursor: default;
  pointer-events: none;
}

/* Arcade tema — köşeli */
[data-theme="arcade"] .scenario-option-btn {
  border-radius: 0 !important;
  border-width: 2px;
}

/* Cyber tema — mono font */
[data-theme="cyber"] .scenario-option-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}


/* ─────────────────────────────────────────────────────────────
   FEEDBACK BANDI
   ───────────────────────────────────────────────────────────── */
.scenario-feedback-band {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border-left: 4px solid;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease-spring);
}

.scenario-feedback-band.scenario-feedback-enter {
  opacity: 1;
  transform: translateY(0);
}

.scenario-feedback-correct {
  background: var(--scenario-feedback-correct-bg);
  border-color: var(--scenario-feedback-correct-border);
}

.scenario-feedback-wrong {
  background: var(--scenario-feedback-wrong-bg);
  border-color: var(--scenario-feedback-wrong-border);
}

.scenario-feedback-critical {
  background: var(--scenario-feedback-critical-bg);
  border-color: var(--scenario-feedback-critical-border);
}

.scenario-feedback-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.scenario-feedback-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.scenario-feedback-title {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-primary);
  flex: 1;
}

.scenario-feedback-impact {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.scenario-feedback-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.scenario-feedback-health-zero {
  margin-top: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--scenario-health-danger);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cyber tema feedback */
[data-theme="cyber"] .scenario-feedback-band {
  font-family: var(--font-mono);
}


/* ─────────────────────────────────────────────────────────────
   SONRAKI ADIM BUTONU
   ───────────────────────────────────────────────────────────── */
.scenario-next-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: var(--scenario-next-bg);
  color: var(--scenario-next-color);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 800;
  font-family: var(--font-display);
  cursor: pointer;
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 0.3s,
    transform 0.35s var(--ease-spring),
    background var(--duration-fast),
    box-shadow var(--duration-fast);
  letter-spacing: 0.02em;
}

.scenario-next-btn.scenario-next-enter {
  opacity: 1;
  transform: translateX(0);
}

.scenario-next-btn:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-lg);
  transform: translateX(0) translateY(-2px);
}

.scenario-next-arrow {
  font-size: 18px;
  transition: transform var(--duration-fast);
}

.scenario-next-btn:hover .scenario-next-arrow {
  transform: translateX(4px);
}

[data-theme="arcade"] .scenario-next-btn {
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

[data-theme="cyber"] .scenario-next-btn {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ─────────────────────────────────────────────────────────────
   BİTİŞ EKRANLARI — Tamamlandı / Başarısız
   ───────────────────────────────────────────────────────────── */
.scenario-end-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--scenario-card-border);
  background: var(--scenario-card-bg);
  box-shadow: var(--scenario-card-shadow);
  animation: scenarioStepIn 0.4s var(--ease-spring) both;
}

.scenario-end-fail {
  border-color: var(--scenario-health-danger);
  border-left: 4px solid var(--scenario-health-danger);
}

.scenario-end-success {
  border-color: var(--scenario-health-good);
  border-left: 4px solid var(--scenario-health-good);
}

.scenario-end-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2));
}

.scenario-end-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.scenario-end-grade {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.grade-expert  { background: rgba(22,163,74,0.15); color: #16a34a; }
.grade-good    { background: rgba(37,99,235,0.12);  color: var(--color-accent); }
.grade-ok      { background: rgba(217,119,6,0.12);  color: #d97706; }
.grade-poor    { background: rgba(220,38,38,0.10);  color: #dc2626; }

.scenario-end-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.55;
}

.scenario-end-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.scenario-end-stat {
  text-align: center;
  min-width: 80px;
}

.scenario-end-stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.2;
}

.scenario-end-stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.scenario-health-final { font-size: var(--text-xl); font-weight: 800; font-family: var(--font-mono); }
.scenario-health-final.good   { color: var(--scenario-health-good); }
.scenario-health-final.warn   { color: var(--scenario-health-warn); }
.scenario-health-final.danger { color: var(--scenario-health-danger); }

.scenario-end-lesson {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.55;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
  text-align: left;
}

.scenario-end-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.scenario-btn-retry,
.scenario-btn-exit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  border: none;
}

.scenario-btn-retry {
  background: var(--scenario-next-bg);
  color: var(--scenario-next-color);
}

.scenario-btn-retry:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.scenario-btn-exit:hover {
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

[data-theme="arcade"] .scenario-btn-retry,
[data-theme="arcade"] .scenario-btn-exit {
  border-radius: 0 !important;
  border: 2px solid var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ─────────────────────────────────────────────────────────────
   LOADING PLACEOLDER
   ───────────────────────────────────────────────────────────── */
.scenario-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.scenario-loading-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: pulse 1.5s infinite;
}

.scenario-loading-text {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}

/* Kütüphane senaryo rozeti */
.lib-badge-scenario {
  background: rgba(168, 85, 247, 0.12) !important;
  color: #a855f7 !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — Mobil
   ───────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .scenario-main {
    flex-direction: column;
  }

  .scenario-history-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--scenario-history-border);
    flex-shrink: 0;
  }

  .scenario-hud {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 12px;
    gap: 8px;
  }

  .scenario-hud-left {
    flex: 1;
  }

  .scenario-progress-wrap {
    order: 3;
    width: 100%;
    flex: none;
  }

  .scenario-hud-right {
    order: 2;
  }

  .scenario-health-wrap {
    min-width: 90px;
  }

  .scenario-action-area {
    padding: 14px;
  }

  .scenario-end-stats {
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .scenario-hud-title-block {
    display: none;
  }

  .scenario-end-actions {
    flex-direction: column;
  }

  .scenario-btn-retry,
  .scenario-btn-exit {
    width: 100%;
    justify-content: center;
  }
}
/* Arena dialog */
#arena-boss-dialog.active   { display: flex !important; }
#arena-boss-dialog.closing  { animation: arenaDialogOut 0.45s ease forwards; }
@keyframes arenaDialogOut   { to { opacity: 0; transform: scale(0.96); } }

/* Arena boss avatar */
#arena-boss-avatar.combat-visible { opacity: 1 !important; pointer-events: all; }
#arena-boss-avatar.dialog-open    { opacity: 1 !important; animation: pulse 1s infinite; }

/* Joker butonları */
.arena-joker-btn {
  background: rgba(0,0,0,0.7);
  border: 1px solid #333;
  color: #ccc;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: monospace;
  transition: border-color 0.2s;
}
.arena-joker-btn:hover  { border-color: #00ff9d; color: #00ff9d; }
.arena-joker-btn.disabled { opacity: 0.35; cursor: not-allowed; }

/* Arena dialog option */
.arena-dialog-option {
  padding: 10px 14px;
  background: #111;
  border: 1px solid #222;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.arena-dialog-option:hover       { border-color: #00ff9d; background: #0a2a1a; }
.arena-dialog-option.selected-option { border-color: #bc13fe; background: #1a0a2a; color: #fff; }

/* Arena Game Over card */
.arena-go-card {
  background: rgba(0,20,10,0.96);
  padding: 36px;
  border: 2px solid;
  border-radius: 10px;
  text-align: center;
  max-width: 440px;
  width: 92%;
  font-family: 'Courier New', monospace;
}
.arena-go-title  { font-size: 32px; margin: 0 0 20px; }
.arena-go-stats  { text-align: left; margin-bottom: 24px; font-size: 14px; color: #ccc; border: 1px solid #1a1a1a; border-radius: 6px; padding: 14px; }
.arena-go-row    { display: flex; justify-content: space-between; margin-bottom: 8px; }
.arena-go-score  { border-top: 1px dashed #333; padding-top: 10px; margin-top: 6px; font-weight: bold; }
.arena-go-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.arena-go-btn    { padding: 13px 26px; border-radius: 6px; font-weight: bold; font-family: monospace; font-size: 14px; cursor: pointer; }
.arena-go-btn-primary   { border: none; color: #000; }
.arena-go-btn-secondary { background: transparent; border: 1px solid; }

/* Arena typewriter cursor */
.arena-typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #00ff9d;
  animation: blink 0.7s infinite;
  vertical-align: text-bottom;
  margin-left: 1px;
}
/* ══════════════════════════════════════════════════════════════════
   ARENA MODU — EKSİK KEYFRAME VE FX SINIFLARI
   ══════════════════════════════════════════════════════════════════ */

/* Blink animasyonu (typewriter cursor + target-status için) */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Canvas efekt sınıfları — fx-correct / fx-wrong / fx-levelup */
#arena-ui.fx-correct {
  animation: arena-flash-correct 0.6s ease forwards;
}
#arena-ui.fx-wrong {
  animation: arena-flash-wrong 0.5s ease forwards;
}
#arena-ui.fx-levelup {
  animation: arena-flash-levelup 0.8s ease forwards;
}

@keyframes arena-flash-correct {
  0%   { filter: none; }
  20%  { filter: brightness(1.4) saturate(1.6) hue-rotate(100deg); }
  100% { filter: none; }
}
@keyframes arena-flash-wrong {
  0%   { filter: none; }
  20%  { filter: brightness(1.3) saturate(2) hue-rotate(-20deg); }
  100% { filter: none; }
}
@keyframes arena-flash-levelup {
  0%   { filter: none; }
  30%  { filter: brightness(1.6) saturate(2) hue-rotate(60deg); }
  100% { filter: none; }
}

/* boss-hit / boss-mock / boss-anger / boss-laugh / boss-evolve */
#arena-boss-avatar.boss-hit {
  animation: arena-boss-hit 0.22s ease;
}
#arena-boss-avatar.boss-mock {
  animation: arena-boss-mock 0.52s ease;
}
#arena-boss-avatar.boss-anger {
  animation: arena-boss-anger 0.7s ease;
}
#arena-boss-avatar.boss-laugh {
  animation: arena-boss-laugh 0.7s ease;
}
#arena-boss-avatar.boss-evolve {
  animation: arena-boss-evolve 1.2s ease;
}

@keyframes arena-boss-hit   { 0%,100%{transform:scale(1) rotate(0deg)} 50%{transform:scale(1.25) rotate(-8deg)} }
@keyframes arena-boss-mock  { 0%,100%{transform:scale(1)} 30%{transform:scale(0.88)} 70%{transform:scale(1.08)} }
@keyframes arena-boss-anger { 0%,100%{transform:scale(1) rotate(0deg)} 25%{transform:scale(1.1) rotate(5deg)} 75%{transform:scale(1.1) rotate(-5deg)} }
@keyframes arena-boss-laugh { 0%,100%{transform:translateY(0)} 25%{transform:translateY(-6px)} 75%{transform:translateY(4px)} }
@keyframes arena-boss-evolve{ 0%{transform:scale(1)} 50%{transform:scale(1.4) rotate(180deg)} 100%{transform:scale(1) rotate(360deg)} }

/* Dijital burst partikülleri */
.digit-particle {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  pointer-events: none;
  animation: digit-fly 1s ease-out forwards;
  user-select: none;
}
@keyframes digit-fly {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.4); }
}

/* view-arena tam ekran düzeltmesi — app-header gizlenir */
#view-arena.active ~ #app-header,
body:has(#view-arena.active) #app-header {
  display: none;
}

/* arena-game-over flex aktif */
#arena-game-over[style*="flex"],
#arena-game-over.active { display: flex !important; }
/* ═══════════════════════════════════════════════════════════════════
   KAVRAM BULMACASI — #view-crossword Oyun Stilleri  v2
   Tam Responsive: Mobil · Tablet · Desktop · Landscape
   Tüm seçiciler #view-crossword veya .cw- öneki ile kapsamlandırılmış.
   Global body/background değerlerine dokunulmaz.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Değişkenler & Temel Layout ────────────────────────────────── */
#view-crossword {
  --cw-bg-void:      #050505;
  --cw-bg-panel:     #0a0f14;
  --cw-bg-card:      #0d1318;
  --cw-neon-cyan:    #00d4ff;
  --cw-neon-green:   #00ff41;
  --cw-neon-red:     #ff003c;
  --cw-neon-amber:   #ffaa00;
  --cw-border-dim:   #1a2530;
  --cw-border-mid:   #223040;
  --cw-text-primary: #c8e6f0;
  --cw-text-dim:     #4a6070;
  --cw-glow-cyan:    0 0 8px #00d4ff60, 0 0 20px #00d4ff30, 0 0 40px #00d4ff15;
  --cw-glow-green:   0 0 8px #00ff4160, 0 0 20px #00ff4130, 0 0 40px #00ff4115;
  --cw-glow-red:     0 0 8px #ff003c60, 0 0 20px #ff003c30;
  --cw-glow-amber:   0 0 8px #ffaa0060, 0 0 20px #ffaa0030;
  --cw-font:         'JetBrains Mono', monospace;

  /* Boyut değişkenleri — alt breakpoint'lerde override edilir */
  --cw-tile-inner:     38px;
  --cw-tile-font:      15px;
  --cw-header-px:      16px;
  --cw-header-py:      10px;
  --cw-clue-px:        16px;
  --cw-clue-py:        8px;
  --cw-clue-font:      13px;
  --cw-tray-btn:       42px;
  --cw-tray-font:      17px;
  --cw-tray-gap:       8px;
  --cw-board-px:       16px;
  --cw-board-py:       10px;
  --cw-interact-px:    16px;
  --cw-interact-py:    12px;
  --cw-interact-gap:   10px;

  position: fixed;
  inset: 0;
  /* iPhone notch / Android nav bar güvenli alan */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left:   env(safe-area-inset-left,   0px);
  padding-right:  env(safe-area-inset-right,  0px);
  display: flex;
  flex-direction: column;
  height: 100dvh;          /* tarayıcı chrome dahil gerçek yükseklik */
  background: var(--cw-bg-void);
  color: var(--cw-text-primary);
  font-family: var(--cw-font);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  z-index: 50;
}

/* ── Game Header ─────────────────────────────────────────────── */
#view-crossword .cw-game-header {
  width: 100%;
  background: var(--cw-bg-panel);
  border-bottom: 1px solid var(--cw-border-dim);
  padding: var(--cw-header-py) var(--cw-header-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
}
#view-crossword .cw-game-header-left {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1;
}
#view-crossword .cw-game-header-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
#view-crossword .cw-back-btn {
  background: transparent;
  border: 1px solid var(--cw-border-dim);
  color: var(--cw-text-dim);
  font-family: var(--cw-font);
  font-size: 9px;
  letter-spacing: 0.15em;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
#view-crossword .cw-back-btn:hover { border-color: var(--cw-neon-cyan); color: var(--cw-neon-cyan); }
#view-crossword .cw-game-module-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--cw-neon-cyan);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#view-crossword .cw-score-display {
  display: flex; align-items: center; gap: 5px;
  font-size: 9px; color: var(--cw-text-dim);
  letter-spacing: 0.12em; white-space: nowrap;
}
#view-crossword .cw-score-value {
  font-size: 14px; font-weight: 700;
  color: var(--cw-neon-green);
  text-shadow: var(--cw-glow-green);
}
#view-crossword .cw-progress-bar-wrap {
  width: clamp(60px, 12vw, 120px);
  height: 3px;
  background: var(--cw-bg-card);
  border: 1px solid var(--cw-border-dim);
  border-radius: 2px;
  overflow: hidden;
}
#view-crossword .cw-progress-bar-fill {
  height: 100%; width: 0%;
  background: var(--cw-neon-cyan);
  box-shadow: var(--cw-glow-cyan);
  transition: width 0.6s ease;
}

/* ── Clue Section ────────────────────────────────────────────── */
#view-crossword .cw-clue-section {
  width: 100%;
  padding: var(--cw-clue-py) var(--cw-clue-px);
  flex-shrink: 0;
}
#view-crossword .cw-clue-box {
  background: var(--cw-bg-card);
  border: 1px solid rgba(0,212,255,0.27);
  border-radius: 4px;
  padding: 8px 14px 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 20px rgba(0,212,255,0.05);
  position: relative;
  overflow: hidden;
}
#view-crossword .cw-clue-box::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--cw-neon-cyan);
  box-shadow: var(--cw-glow-cyan);
}
#view-crossword .cw-clue-label {
  font-size: 8px; font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--cw-neon-cyan);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
#view-crossword .cw-clue-text {
  font-size: var(--cw-clue-font);
  color: var(--cw-text-primary);
  line-height: 1.4;
}

/* ── Word Counter ────────────────────────────────────────────── */
#view-crossword .cw-word-counter {
  padding: 0 var(--cw-clue-px) 5px;
  font-size: 8px;
  color: var(--cw-text-dim);
  letter-spacing: 0.2em;
  display: flex; gap: 10px;
  flex-shrink: 0;
}
#view-crossword .cw-word-counter span { color: var(--cw-neon-cyan); }

/* ── Board ───────────────────────────────────────────────────── */
#view-crossword .cw-board-section {
  flex: 1 1 0%;   /* kalan tüm dikey alanı kapla */
  min-height: 0;  /* flex overflow engelleyici */
  overflow: hidden;
  padding: var(--cw-board-py) var(--cw-board-px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: grab;
}
#view-crossword .cw-board-section.cw-dragging { cursor: grabbing !important; user-select: none; }
#view-crossword .cw-crossword-grid {
  position: relative; margin: auto; flex-shrink: 0;
  transform-origin: center center;
  transition: transform 0.3s ease;
}

/* ── Tile ────────────────────────────────────────────────────── */
#view-crossword .cw-tile {
  position: absolute;
  width: var(--cw-tile-inner);
  height: var(--cw-tile-inner);
  border: 1px solid var(--cw-border-dim);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--cw-tile-font);
  font-weight: 700;
  color: transparent;
  background: var(--cw-bg-card);
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
#view-crossword .cw-tile.cw-revealed {
  color: var(--cw-neon-green);
  border-color: var(--cw-neon-green);
  background: rgba(0,255,65,.06);
  box-shadow: 0 0 8px rgba(0,255,65,.3);
  animation: cw-tile-reveal .4s ease forwards;
}
@keyframes cw-tile-reveal {
  0%   { transform: scale(.8) rotateY(90deg); }
  60%  { transform: scale(1.05) rotateY(0deg); box-shadow: 0 0 8px #00ff4160, 0 0 20px #00ff4130; }
  100% { transform: scale(1); }
}
#view-crossword .cw-tile.cw-wrong-flash {
  border-color: var(--cw-neon-red) !important;
  background: rgba(255,0,60,.1) !important;
  animation: cw-tile-wrong .45s ease forwards;
}
@keyframes cw-tile-wrong {
  0%,100% { border-color: var(--cw-border-dim); background: var(--cw-bg-card); }
  40%     { border-color: var(--cw-neon-red); background: rgba(255,0,60,.1); box-shadow: var(--cw-glow-red); }
}
@keyframes cw-tile-entrance {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}
#view-crossword .cw-tile.cw-target-focus {
  background: rgba(0,212,255,.08);
  border-color: rgba(0,212,255,.5);
  box-shadow: inset 0 0 10px rgba(0,212,255,.12), 0 0 6px rgba(0,212,255,.2);
  transition: all .3s ease;
}
#view-crossword .cw-tile.cw-typed {
  color: var(--cw-neon-cyan) !important;
  text-shadow: var(--cw-glow-cyan);
  font-weight: 900; opacity: .9;
  border-color: rgba(0,212,255,.6) !important;
  background: rgba(0,212,255,.06) !important;
  animation: cw-typed-pop .15s ease both;
}
@keyframes cw-typed-pop {
  0%   { transform: scale(.7); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── Interaction Section ─────────────────────────────────────── */
#view-crossword .cw-interaction-section {
  flex-shrink: 0;
  padding: var(--cw-interact-py) var(--cw-interact-px);
  padding-bottom: max(var(--cw-interact-py), env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cw-interact-gap);
  background: var(--cw-bg-void);
  border-top: 1px solid var(--cw-border-dim);
  z-index: 10;
}

/* ── Letter Tray ─────────────────────────────────────────────── */
#view-crossword #cw-letter-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--cw-tray-gap);
  width: 100%;
  max-width: 520px;
  padding: 2px 0;
}
#view-crossword .cw-tray-letter-btn {
  width: var(--cw-tray-btn);
  height: var(--cw-tray-btn);
  background: var(--cw-bg-card);
  border: 1px solid var(--cw-border-mid);
  border-radius: 6px;
  color: var(--cw-text-primary);
  font-family: var(--cw-font);
  font-size: var(--cw-tray-font);
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  animation: cw-tray-pop .2s ease both;
  -webkit-tap-highlight-color: transparent;
}
@keyframes cw-tray-pop {
  0%   { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}
#view-crossword .cw-tray-letter-btn:hover:not(.used) {
  background: rgba(0,212,255,.12);
  border-color: var(--cw-neon-cyan);
  color: var(--cw-neon-cyan);
  box-shadow: var(--cw-glow-cyan);
  transform: scale(1.08);
}
#view-crossword .cw-tray-letter-btn:active:not(.used) { transform: scale(.9); }
#view-crossword .cw-tray-letter-btn.used {
  opacity: .35; pointer-events: none;
  transform: scale(.82);
  background: rgba(0,0,0,.6);
  border: 1px dashed var(--cw-border-dim);
  color: var(--cw-border-mid);
  box-shadow: inset 0 0 8px rgba(0,0,0,.8);
  transition: all .18s;
}

/* ── Action Row ──────────────────────────────────────────────── */
#view-crossword .cw-action-row { display: flex; gap: 10px; }
#view-crossword .cw-action-btn {
  padding: 8px 24px;
  font-family: var(--cw-font);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  border-radius: 4px; cursor: pointer;
  transition: all .2s; background: transparent;
  -webkit-tap-highlight-color: transparent;
}
#view-crossword .cw-action-btn.cw-clear {
  border: 1px solid var(--cw-border-dim);
  color: var(--cw-text-dim);
}
#view-crossword .cw-action-btn.cw-clear:hover  { border-color: var(--cw-neon-red);   color: var(--cw-neon-red); }
#view-crossword .cw-action-btn.cw-clear:active { background: rgba(255,0,60,.08); }
#view-crossword .cw-action-btn.cw-pass {
  border: 1px solid var(--cw-border-dim);
  color: var(--cw-neon-amber);
}
#view-crossword .cw-action-btn.cw-pass:hover {
  border-color: var(--cw-neon-amber);
  box-shadow: var(--cw-glow-amber);
  background: rgba(255,170,0,.1);
}
#view-crossword .cw-action-btn.cw-pass:active { background: rgba(255,170,0,.18); }

/* ── Level Complete ──────────────────────────────────────────── */
#view-crossword .cw-level-complete {
  position: absolute; inset: 0; z-index: 300;
  background: rgba(5,5,5,.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(12px, 2.5vh, 24px);
  padding: 20px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
  text-align: center;
}
#view-crossword .cw-level-complete.visible { opacity: 1; pointer-events: all; }
#view-crossword .cw-lc-badge {
  font-size: clamp(7px,1.8vw,10px);
  letter-spacing: .4em; color: var(--cw-text-dim);
  text-transform: uppercase;
}
#view-crossword .cw-lc-title {
  font-size: clamp(20px, 5.5vw, 42px);
  font-weight: 800; letter-spacing: .1em;
  color: var(--cw-neon-green);
  text-shadow: var(--cw-glow-green);
  animation: cw-lc-pulse 2s ease-in-out infinite;
}
@keyframes cw-lc-pulse {
  0%,100% { text-shadow: var(--cw-glow-green); }
  50%     { text-shadow: 0 0 20px #00ff4180, 0 0 60px #00ff4140; }
}
#view-crossword .cw-lc-stats { display: flex; gap: clamp(16px,5vw,40px); }
#view-crossword .cw-lc-stat  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#view-crossword .cw-lc-stat-value {
  font-size: clamp(20px,5vw,32px); font-weight: 800;
  color: var(--cw-neon-cyan); text-shadow: var(--cw-glow-cyan);
}
#view-crossword .cw-lc-stat-label {
  font-size: 9px; letter-spacing: .3em;
  color: var(--cw-text-dim); text-transform: uppercase;
}
#view-crossword .cw-lc-divider {
  width: 100px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cw-neon-green), transparent);
  opacity: .5;
}

/* ── Particles ───────────────────────────────────────────────── */
.cw-particle {
  position: fixed; pointer-events: none; z-index: 9999;
  font-size: 12px; font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: #00ff41;
  text-shadow: 0 0 8px #00ff4160, 0 0 20px #00ff4130;
  animation: cw-particle-up 1s ease forwards;
}
@keyframes cw-particle-up {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-80px) scale(.5); opacity: 0; }
}

/* ── Crossword Toast ─────────────────────────────────────────── */
.cw-toast {
  background: #0a0f14; border: 1px solid #223040;
  border-radius: 4px; padding: 9px 14px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em;
  font-family: 'JetBrains Mono', monospace;
  transform: translateX(120%);
  transition: transform .3s ease;
  white-space: nowrap;
}
.cw-toast.show { transform: translateX(0); }
.cw-toast.xp   { border-color: #00ff41; color: #00ff41; box-shadow: 0 0 15px rgba(0,255,65,.2); }
.cw-toast.err  { border-color: #ff003c; color: #ff003c; }
.cw-toast.warn { border-color: #ffaa00; color: #ffaa00; }


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════════════════ */

/* Tablet  481–768 px */
@media (max-width: 768px) {
  #view-crossword {
    --cw-tile-inner:   34px;
    --cw-tile-font:    14px;
    --cw-header-px:    14px;  --cw-header-py:   8px;
    --cw-clue-px:      14px;  --cw-clue-py:     7px;
    --cw-clue-font:    12px;
    --cw-tray-btn:     40px;  --cw-tray-font:   16px;
    --cw-tray-gap:     7px;
    --cw-board-px:     14px;  --cw-board-py:    8px;
    --cw-interact-px:  14px;  --cw-interact-py: 10px;
    --cw-interact-gap: 8px;
  }
}

/* Mobil  ≤ 480 px */
@media (max-width: 480px) {
  #view-crossword {
    --cw-tile-inner:   30px;
    --cw-tile-font:    12px;
    --cw-header-px:    12px;  --cw-header-py:   6px;
    --cw-clue-px:      12px;  --cw-clue-py:     6px;
    --cw-clue-font:    12px;
    --cw-tray-btn:     37px;  --cw-tray-font:   15px;
    --cw-tray-gap:     6px;
    --cw-board-px:     10px;  --cw-board-py:    5px;
    --cw-interact-px:  12px;  --cw-interact-py: 8px;
    --cw-interact-gap: 6px;
  }
  /* Modül adı küçük ekranda gereksiz yer kaplar */
  #view-crossword .cw-game-module-name { display: none; }
  /* İpucu etiketi yeterince açıklayıcı — label gereksiz */
  #view-crossword .cw-clue-label       { display: none; }
}

/* Çok küçük telefon  ≤ 360 px */
@media (max-width: 360px) {
  #view-crossword {
    --cw-tile-inner:  26px;
    --cw-tile-font:   11px;
    --cw-tray-btn:    34px;   --cw-tray-font:  13px;
    --cw-tray-gap:    5px;
    --cw-board-px:    8px;    --cw-board-py:   4px;
    --cw-header-px:   10px;   --cw-header-py:  5px;
    --cw-clue-px:     10px;   --cw-clue-py:    5px;
    --cw-interact-px: 10px;   --cw-interact-py: 6px;
    --cw-interact-gap: 5px;
  }
}

/* Landscape — kısa ekran ≤ 480 px yükseklik */
@media (max-height: 480px) and (orientation: landscape) {
  #view-crossword {
    --cw-tile-inner:  26px;
    --cw-tile-font:   11px;
    --cw-tray-btn:    34px;   --cw-tray-font:  13px;
    --cw-tray-gap:    5px;
    --cw-board-px:    10px;   --cw-board-py:   4px;
    --cw-header-px:   12px;   --cw-header-py:  5px;
    --cw-clue-px:     12px;   --cw-clue-py:    4px;
    --cw-interact-px: 12px;   --cw-interact-py: 4px;
    --cw-interact-gap: 5px;
  }

  /* Tray: tek satır yatay kaydırma */
  #view-crossword #cw-letter-tray {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 100%;
    scrollbar-width: none;
  }
  #view-crossword #cw-letter-tray::-webkit-scrollbar { display: none; }

  /* Interaction: tray sol + butonlar sağ */
  #view-crossword .cw-interaction-section {
    flex-direction: row;
    justify-content: center;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  #view-crossword .cw-action-row  { flex-direction: column; gap: 4px; flex-shrink: 0; }
  #view-crossword .cw-action-btn  { padding: 5px 12px; font-size: 9px; }

  /* Yer kazanımı */
  #view-crossword .cw-game-module-name { display: none; }
  #view-crossword .cw-word-counter     { display: none; }
}

/* Landscape — orta yükseklik 481–600 px */
@media (max-height: 600px) and (min-height: 481px) and (orientation: landscape) {
  #view-crossword {
    --cw-tile-inner:  32px;
    --cw-tile-font:   13px;
    --cw-tray-btn:    36px;   --cw-tray-font: 14px;
    --cw-board-py:    6px;
    --cw-interact-py: 6px;
  }
  #view-crossword .cw-word-counter { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   / KAVRAM BULMACASI Stilleri Sonu
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE FIX PATCH — v4.1.0
   Tüm view'lar için mobil/tablet/desktop optimizasyonu
   ═══════════════════════════════════════════════════════════════════ */

/* ── Global Overflow Koruma ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100vw; overflow-x: hidden; }

/* ── Safe Area düzeltmesi (iPhone notch vb.) ── */
.app-header {
  padding-top: max(var(--safe-top, 0px), env(safe-area-inset-top, 0px));
}
.app-main {
  padding-top: calc(var(--header-height) + max(var(--safe-top, 0px), env(safe-area-inset-top, 0px)));
}

/* ── Header: çok dar ekranlar (<360px) ── */
@media (max-width: 359px) {
  .app-header { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .player-chip { padding: 4px 8px 4px 4px; gap: 4px; }
  .player-avatar { width: 26px; height: 26px; font-size: 11px; }
  .player-info { display: none; }
  .header-actions { gap: 4px; }
  .btn-icon { width: 32px; height: 32px; font-size: 14px; }
  .btn-primary { padding: 0 10px; height: 32px; font-size: 11px; }
  .btn-primary span[data-i18n] { display: none; }
  .btn-lang { font-size: 10px; }
}

/* ── Header: dar telefonlar (360-479px) ── */
@media (min-width: 360px) and (max-width: 479px) {
  .player-info .player-status { display: none; }
  .player-name { font-size: 12px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── Stats Strip: dar ekran düzeltmesi ── */
@media (max-width: 400px) {
  .stats-strip { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat-card { padding: 10px 6px; }
  .stat-value { font-size: 18px; }
  .stat-label { font-size: 9px; letter-spacing: 0.03em; }
}

/* ── Mode Cards: tek sütun for very small ── */
@media (max-width: 359px) {
  .modes-grid { grid-template-columns: 1fr; gap: 10px; }
  .mode-card { min-height: 140px; }
  .mode-card-content { padding: 14px; }
  .mode-card-icon { font-size: 28px; }
  .mode-card-title { font-size: 15px; }
  .mode-card-desc { font-size: 11px; }
}

/* ── Mode Cards: 2 sütun (360-599px) ── */
@media (min-width: 360px) and (max-width: 599px) {
  .modes-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mode-card { min-height: 160px; }
  .mode-card-content { padding: 14px; }
  .mode-card-desc { font-size: 12px; -webkit-line-clamp: 2; }
}

/* ── Main Content padding düzeltmesi ── */
@media (max-width: 479px) {
  .main-inner { padding: 16px 12px 80px; }
  .dashboard-hero { margin-bottom: 16px; }
  .dashboard-hero-title { font-size: clamp(20px, 5.5vw, 28px); }
  .dashboard-hero-sub { font-size: 13px; }
}

/* ── Lobby düzeltmeleri ── */
@media (max-width: 479px) {
  .lobby-wrapper { padding: 16px 10px 32px; }
  .lobby-tab { padding: 10px 14px; font-size: 12px; }
  .lobby-header-bar { gap: 8px; flex-wrap: wrap; }
}

/* ── Modal düzeltmeleri ── */
@media (max-width: 359px) {
  .modal-sheet { max-width: 100%; border-radius: 16px 16px 0 0; }
  .modal-header { padding: 12px 14px; }
  .modal-title { font-size: 16px; }
  .modal-body { padding: 14px; }
  .modal-footer { padding: 12px 14px; }
}

/* ── Clan modal düzeltmeleri ── */
@media (max-width: 479px) {
  .clan-modal-box {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin: 0 12px;
  }
  .clan-onboard-grid { grid-template-columns: 1fr; max-width: none; }
}

/* ── Game View: dvh düzeltmesi ── */
#view-game {
  height: calc(100dvh - var(--header-height));
  height: calc(100vh - var(--header-height));
  height: calc(var(--vh, 1vh) * 100 - var(--header-height));
}

/* ── Arena View: tam ekran düzeltmesi ── */
#view-arena {
  height: 100dvh !important;
  height: 100vh !important;
  height: calc(var(--vh, 1vh) * 100) !important;
}

/* ── Crossword: küçük ekran grid düzeltmesi ── */
@media (max-width: 359px) {
  #view-crossword {
    --cw-tile-inner: 26px;
    --cw-tile-font: 11px;
    --cw-tray-btn: 30px;
    --cw-tray-font: 12px;
  }
  #view-crossword .cw-clue-box { font-size: 12px; padding: 8px 10px; }
}

/* ── Scenario View overflow düzeltmesi ── */
#view-scenario {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ── Training View responsive ── */
@media (max-width: 479px) {
  #view-training .training-wrapper { padding: 12px; }
}

/* ── Lobby generate bölümü düzeltmesi ── */
@media (max-width: 599px) {
  .lobby-generate-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .lobby-generate-row > * {
    width: 100% !important;
    max-width: none !important;
  }
}

/* ── Dropzone düzeltmesi ── */
@media (max-width: 479px) {
  .dropzone { padding: 20px 12px; min-height: 100px; }
  .dropzone-icon { font-size: 28px; }
  .dropzone-text { font-size: 13px; }
  .dropzone-hint { font-size: 11px; }
}

/* ── Tablet optimizasyonu (600-1023px) ── */
@media (min-width: 600px) and (max-width: 1023px) {
  .main-inner { max-width: 800px; padding: 24px 20px; }
  .modes-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .mode-card { min-height: 180px; }
}

/* ── Geniş masaüstü (1200px+) ── */
@media (min-width: 1200px) {
  .main-inner { max-width: 1200px; }
  .modes-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .mode-card { min-height: 220px; }
  .lobby-wrapper { max-width: 1000px; }
}

/* ── Touch cihaz hover state'lerini düzelt ── */
@media (hover: none) and (pointer: coarse) {
  .mode-card:hover { transform: none; box-shadow: var(--shadow-card); }
  .btn-icon:hover { transform: none; }
  .player-chip:hover { box-shadow: var(--shadow-sm); border-color: var(--border-subtle); }
}

/* ── Keyboard/input focus güvenliği ── */
@media (max-height: 500px) {
  .modal-sheet { max-height: 98dvh; max-height: 98vh; }
  .modal-body { max-height: 60vh; overflow-y: auto; }
}

/* ── Print stili (opsiyonel) ── */
@media print {
  .app-header, .nav-bottom, .modal-overlay { display: none !important; }
  .app-main { padding-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   / RESPONSIVE FIX PATCH Sonu
   ═══════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   JETON SİSTEMİ STİLLERİ — v1.0.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Header Jeton Bakiye Butonu ── */
.btn-token-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 34px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 179, 8, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.btn-token-balance:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 179, 8, 0.15));
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}
.btn-token-balance .token-icon { font-size: 14px; }
.btn-token-balance .token-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
}

@media (max-width: 359px) {
  .btn-token-balance { padding: 0 6px; height: 30px; }
  .btn-token-balance .token-count { font-size: 11px; }
}

/* ── Jeton Mağazası Overlay ── */
.token-shop-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.token-shop-overlay.show { display: flex; }

/* ── Mağaza Kutusu ── */
.token-shop-box {
  width: 100%; max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  max-height: 90dvh; max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.token-shop-close {
  position: absolute; top: 12px; right: 14px;
  background: var(--bg-sunken); border: none; color: var(--text-secondary);
  width: 32px; height: 32px; border-radius: 50%; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: 0.2s;
}
.token-shop-close:hover { background: var(--border-subtle); color: var(--text-primary); }

/* ── Mağaza Header ── */
.token-shop-header {
  padding: 24px 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--divider);
}
.token-shop-title { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.token-shop-balance {
  font-size: 13px; color: var(--text-secondary);
  background: var(--bg-sunken); padding: 6px 12px; border-radius: 20px;
}
.token-shop-balance strong { color: #f59e0b; }

/* ── Ücretsiz Hak Bilgisi ── */
.token-shop-free-info {
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.04));
  border-bottom: 1px solid var(--divider);
  font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.token-free-badge { font-size: 16px; }
.token-shop-free-info strong { color: #10b981; }

/* ── Paket Kartları ── */
.token-shop-packages {
  padding: 16px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.token-pkg-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 16px 10px;
  background: var(--bg-sunken);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  cursor: pointer; transition: all 0.2s;
  position: relative;
}
.token-pkg-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.token-pkg-card.popular {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(234,179,8,0.04));
}
.token-pkg-card.popular:hover { border-color: #fbbf24; }
.token-pkg-badge {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: #f59e0b; color: #000; font-size: 9px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
  letter-spacing: 0.04em;
}
.token-pkg-icon { font-size: 24px; }
.token-pkg-amount { font-size: 22px; font-weight: 900; color: var(--text-primary); font-family: var(--font-display); }
.token-pkg-label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.token-pkg-price { font-size: 15px; font-weight: 800; color: var(--color-accent); margin-top: 4px; }
.token-pkg-per { font-size: 10px; color: var(--text-tertiary); }

/* ── Mağaza Footer ── */
.token-shop-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--divider);
  text-align: center;
}
.token-shop-footer p { font-size: 11px; color: var(--text-tertiary); margin: 0 0 4px; }
.token-shop-secure { color: #10b981 !important; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 359px) {
  .token-shop-packages { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .token-shop-header { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════════
   / JETON SİSTEMİ STİLLERİ Sonu
   ═══════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   FİYATLANDIRMA + FOOTER + YASAL MODAL — v4.2.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fiyatlandırma ── */
.pricing-section { margin-bottom: 32px; }
.pricing-intro { margin-bottom: 20px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pricing-card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 24px 20px; text-align: center;
  position: relative; transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card-popular {
  border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-md);
}
.pricing-popular-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--color-accent); color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 12px; border-radius: 20px; letter-spacing: 0.05em;
}
.pricing-card-header { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }
.pricing-icon { font-size: 28px; }
.pricing-name { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.pricing-price {
  font-size: 36px; font-weight: 900; color: var(--text-primary);
  font-family: var(--font-display); margin-bottom: 16px;
}
.pricing-price small { font-size: 18px; font-weight: 600; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.pricing-features li {
  padding: 6px 0; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-btn {
  width: 100%; padding: 12px; border: 1px solid var(--border-subtle);
  border-radius: 10px; background: var(--bg-sunken); color: var(--text-primary);
  font-size: 14px; font-weight: 700; cursor: pointer; transition: 0.2s;
  font-family: var(--font-sans);
}
.pricing-btn:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.pricing-btn-primary {
  background: var(--color-accent); color: #fff; border-color: var(--color-accent);
}
.pricing-btn-primary:hover { opacity: 0.9; }
.pricing-note { text-align: center; font-size: 12px; color: var(--text-tertiary); margin-top: 16px; }

@media (max-width: 479px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-price { font-size: 28px; }
}

/* ── Hakkımızda ── */
.about-section {
  margin-bottom: 32px; padding: 20px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: 14px;
  font-size: 14px; line-height: 1.8; color: var(--text-secondary);
}
.about-section p { margin: 0 0 12px; }
.about-section p:last-child { margin-bottom: 0; }

/* ── Site Footer ── */
.site-footer {
  border-top: 1px solid var(--divider); padding: 32px 0 24px;
  margin-top: 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 clamp(12px, 4vw, 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-logo { font-size: 14px; font-weight: 800; color: var(--text-primary); }
.footer-copy { font-size: 11px; color: var(--text-tertiary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a {
  font-size: 12px; color: var(--text-secondary); text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--color-accent); text-decoration: underline; }
.footer-contact a { font-size: 12px; color: var(--text-tertiary); text-decoration: none; }
.footer-contact a:hover { color: var(--color-accent); }

@media (max-width: 599px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-direction: column; gap: 8px; }
}

/* ── Yasal Modal ── */
.legal-modal-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.legal-modal-overlay.show { display: flex; }
.legal-modal-box {
  width: 100%; max-width: 640px; max-height: 85vh;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  position: relative;
}
.legal-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: var(--bg-sunken); border: none; color: var(--text-secondary);
  width: 32px; height: 32px; border-radius: 50%; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: 0.2s; z-index: 2;
}
.legal-modal-close:hover { background: var(--border-subtle); color: var(--text-primary); }
.legal-modal-title {
  padding: 20px 24px 16px; font-size: 18px; font-weight: 800;
  color: var(--text-primary); border-bottom: 1px solid var(--divider); flex-shrink: 0;
}
.legal-modal-body {
  padding: 20px 24px 28px; overflow-y: auto; font-size: 13px;
  line-height: 1.8; color: var(--text-secondary);
  -webkit-overflow-scrolling: touch;
}
.legal-modal-body h3 {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin: 20px 0 8px; padding: 0;
}
.legal-modal-body p { margin: 0 0 12px; }

@media (max-width: 479px) {
  .legal-modal-box { max-width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .legal-modal-title { font-size: 16px; padding: 16px 18px 12px; }
  .legal-modal-body { padding: 16px 18px 24px; }
}

/* ═══════════════════════════════════════════════════════════════════
   / FİYATLANDIRMA + FOOTER + YASAL MODAL Sonu
   ═══════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   DETAYLI JETON MAĞAZASI — v4.2.0
   Tab'lı: Abonelik Planları + Jeton Paketleri
   ═══════════════════════════════════════════════════════════════════ */

/* ── Overlay (mevcut stili geçersiz kılıyor) ── */
.token-shop-box {
  width: 100%; max-width: 560px;
  max-height: 90dvh; max-height: 90vh;
}

/* ── Header Bandı ── */
.token-shop-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--divider);
  flex-wrap: wrap; gap: 10px;
}
.tsh-left { display: flex; align-items: center; gap: 10px; }
.tsh-icon { font-size: 24px; }
.tsh-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.tsh-balance { font-size: 18px; font-weight: 900; color: var(--text-primary); font-family: var(--font-display); }
.tsh-balance strong { color: #f59e0b; }
.tsh-free {
  display: flex; align-items: center; gap: 5px;
  background: rgba(16,185,129,0.1); padding: 5px 12px; border-radius: 20px;
  font-size: 12px; color: #10b981;
}
.tsh-free-badge { font-size: 14px; }
.tsh-free strong { font-weight: 800; }

/* ── Tab Bar ── */
.ts-tabs {
  display: flex; border-bottom: 1px solid var(--divider);
}
.ts-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px; border: none; background: transparent;
  font-size: 13px; font-weight: 700; color: var(--text-tertiary);
  cursor: pointer; transition: 0.2s; position: relative;
  font-family: var(--font-sans);
}
.ts-tab::after {
  content: ''; position: absolute; bottom: 0; left: 16px; right: 16px;
  height: 2px; background: transparent; border-radius: 2px; transition: 0.2s;
}
.ts-tab:hover { color: var(--text-secondary); background: var(--bg-sunken); }
.ts-tab-active { color: var(--color-accent); }
.ts-tab-active::after { background: var(--color-accent); }

/* ── Panels ── */
.ts-panel { display: none; padding: 16px 18px; overflow-y: auto; max-height: 55vh; }
.ts-panel-active { display: block; }

/* ── Aylık / Yıllık Toggle ── */
.ts-period-toggle {
  display: flex; background: var(--bg-sunken); border-radius: 10px;
  padding: 3px; margin-bottom: 16px; gap: 3px;
}
.ts-period {
  flex: 1; padding: 8px 12px; border: none; border-radius: 8px;
  background: transparent; font-size: 12px; font-weight: 700;
  color: var(--text-tertiary); cursor: pointer; transition: 0.2s;
  font-family: var(--font-sans); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ts-period-active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.ts-save-badge {
  background: #10b981; color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 10px;
}

/* ── Abonelik Kartları ── */
.ts-sub-grid { display: flex; flex-direction: column; gap: 10px; }
.ts-sub-card {
  padding: 16px; border: 1px solid var(--border-subtle); border-radius: 14px;
  background: var(--bg-surface); position: relative; transition: 0.2s;
}
.ts-sub-card:hover { border-color: var(--color-accent); }
.ts-sub-popular { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.ts-popular-badge {
  position: absolute; top: -9px; right: 16px;
  background: var(--color-accent); color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 10px; border-radius: 20px; letter-spacing: 0.04em;
}
.ts-sub-name { font-size: 15px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.ts-sub-price { display: flex; align-items: baseline; gap: 2px; margin-bottom: 10px; }
.ts-sub-amount { font-size: 26px; font-weight: 900; color: var(--text-primary); font-family: var(--font-display); }
.ts-sub-amount small { font-size: 14px; font-weight: 600; }
.ts-sub-per { font-size: 12px; color: var(--text-tertiary); }
.ts-sub-features { list-style: none; padding: 0; margin: 0 0 12px; }
.ts-sub-features li { font-size: 12px; color: var(--text-secondary); padding: 3px 0; }
.ts-sub-features li strong { color: var(--text-primary); }
.ts-sub-btn {
  width: 100%; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 10px;
  background: var(--bg-sunken); color: var(--text-primary); font-size: 13px;
  font-weight: 700; cursor: pointer; transition: 0.2s; font-family: var(--font-sans);
}
.ts-sub-btn:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.ts-sub-btn-primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.ts-sub-btn-primary:hover { opacity: 0.9; }
.ts-sub-note {
  text-align: center; font-size: 11px; color: var(--text-tertiary);
  margin-top: 14px; padding: 10px; background: rgba(245,158,11,0.08);
  border-radius: 8px; border: 1px dashed rgba(245,158,11,0.3);
}

/* ── Jeton Paketleri Grid (yeni) ── */
.ts-token-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; margin-bottom: 16px;
}

/* ── Jeton Kullanım Bilgisi ── */
.ts-token-info {
  background: var(--bg-sunken); border-radius: 10px; padding: 12px 14px;
}
.ts-info-row {
  display: flex; justify-content: space-between; padding: 5px 0;
  font-size: 12px; color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
}
.ts-info-row:last-child { border-bottom: none; }

/* ── Footer linkler ── */
.ts-legal-links {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px;
}
.ts-legal-links a { font-size: 11px; color: var(--text-tertiary); text-decoration: none; }
.ts-legal-links a:hover { color: var(--color-accent); text-decoration: underline; }
.ts-legal-links span { color: var(--text-tertiary); font-size: 10px; }

/* ── Responsive ── */
@media (max-width: 479px) {
  .token-shop-box { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 95dvh; }
  .ts-tab { font-size: 12px; padding: 10px 6px; }
  .ts-sub-grid { gap: 8px; }
  .ts-token-grid { grid-template-columns: repeat(2, 1fr); }
  .token-shop-header { padding: 14px 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   / DETAYLI JETON MAĞAZASI Sonu
   ═══════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   OKUNABİLİRLİK + HERO KART + GERİ BUTONU — v4.4.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Okunabilir Yazı Renkleri (tüm temalarda çalışır) ── */
.raven-readable { color: var(--text-primary) !important; text-shadow: none !important; }
.raven-readable-sub { color: var(--text-secondary) !important; }

/* Hero kartlarında mode-card-bg'yi yarı saydam yap */
.raven-hero-card .mode-card-bg { opacity: 0.5; }

/* Classic temada mode-card yazılarını düzelt */
[data-theme="classic"] .mode-card-title { color: var(--text-primary); text-shadow: none; }
[data-theme="classic"] .mode-card-desc { color: var(--text-secondary); }
[data-theme="classic"] .mode-card-badge { color: var(--text-primary); background: rgba(0,0,0,0.08); }
[data-theme="classic"] .mode-card-badge.badge-new { background: rgba(16,185,129,0.15); color: #059669; }
[data-theme="classic"] .mode-card-badge.badge-hot { background: rgba(239,68,68,0.15); color: #dc2626; }

/* Classic temada section-label okunabilirliği */
[data-theme="classic"] .section-label span { color: var(--text-secondary); }

/* ── Scroll düzeltmesi — fare tekerleği + touch ── */
html { height: 100%; overflow: hidden; }
body { height: 100%; overflow: hidden; margin: 0; }
.app-shell {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}
.app-main {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
