@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --navy: #082a48;
    --navy-deep: #041d33;
    --blue: #0d4777;
    --blue-soft: #eaf3f8;
    --yellow: #ffd643;
    --orange: #ef7a27;
    --cream: #f7f2e8;
    --paper: #fffdf8;
    --ink: #183247;
    --muted: #5f7180;
    --line: #d8e3e8;
    --shadow: 0 22px 60px rgba(4, 29, 51, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    font-family: 'DM Sans', Arial, sans-serif;
    color: #152331;
    background:
        linear-gradient(180deg, rgba(234, 243, 248, 0.65), transparent 420px),
        var(--paper);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    z-index: 10;
    height: 9px;
    background: linear-gradient(90deg, var(--yellow) 0 24%, var(--orange) 24% 32%, var(--blue) 32% 100%);
}

.page-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 88px;
}

.narrow-shell {
    width: min(920px, calc(100% - 48px));
}

.page {
    min-height: 100vh;
    padding: 42px 24px 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(8, 42, 72, 0.14);
    border-radius: 7px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(34px, 5vw, 70px);
    min-height: 390px;
    padding: clamp(38px, 6vw, 72px);
    align-items: end;
    color: #fff;
    background: var(--navy-deep);
    border: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('hero.jpg') center 44% / cover no-repeat;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(4, 29, 51, 0.97) 0%, rgba(4, 29, 51, 0.86) 55%, rgba(4, 29, 51, 0.58) 100%),
        linear-gradient(0deg, rgba(4, 29, 51, 0.8), transparent 60%);
}

.login-hero {
    grid-template-columns: minmax(0, 720px);
    min-height: 430px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 15px;
    color: var(--orange);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--yellow);
}

.logo {
    display: block;
    width: min(250px, 68%);
    max-height: 150px;
    margin: 0 auto 30px;
    object-fit: contain;
}

h1,
h2 {
    font-family: 'Barlow Condensed', Impact, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.015em;
    color: var(--navy);
}

h1 {
    margin: 0;
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 0.94;
    letter-spacing: -0.035em;
}

.hero h1 {
    max-width: 800px;
    color: #ffffff;
}

.hero > div:first-child > p:last-child {
    max-width: 690px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.05rem;
    line-height: 1.7;
}

.form-card {
    margin-top: 26px;
    padding: clamp(28px, 5vw, 54px);
    border-top: 5px solid var(--yellow);
}

.form-card::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 0;
    width: 28%;
    height: 5px;
    background: var(--orange);
}

.page-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 24px;
    padding: 15px 18px;
    border: 1px solid #bbd5e4;
    border-left: 5px solid var(--blue);
    border-radius: 14px;
    color: var(--navy);
    background: var(--blue-soft);
    font-size: 0.94rem;
    line-height: 1.45;
}

.page-timer span {
    flex: 0 0 auto;
    min-width: 76px;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--paper);
    background: var(--navy);
    font-family: 'Barlow Condensed', Impact, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 21px;
    padding: 28px;
    border: 1px solid #cbdde7;
    border-radius: 20px;
    background: #f2f8fb;
}

.form-section-game {
    border-color: #e6dbc5;
    background: #fffaf0;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.section-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 3px solid var(--navy);
    border-radius: 50%;
    color: var(--navy);
    background: var(--yellow);
    font-family: 'Barlow Condensed', Impact, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 4px 4px 0 var(--navy);
}

.section-header h2 {
    margin: 0 0 5px;
    font-size: 1.65rem;
    line-height: 1.05;
}

.section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
}

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 50px;
    padding: 13px 14px;
    border: 1px solid #b9cbd5;
    border-radius: 10px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea {
    min-height: 145px;
    line-height: 1.55;
    resize: vertical;
}

select {
    cursor: pointer;
}

input[type='file'] {
    padding: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.82);
}

input[type='file']::file-selector-button {
    margin-right: 12px;
    padding: 9px 13px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: var(--blue);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

input::placeholder,
textarea::placeholder {
    color: #8a9aa5;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(13, 71, 119, 0.13);
}

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

.button {
    width: 100%;
    min-height: 56px;
    margin-top: 2px;
    padding: 15px 24px;
    border: 3px solid var(--navy);
    border-radius: 10px;
    color: var(--navy);
    background: var(--yellow);
    box-shadow: 5px 5px 0 var(--navy);
    font-family: 'Barlow Condensed', Impact, sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
    background: #ffe273;
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--navy);
}

.button:focus-visible,
.refresh-notice button:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
}

.button:disabled,
.button.is-loading {
    opacity: 0.62;
    cursor: wait;
    transform: none;
    box-shadow: 3px 3px 0 var(--navy);
}

.refresh-notice,
.warning-box {
    margin: 0 0 22px;
    padding: 17px 18px;
    border: 1px solid #edbd91;
    border-left: 5px solid var(--orange);
    border-radius: 14px;
    color: #79370d;
    background: #fff2df;
    font-size: 0.93rem;
    line-height: 1.55;
}

.refresh-notice button {
    display: block;
    margin-top: 12px;
    padding: 9px 14px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: var(--orange);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.badge {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 2px solid var(--navy);
    border-radius: 999px;
    color: var(--navy);
    background: var(--yellow);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.message-card {
    max-width: 660px;
    padding: 54px;
    text-align: center;
}

.message-card p {
    margin: 24px auto;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.7;
}

.message-card.error h1 {
    color: #a73524;
}

.warning-box {
    margin: 22px 0;
    text-align: left;
}

.link-button {
    display: inline-flex;
    width: auto;
    min-width: 230px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .page-shell,
    .narrow-shell {
        width: min(100% - 32px, 720px);
        padding-top: 28px;
    }

    .hero,
    .login-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 46px 34px;
    }

    .hero > div:first-child > p:last-child {
        font-size: 0.98rem;
    }

    .form-card {
        padding: 34px;
    }
}

@media (max-width: 620px) {
    body::before {
        height: 6px;
    }

    .page-shell,
    .narrow-shell {
        width: min(100% - 20px, 540px);
        padding: 16px 0 54px;
    }

    .hero,
    .login-hero {
        padding: 34px 23px;
        background-position: 58% center;
    }

    .hero::after {
        background: linear-gradient(0deg, rgba(4, 29, 51, 0.98), rgba(4, 29, 51, 0.7));
    }

    h1 {
        font-size: clamp(3.55rem, 18vw, 5rem);
    }

    .form-card {
        margin-top: 14px;
        padding: 27px 19px;
    }

    .page {
        padding: 24px 10px 48px;
    }

    .message-card {
        padding: 30px 20px;
    }

    .page-timer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .form {
        gap: 20px;
    }

    .form-section {
        padding: 21px 16px;
        border-radius: 16px;
    }

    .section-header {
        gap: 13px;
    }

    .section-icon {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
        box-shadow: 3px 3px 0 var(--navy);
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .section-header p {
        font-size: 0.88rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    input,
    textarea,
    select {
        font-size: 16px;
    }

    input[type='file']::file-selector-button {
        display: block;
        margin: 0 0 8px;
    }

    .button {
        min-height: 54px;
        font-size: 1.16rem;
    }

    .message-card p {
        font-size: 0.96rem;
    }

    .link-button {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
