/*
 * The SNAP Challenge — gedeeld stijlblad voor invoerscherm, login en
 * publiek klassement. Volgt het ontwerp gevalideerd via /design: navy
 * als paginabasis (het logo draagt "THE SNAP" in wit), witte kaarten
 * die daarop zweven, en een enkele start/stop-knop per stopwatch.
 */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --navy: #0B2D62;
    --green: #22771D;
    --blue: #3D649E;
    --card: #FFFFFF;
    --line: rgba(11, 45, 98, 0.12);
    --navy-tint: rgba(11, 45, 98, 0.06);
    --green-tint: rgba(34, 119, 29, 0.10);
    --danger: #B00020;
    --danger-tint: rgba(176, 0, 32, 0.08);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--navy);
    color: #fff;
}

a {
    color: #fff;
}

a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.display {
    font-family: 'Fredoka', system-ui, sans-serif;
}

/* Layout */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-header .logo {
    width: 128px;
    height: auto;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-wrap {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

/* Language toggle */

.lang-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 3px;
}

.lang-toggle a {
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}

.lang-toggle--sm a {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.lang-toggle a.active {
    background: #fff;
    color: var(--navy);
}

/* Icon buttons */

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
}

.icon-btn svg {
    display: block;
}

.icon-btn--light {
    background: var(--navy-tint);
}

.icon-btn--danger {
    background: var(--danger-tint);
}

/* Cards */

.card {
    background: var(--card);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
}

.flash-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--card-shadow);
}

.flash-check {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flash-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.flash-sub {
    font-size: 12.5px;
    color: var(--blue);
}

.errors {
    background: var(--card);
    color: var(--danger);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--card-shadow);
    list-style: none;
    margin: 0;
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Form fields */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

.field input,
.field select {
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    font-size: 15px;
    color: var(--navy);
    background: var(--navy-tint);
    font-family: inherit;
    width: 100%;
}

.field select {
    appearance: none;
}

.field-chevron {
    position: absolute;
    right: 14px;
    bottom: 15px;
    pointer-events: none;
}

.field-small span {
    font-size: 12px;
    color: var(--blue);
}

.field-small input {
    height: 42px;
    font-size: 14px;
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 2px 0;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue);
}

/* Stopwatch */

.stopwatch {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stopwatch__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.stopwatch__digits {
    position: relative;
    text-align: center;
    font-family: 'Fredoka', system-ui, sans-serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--navy);
    background: var(--navy-tint);
    border-radius: 14px;
    padding: 14px 0;
    transition: background 0.2s, color 0.2s;
}

.stopwatch.is-running .stopwatch__digits {
    color: var(--green);
    background: var(--green-tint);
}

.stopwatch__rec {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--green);
    display: none;
    animation: rec-pulse 1.1s ease-in-out infinite;
}

.stopwatch.is-running .stopwatch__rec {
    display: block;
}

@keyframes rec-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.stopwatch__toggle {
    height: 50px;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    width: 100%;
    font-family: inherit;
    cursor: pointer;
}

.stopwatch.is-running .stopwatch__toggle {
    background: var(--navy);
}

.stopwatch__toggle svg {
    display: block;
}

.stopwatch__toggle .icon-stop {
    display: none;
}

.stopwatch.is-running .stopwatch__toggle .icon-start {
    display: none;
}

.stopwatch.is-running .stopwatch__toggle .icon-stop {
    display: block;
}

/* Buttons */

.btn-primary {
    height: 52px;
    border-radius: 14px;
    background: var(--green);
    color: #fff;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    gap: 8px;
    font-family: inherit;
    cursor: pointer;
}

/* Section headings on the navy page */

.section-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 10px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.section-count {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
}

/* Overzichtslijst (invoerscherm) */

.list-item {
    background: var(--card);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--card-shadow);
}

.list-item__body {
    flex: 1;
    min-width: 0;
}

.list-item__name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item__meta {
    font-size: 12.5px;
    color: var(--blue);
}

.badge-tijd {
    background: var(--green-tint);
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    padding: 5px 10px;
    flex-shrink: 0;
}

.list-item__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.empty-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    padding: 8px 0;
}

/* Klassement: hero */

.hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    padding-top: 8px;
}

.hero__badge {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 5px 12px;
}

.hero__logo {
    width: 250px;
    height: auto;
}

.hero__title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.hero__tagline {
    font-size: 16px;
    font-weight: 500;
    color: #7DDB73;
    max-width: 320px;
    line-height: 1.4;
}

.hero__intro {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.55;
    max-width: 340px;
}

.hero__uitleg {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
    max-width: 340px;
}

/* Video */

.video-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: #000;
    line-height: 0;
}

.video-card video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Prijzen */

.prize-card {
    background: var(--card);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--card-shadow);
}

.prize-card--first {
    border: 1.5px solid var(--green);
    box-shadow: none;
}

.prize-rank {
    font-family: 'Fredoka', sans-serif;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--navy-tint);
    color: var(--navy);
}

.prize-rank--gold {
    background: var(--green);
    color: #fff;
}

.prize-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
}

.prize-sub {
    font-size: 12px;
    color: var(--blue);
}

.prize-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-style: italic;
    line-height: 1.4;
}

/* Winnaars */

.winners-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.winner-card {
    background: var(--card);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--card-shadow);
}

.winner-medal {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.winner-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
}

.winner-meta {
    font-size: 12px;
    color: var(--blue);
}

.winner-prijs {
    font-size: 12.5px;
    color: var(--navy);
    text-align: right;
    font-weight: 600;
    max-width: 120px;
}

/* Klassement */

.ranking-item {
    background: var(--card);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--card-shadow);
}

.ranking-item__rank {
    font-family: 'Fredoka', sans-serif;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.rank-1 { background: var(--green); color: #fff; }
.rank-2 { background: var(--blue); color: #fff; }
.rank-3 { background: rgba(11, 45, 98, 0.10); color: var(--navy); }
.rank-other { background: rgba(11, 45, 98, 0.06); color: var(--navy); }

.ranking-item__body {
    flex: 1;
    min-width: 0;
}

.ranking-item__name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item__meta {
    font-size: 12px;
    color: var(--blue);
}

.ranking-item__tijd {
    font-family: 'Fredoka', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--green);
    flex-shrink: 0;
}

.footer-note {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 0 4px;
}

.footer-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 8px 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-logout svg {
    display: block;
}

/* Login */

.login-page {
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 40px;
}

.login-topbar {
    width: 100%;
    max-width: 350px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    gap: 32px;
}

.login-logo {
    width: 230px;
    height: auto;
}

.login-card {
    width: 100%;
    text-align: center;
}

.login-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--navy);
}

.login-sub {
    font-size: 14px;
    color: var(--blue);
    line-height: 1.4;
}

.login-footer {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    line-height: 1.5;
}
