/* =====================================================================
   THEMES: "Açık" (sand & navy) and "Koyu" (night blue). Each theme only sets
   variables; the component rules below (body.themed ...) use them. Neon keeps
   its own colors and gets neither class.
   ===================================================================== */
body.th-light {
  --bg1: #f6f1e7; --bg2: #e7dcc8;
  --fg: #1f2b3a; --fg-rgb: 31,43,58;
  --select: #2f5682; --accent: #ec9a62;
  --good: #3f8f57; --bad: #c95b4c; --dup: #e0b13e;
  --tile-a: #ffffff; --tile-b: #f3ede2; --tile-text: #1f2b3a;
  --tile-border: rgba(31,43,58,0.22);
  --combo-a: #f7c59a; --combo-b: #ec9a62; --combo-text: #43200b;
  --tile-shadow: 0 4px 0 rgba(31,43,58,0.25), 0 2px 6px rgba(31,43,58,0.1);
  --flash-good-a: #8fd0a0; --flash-good-b: #3f8f57;
  --flash-dup-a: #f7dd8f; --flash-dup-b: #e0b13e;
  --flash-bad-a: #f0aa9e; --flash-bad-b: #c95b4c;
  --active-a: #4f7aa8; --active-b: #2f5682; --active-text: #ffffff; --active-glow: rgba(47,86,130,0.5);
  --line: rgba(47,86,130,0.8);
  --gold: #c28a12; --star: #f0b72f;
  --btn-a: #35577e; --btn-b: #243f60; --btn-text: #ffffff; --btn-shadow: rgba(20,35,55,0.45);
  --btn2-a: #e9dec9; --btn2-b: #d9c9ab; --btn2-text: #1f2b3a; --btn2-shadow: rgba(120,100,70,0.4);
  --locked-a: #e4dccd; --locked-b: #d6cbb7; --locked-text: rgba(31,43,58,0.4);
  --panel-a: #fffdf8; --panel-b: #f1e9da; --overlay: rgba(31,43,58,0.45); --mp-overlay: rgba(246,241,231,0.6);
  --board-bg: rgba(31,43,58,0.12); --board-shadow: rgba(31,43,58,0.16);
  --key-bg: #f0c050; --key-text: #1f2b3a;
  --special-bg: rgba(236,154,98,0.3); --special-text: #7a3a10;
  --toast: #c0602c; --toast-halo: #fffaf0;
  --surface: #ffffff; --surface-2: #e9e0cf; --line-soft: rgba(31,43,58,0.14);
  --primary: #2f5682; --on-primary: #ffffff;
  --c-orange: #c45f28; --c-teal: #2b7470; --c-green: #3f8f57;
}
/* "Pastel" = Pastel Kontrast: the warm colors of the level pictures with darker text and firmer edges */
body.th-pastel {
  --bg1: #f4ead8; --bg2: #e2cfae;
  --fg: #2b1d14; --fg-rgb: 43,29,20;
  --select: #3a6f82; --accent: #e2915e;
  --good: #4d8f55; --bad: #c4604c; --dup: #ebb83f;
  --tile-a: #ffffff; --tile-b: #f7eedf; --tile-text: #2b1d14;
  --tile-border: rgba(90,60,35,0.3);
  --combo-a: #f6c49d; --combo-b: #e2915e; --combo-text: #4a200a;
  --tile-shadow: 0 4px 0 rgba(100,70,40,0.35), 0 2px 6px rgba(100,70,40,0.12);
  --flash-good-a: #a7d6a9; --flash-good-b: #4d8f55;
  --flash-dup-a: #f6dc95; --flash-dup-b: #ebb83f;
  --flash-bad-a: #eeb2a5; --flash-bad-b: #c4604c;
  --active-a: #9fc6dd; --active-b: #5d97ba; --active-text: #ffffff; --active-glow: rgba(70,130,170,0.6);
  --line: rgba(50,110,150,0.85);
  --gold: #b7800f; --star: #ebb83f;
  --btn-a: #4f8a9e; --btn-b: #3a6f82; --btn-text: #ffffff; --btn-shadow: rgba(40,70,85,0.45);
  --btn2-a: #e3cfac; --btn2-b: #d2b88d; --btn2-text: #2b1d14; --btn2-shadow: rgba(120,90,50,0.45);
  --locked-a: #e2d4bc; --locked-b: #d3c1a2; --locked-text: rgba(43,29,20,0.4);
  --panel-a: #fffaf1; --panel-b: #f1e4cd; --overlay: rgba(43,29,20,0.45); --mp-overlay: rgba(244,234,216,0.6);
  --board-bg: rgba(110,80,50,0.24); --board-shadow: rgba(100,70,40,0.2);
  --key-bg: #ebb83f; --key-text: #2b1d14;
  --special-bg: rgba(226,145,94,0.3); --special-text: #6b2f0c;
  --toast: #b8582a; --toast-halo: #fffaf0;
  --surface: #fffaf1; --surface-2: #e8d8bc; --line-soft: rgba(43,29,20,0.16);
  --primary: #3a6f82; --on-primary: #ffffff;
  --c-orange: #b8582a; --c-teal: #3d7c74; --c-green: #4d8f55;
}
body.th-dark {
  --bg1: #17222e; --bg2: #22344a;
  --fg: #e8eef5; --fg-rgb: 232,238,245;
  --select: #5aa9e0; --accent: #e09a45;
  --good: #4fae6c; --bad: #e5776b; --dup: #e8b852;
  --tile-a: #2f4560; --tile-b: #24364d; --tile-text: #f2f6fb;
  --tile-border: rgba(180,210,255,0.1);
  --combo-a: #f2c27a; --combo-b: #e09a45; --combo-text: #3a2205;
  --tile-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.25);
  --flash-good-a: #82d199; --flash-good-b: #4fae6c;
  --flash-dup-a: #f6d58a; --flash-dup-b: #e0a83a;
  --flash-bad-a: #f2a093; --flash-bad-b: #d9604f;
  --active-a: #9fd3f5; --active-b: #5aa9e0; --active-text: #0c2740; --active-glow: rgba(110,180,240,0.6);
  --line: rgba(130,195,245,0.85);
  --gold: #f2c66a; --star: #f2c66a;
  --btn-a: #5aa9e0; --btn-b: #3d87bf; --btn-text: #ffffff; --btn-shadow: rgba(0,0,0,0.4);
  --btn2-a: #33475e; --btn2-b: #2a3c51; --btn2-text: #e8eef5; --btn2-shadow: rgba(0,0,0,0.4);
  --locked-a: #273546; --locked-b: #1f2b3a; --locked-text: rgba(232,238,245,0.35);
  --panel-a: #23364b; --panel-b: #1b2a3a; --overlay: rgba(5,10,18,0.6); --mp-overlay: rgba(12,20,30,0.7);
  --board-bg: rgba(0,0,0,0.3); --board-shadow: rgba(0,0,0,0.45);
  --key-bg: #f2c66a; --key-text: #17222e;
  --special-bg: rgba(224,154,69,0.3); --special-text: #ffd9a3;
  --toast: #f2c66a; --toast-halo: rgba(0,0,0,0.5);
  --surface: #263a50; --surface-2: #1c2c3e; --line-soft: rgba(232,238,245,0.16);
  --primary: #3d87bf; --on-primary: #ffffff;
  --c-orange: #c86f2c; --c-teal: #2f8f87; --c-green: #3f9a5c;
}

