*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:     #0A2A5E;
    --blue:     #1565C0;
    --blue-lt:  #1E88E5;
    --green:    #1E8449;
    --red:      #C0392B;
    --bg:       #EBF3FB;
    --card-bg:  #FFFFFF;
    --border:   #BBDEFB;
    --border-strong: #1565C0;
    --text:     #0A2A5E;
    --muted:    #1565C0;
    --radius:   14px;
    --shadow:   0 2px 10px rgba(21,101,192,0.12);
    --font:     'Georgia', 'Times New Roman', serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ─── Timer ────────────────────────────────────────────────────────── */
.timer-bar {
    position: fixed;
    top: 10px;
    right: 14px;
    background: linear-gradient(135deg, #0A2A5E, #1565C0);
    color: #C9DFFF;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    z-index: 200;
    box-shadow: 0 2px 10px rgba(21,101,192,0.35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border: 2px solid rgba(255,255,255,0.2);
}

/* ─── Screens ──────────────────────────────────────────────────────── */
.screen {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
    padding-top: 64px;
}

.screen-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 0;
    gap: 14px;
}

/* ─── Hero / banner ────────────────────────────────────────────────── */
.hero {
    width: 100%;
    background: linear-gradient(135deg, #0A2A5E 0%, #1565C0 60%, #1E88E5 100%);
    padding: 40px 24px 32px;
    text-align: center;
    border-bottom: 6px solid white;
}

.hero-icon { font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }

.hero h1 {
    color: #FFFFFF;
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    margin-bottom: 4px;
}

.hero-sub {
    color: #C9DFFF;
    font-size: 1rem;
    opacity: 0.9;
}

/* Login screen overrides so hero fills top */
#screen-login {
    padding: 0;
    gap: 0;
    justify-content: flex-start;
}

#screen-login .hero {
    margin-bottom: 24px;
}

#screen-login .card,
#screen-login .error-msg,
#screen-login #login-notice {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Cards ────────────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    border: 1px solid var(--border);
    width: 100%;
}

.form-card  { border: 2px solid var(--border-strong); }
.action-card { display: flex; flex-direction: column; gap: 12px;
               border: 2px solid var(--border-strong); }
.centered   { text-align: center; }

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
    -webkit-appearance: none;
    font-family: var(--font);
}

.btn:active        { transform: scale(0.97); }
.btn:hover         { filter: brightness(1.08); }
.btn-large         { padding: 20px; font-size: 1.15rem; }

.btn-primary {
    background: linear-gradient(135deg, #0A2A5E, #1565C0);
    color: #fff;
}
.btn-start  { background: var(--green); color: #fff; }
.btn-stop   { background: var(--red);   color: #fff; }

/* ─── Inputs ───────────────────────────────────────────────────────── */
input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
input[type="text"]:focus { border-color: var(--blue); }

/* ─── Badges ───────────────────────────────────────────────────────── */
.loc-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0A2A5E, #1565C0);
    color: #C9DFFF;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.correct-badge {
    display: inline-block;
    background: var(--green);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ─── Screen headers ───────────────────────────────────────────────── */
.screen-header {
    padding: 8px 0 12px;
}
.screen-header h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-top: 4px;
}

/* ─── Content ──────────────────────────────────────────────────────── */
.question-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--navy);
}

.hint-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--blue);
    font-style: italic;
    margin-top: 8px;
}

.hint-image {
    width: 100%;
    border-radius: 10px;
    margin-top: 14px;
}

.welcome-text p {
    line-height: 1.7;
    font-size: 0.97rem;
    margin-bottom: 12px;
    color: var(--navy);
}
.welcome-text p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.error-msg {
    color: var(--red);
    font-size: 0.92rem;
    text-align: center;
    padding: 4px 0;
}

/* ─── Login notice ─────────────────────────────────────────────────── */
.login-notice {
    background: #E3F2FD;
    border: 2px solid var(--border-strong);
    color: var(--navy);
    font-size: 0.88rem;
    line-height: 1.6;
    padding: 14px 16px;
    margin-bottom: 0;
}

/* ─── Finished screen ──────────────────────────────────────────────── */
.final-time {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
    margin: 14px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.screenshot-note {
    font-size: 1rem;
    margin: 10px 0 6px;
    font-weight: 600;
    color: var(--navy);
}

.greek-text {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ─── Finished hero ────────────────────────────────────────────────── */
#screen-finished {
    padding-top: 0;
}

#screen-finished .hero {
    margin-bottom: 0;
}

#screen-finished .card {
    border: 2px solid var(--border-strong);
    margin-top: 16px;
}

/* ─── Upload photos ────────────────────────────────────────────────── */
.upload-photo {
    display: block;
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto 14px;
    background: #f0f4f8;
    border: 1px solid var(--border);
}

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 380px) {
    .hero h1    { font-size: 1.8rem; letter-spacing: 2px; }
    .final-time { font-size: 2.6rem; }
    .btn-large  { padding: 18px; font-size: 1.05rem; }
}
