/*
 * Θέμα GorbaTech (https://www.gorbatech.com/) — άλλαξε ΜΟΝΟ τις μεταβλητές
 * του :root για να πάρουν όλες οι εφαρμογές άλλη αισθητική.
 */
@font-face {
  font-family: "Ubuntu Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/ubuntu-sans-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Ubuntu Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/ubuntu-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --brand: #38BDF8;          /* sky — κύριο */
  --brand-dark: #2563EB;     /* μπλε */
  --brand-2: #6366F1;        /* indigo */
  --accent: #F59E0B;         /* amber */
  --pink: #EC4899;
  --purple: #A855F7;
  --bg: #06090E;
  --bg-2: rgba(56, 189, 248, .12);
  --surface: rgba(15, 23, 42, .78);
  --surface-solid: #0F172A;
  --surface-2: #1E293B;
  --line: rgba(255, 255, 255, .1);
  --glow: rgba(56, 189, 248, .35);
  --ink: #F8FAFC;
  --heading: #F8FAFC;
  --muted: #94A3B8;
  --ok: #34D399;
  --bad: #EF4444;

  --grad-btn: linear-gradient(135deg, #38BDF8 0%, #2563EB 100%);
  --grad-text: linear-gradient(90deg, #38BDF8 0%, #A855F7 55%, #EC4899 100%);

  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);

  --font-display: "Ubuntu Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Ubuntu Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(to right, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(to bottom, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 60px 60px,
    radial-gradient(circle at 8% 6%, rgba(56, 189, 248, .22), transparent 40%),
    radial-gradient(circle at 95% 90%, rgba(99, 102, 241, .22), transparent 45%),
    var(--bg);
  background-attachment: fixed;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

h1, h2, h3, .display { font-family: var(--font-display); margin: 0; line-height: 1.1; }

button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-link[hidden] { display: none; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 2px solid var(--glow);
  box-shadow: 0 0 20px rgba(56, 189, 248, .35);
  object-fit: cover;
  display: block;
}
.brand-text { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; text-align: left; }
.brand-text span { color: var(--brand); }
.brand-text small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 3px;
}
.topbar-actions { display: flex; gap: 8px; }

.chip {
  border: 0;
  height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.chip svg { width: 20px; height: 20px; }

/* ---------- Screens ---------- */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 24px;
  text-align: center;
}
.screen.active { display: flex; animation: screen-in .35s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

.app-icon {
  width: min(28vmin, 180px);
  height: min(28vmin, 180px);
  border-radius: 22%;
  box-shadow: 0 0 40px rgba(56, 189, 248, .35), var(--shadow);
  margin-bottom: 20px;
}

.title {
  font-size: clamp(36px, 7vmin, 72px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--heading);
}
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  font-size: clamp(18px, 3vmin, 26px);
  color: var(--muted);
  margin: 10px 0 24px;
  max-width: 36ch;
}

.howto {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 900px;
}
.howto li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: clamp(15px, 2.2vmin, 20px);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 280px;
  text-align: left;
}
.howto li b {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-btn);
  color: #fff;
  font-family: var(--font-mono);
  display: grid;
  place-items: center;
}

.btn {
  border: 0;
  border-radius: 18px;
  padding: 20px 48px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.6vmin, 34px);
  font-weight: 700;
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 6px 28px rgba(56, 189, 248, .4);
  transition: transform .1s, box-shadow .1s;
  min-width: 240px;
}
.btn:active { transform: scale(.97); box-shadow: 0 2px 12px rgba(56, 189, 248, .5); }
.btn.secondary { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 40;
}
.hud .pill {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 3vmin, 28px);
  white-space: nowrap;
}
.hud .pill small { font-family: var(--font-mono); font-size: .5em; color: var(--brand); font-weight: 400; margin-right: 8px; text-transform: uppercase; letter-spacing: .15em; }
.hud .pill.warn { background: var(--bad); border-color: var(--bad); color: #fff; }
.hud .pill.warn small { color: #fff; }

/* ---------- Result ---------- */
.result-card {
  background: var(--surface);
  border: 1px solid var(--glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: 0 0 60px rgba(56, 189, 248, .15), var(--shadow);
  max-width: 560px;
  width: 100%;
}
.result-card .big {
  font-family: var(--font-display);
  font-size: clamp(64px, 14vmin, 140px);
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
  margin: 8px 0;
}
.result-card h2 { font-family: var(--font-mono); font-size: 14px; font-weight: 400; color: var(--brand); text-transform: uppercase; letter-spacing: .2em; }
.result-card .verdict { font-size: clamp(20px, 3.2vmin, 30px); font-weight: 700; margin-bottom: 8px; }
.result-card .best { color: var(--muted); margin-bottom: 24px; }
.result-card .stats { display: flex; justify-content: center; gap: 24px; margin: 8px 0 16px; color: var(--muted); flex-wrap: wrap; }
.result-card .stats b { display: block; font-size: 1.6em; color: var(--ink); }

.countdown {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 40vmin;
  font-weight: 800;
  color: var(--brand);
  text-shadow: 0 0 60px rgba(56, 189, 248, .6);
  pointer-events: none;
  z-index: 60;
}
.countdown span { animation: pop .9s ease-out both; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(.9); opacity: 0; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--glow);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 70;
  max-width: 90vw;
}

.notice {
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .4);
  color: #FCD34D;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 0 0 20px;
  font-size: 15px;
  max-width: 560px;
}

.shake { animation: shake .35s; }
@keyframes shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; }

@media (prefers-reduced-motion: reduce) {
  .screen.active, .countdown span { animation: none; }
}
