/* Road To Pro — design system (Gugeshaaa DNA: black, red glow, embers, spring motion) */
:root {
  --bg: #070707;
  --bg2: #0d0d0f;
  --surface: #121214;
  --surface2: #1a1a1d;
  --line: #2a2a2f;
  --line2: #3a3a42;
  --text: #f5f5f7;
  --muted: #9a9aa3;
  --silver: #c9ccd4;
  --dim: #63636c;
  --red: #e3161f;
  --red-hot: #ff3b44;
  --red-deep: #8f0d14;
  --lv-green: #3ddc84;
  --lv-amber: #ffb02e;
  --lv-red: #ff3b44;
  --good: #3ddc84;
  --warn: #ffcc4d;
  --gold: #ffcc4d;
  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 22px;
  --font: "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hud: "Rajdhani", "Noto Sans Georgian", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t: .4s;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: var(--red-hot); transition: color var(--t) var(--ease); }
a:hover { color: #ff8a8f; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(227, 22, 31, .55); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a2f; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 2px; border-radius: 8px; }
.hud { font-family: var(--hud); font-weight: 700; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; font-weight: 800; }

/* ---------- ambient background (glow + grid + embers) ---------- */
.bg-glow { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(227, 22, 31, .22), transparent 60%),
    radial-gradient(700px 600px at -10% 40%, rgba(143, 13, 20, .25), transparent 60%),
    radial-gradient(800px 500px at 50% 115%, rgba(227, 22, 31, .14), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 44px 44px, var(--bg);
  animation: glowShift 18s ease-in-out infinite alternate; }
@keyframes glowShift { to { filter: hue-rotate(-8deg) brightness(1.08); background-position: 0 0, 0 0, 0 0, 0 22px, 22px 0, 0 0; } }
#embers { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--text); font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--t) var(--spring), background-color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), color var(--t) var(--ease); }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-20deg); transition: left .8s var(--ease); pointer-events: none; }
.btn:hover { transform: translateY(-2px); border-color: rgba(227, 22, 31, .7); background-color: rgba(227, 22, 31, .08); color: #fff; }
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(0) scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--red-hot), var(--red) 45%, var(--red-deep)); box-shadow: 0 8px 22px -6px rgba(227, 22, 31, .55); }
.btn.primary:hover { box-shadow: 0 14px 32px -8px rgba(227, 22, 31, .8); background: linear-gradient(135deg, #ff6a71, var(--red-hot) 45%, var(--red)); }
.btn.ghost { background: rgba(255, 255, 255, .02); }
.btn.danger { border-color: rgba(227, 22, 31, .45); color: #ff8a8f; background: rgba(227, 22, 31, .06); }
.btn.danger:hover { background: rgba(227, 22, 31, .2); }
.btn.big { min-height: 56px; padding: 0 30px; font-size: 1.05rem; border-radius: 14px; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
.btn.loading { pointer-events: none; color: transparent !important; }
.btn.loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .35); transform: scale(0); animation: ripple .6s var(--ease) forwards; pointer-events: none; z-index: 0; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.inp, .field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13, 13, 15, .85); color: var(--text); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t); }
.field textarea, textarea.inp { min-height: 96px; resize: vertical; }
.inp:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #3c3c44; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(227, 22, 31, .18), 0 0 24px rgba(227, 22, 31, .15); background: #0d0d0f; }
.pw { position: relative; }
.pw input { padding-right: 50px; }
.eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 9px; display: grid; place-items: center; transition: color .2s, background-color .2s; }
.eye:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.eye svg { width: 20px; height: 20px; }
.eye .shut { display: none; }
.eye.on .open { display: none; }
.eye.on .shut { display: block; color: var(--red-hot); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--red); flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---------- surfaces ---------- */
.panel { background: linear-gradient(180deg, rgba(26, 26, 29, .72), rgba(18, 18, 20, .82)); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; backdrop-filter: blur(6px); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--spring); }
.panel:hover { border-color: #34343a; }
.lift { transition: transform var(--t) var(--spring), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.lift:hover { transform: translateY(-4px); border-color: rgba(227, 22, 31, .55); box-shadow: 0 18px 40px -18px rgba(227, 22, 31, .45); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; text-decoration: none; transition: border-color .2s, color .2s; }
a.chip:hover { border-color: var(--red); color: #fff; }
.chip.t-beginner { color: var(--lv-green); border-color: rgba(61, 220, 132, .4); background: rgba(61, 220, 132, .08); }
.chip.t-intermediate { color: var(--lv-amber); border-color: rgba(255, 176, 46, .4); background: rgba(255, 176, 46, .08); }
.chip.t-advanced { color: #ff7a80; border-color: rgba(227, 22, 31, .5); background: rgba(227, 22, 31, .1); }
.chip.good { color: var(--good); border-color: rgba(61, 220, 132, .4); }
.chip.warn { color: var(--warn); border-color: rgba(255, 204, 77, .4); }
.chip.bad { color: #ff8a8f; border-color: rgba(227, 22, 31, .5); }
.av { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface2); box-shadow: 0 0 0 2px rgba(227, 22, 31, .35); }
.av-ini { display: inline-grid; place-items: center; font-family: var(--hud); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--red-deep), var(--red)); }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--radius); background: rgba(18, 18, 20, .5); }
.skel { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0, var(--surface2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.view-in { animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } }
.stagger > * { animation: cardIn .55s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; } .stagger > *:nth-child(3) { animation-delay: .1s; } .stagger > *:nth-child(4) { animation-delay: .15s; } .stagger > *:nth-child(5) { animation-delay: .2s; } .stagger > *:nth-child(6) { animation-delay: .25s; } .stagger > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.flame { display: inline-block; animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 50% { transform: scale(1.18) rotate(-6deg); } }

/* ---------- toasts & dialogs ---------- */
#toasts { position: fixed; z-index: 1000; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 12px 13px 16px; border-radius: 14px; background: rgba(26, 26, 29, .96); border: 1px solid var(--line2); box-shadow: 0 22px 50px -18px #000; animation: tin .45s var(--spring); font-size: .92rem; backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.toast::before { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--red); transform-origin: left; animation: tbar var(--life, 3.4s) linear forwards; }
@keyframes tbar { to { transform: scaleX(0); } }
.toast.good::before { background: var(--good); }
.toast.good { border-left: 3px solid var(--good); }
.toast.bad { border-left: 3px solid var(--red); }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 28px; height: 28px; border-radius: 8px; }
.toast button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s var(--ease); }
@keyframes tin { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.dlg-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(3, 3, 4, .72); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fade .25s; }
.dlg-wrap.out { opacity: 0; transition: .2s; }
.dlg { width: min(440px, 100%); background: linear-gradient(180deg, #1a1a1d, #121214); border: 1px solid var(--line2); border-radius: var(--radius-l); padding: 26px; animation: pop .4s var(--spring); box-shadow: 0 40px 80px -30px #000, 0 0 0 1px rgba(227, 22, 31, .1); }
.dlg h3 { font-size: 1.3rem; margin-bottom: 8px; }
.dlg-t { color: var(--muted); margin-bottom: 18px; }
.dlg .inp { margin-bottom: 16px; }
.dlg-b { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1001; }
.modal { position: fixed; inset: 0; z-index: 800; background: rgba(3, 3, 4, .8); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fade .25s; overflow-y: auto; }
.modal-box { width: min(780px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: linear-gradient(180deg, #1a1a1d, #121214); border: 1px solid var(--line2); border-radius: var(--radius-l); animation: pop .4s var(--spring); position: relative; box-shadow: 0 40px 90px -30px #000; }
.modal-x { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface2); cursor: pointer; z-index: 2; transition: transform .3s var(--spring), border-color .2s; }
.modal-x:hover { transform: rotate(90deg); border-color: var(--red); }

/* ---------- brand ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--hud); font-weight: 700; font-size: 1.3rem; letter-spacing: .06em; white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo svg { width: 32px; height: 32px; color: var(--red); animation: spin 9s linear infinite; filter: drop-shadow(0 0 8px rgba(227, 22, 31, .7)); transition: filter var(--t); }
.logo:hover svg { animation-duration: 2.2s; filter: drop-shadow(0 0 14px rgba(255, 59, 68, 1)); }
.logo b { color: var(--red-hot); font-weight: 700; }

/* ---------- language switch ---------- */
.lang-sw { display: inline-flex; align-items: center; gap: 2px; padding: 3px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18, 18, 20, .8); }
.lang-sw button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 7px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 .78rem var(--hud); letter-spacing: .06em; cursor: pointer; opacity: .65; transition: background .25s, opacity .25s, color .25s; }
.lang-sw button svg { width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.lang-sw button:hover { opacity: 1; }
.lang-sw button.on { opacity: 1; color: #fff; background: rgba(227, 22, 31, .22); box-shadow: inset 0 0 0 1px rgba(227, 22, 31, .55); }
@media (max-width: 560px) { .lang-sw button b { display: none; } .lang-sw button { padding: 0 7px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
.lang-sw.fixed { position: fixed; top: 14px; right: 14px; z-index: 900; backdrop-filter: blur(10px); }