body.themed #menu-title, body.themed #title { text-shadow: 0 2px 10px rgba(var(--fg-rgb),0.12); }
body.themed .found-chip { text-shadow: none; }
body.themed .found-chip.special { color: var(--special-text); background: var(--special-bg); }
body.themed .found-chip.keyword { background: var(--key-bg); color: var(--key-text); box-shadow: none; }
body.themed #current-word.state-dup { color: #1f2b3a; }
body.themed #toast { color: var(--toast); text-shadow: 0 2px 0 var(--toast-halo), 0 4px 14px rgba(0,0,0,0.2); }
body.themed #combo-badge { color: var(--toast); text-shadow: 0 2px 0 var(--toast-halo), 0 0 12px rgba(0,0,0,0.2); }
body.themed .score-rolling { color: var(--gold) !important; }
body.themed .flying-word { text-shadow: 0 2px 8px rgba(0,0,0,0.2); }

body.themed .switch .slider { background: rgba(var(--fg-rgb),0.2); }
body.themed .switch input:checked + .slider { background: var(--good); }

body.themed .fp-bar-fill.score { background: linear-gradient(90deg, var(--key-bg), var(--accent)); }
body.themed .fp-len.done { background: rgba(79,174,108,0.25); }

/* Windows and panels */
body.themed .modal-overlay { background: var(--overlay); }
body.themed #mp-overlay { background: var(--mp-overlay); }
body.themed .complete-stats div,
body.themed .fp-missed li,
body.themed .mp-rank li { background: rgba(var(--fg-rgb),0.07); }
body.themed .fp-missed li:active { background: rgba(var(--fg-rgb),0.13); }
body.themed .complete-stars span { color: rgba(var(--fg-rgb),0.15); }
body.themed .complete-stars span.filled,
body.themed .fp-missed .p,
body.themed .mp-best b,
body.themed .mp-next b,
body.themed .mp-you,
body.themed .mp-count { color: var(--gold); text-shadow: none; }
body.themed .mp-rank li.me { background: rgba(79,174,108,0.22); }
body.themed .mp-rank li:nth-child(1) .pos { color: var(--gold); }
body.themed .mp-rank li:nth-child(2) .pos { color: #8d9aa6; }
body.themed .mp-rank li:nth-child(3) .pos { color: #c08355; }
body.themed #mp-name, body.themed .mp-input { color: var(--fg); background: rgba(var(--fg-rgb),0.08); }
body.themed #mp-name::placeholder, body.themed .mp-input::placeholder { color: rgba(var(--fg-rgb),0.4); }
body.themed .mp-members li { background: rgba(var(--fg-rgb),0.07); }
body.themed .mp-code { color: var(--gold); }
