:root {
    --bg: #02090a;
    --bg-panel: #071618;
    --bg-panel-soft: #0b2326;
    --teal: #24d7df;
    --teal-soft: #7cecf0;
    --teal-muted: #1b7f86;
    --gold: #f2b766;
    --gold-strong: #ffca79;
    --text: #e9fbfb;
    --muted: #a8c8ca;
    --line: rgba(36, 215, 223, 0.38);
    --shadow: rgba(36, 215, 223, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background:
        linear-gradient(90deg, rgba(36, 215, 223, 0.08), transparent 22%, transparent 78%, rgba(242, 183, 102, 0.06)),
        linear-gradient(180deg, #000 0%, var(--bg) 42%, #031011 100%);
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 3;
    transform: translateY(-5rem);
    padding: 0.5rem 0.75rem;
    color: #001112;
    background: var(--teal-soft);
    border-radius: 4px;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(0, 6, 7, 0.9);
    box-shadow: 0 0 34px rgba(36, 215, 223, 0.12);
}

.header-art {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(242, 183, 102, 0.32);
}

.header-art img {
    display: block;
    width: 100%;
    height: auto;
}

.banner-nav {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.banner-nav-link {
    position: absolute;
    top: 78.1%;
    height: 19.7%;
    border-radius: 4px;
    outline: 0;
    pointer-events: auto;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.banner-nav-home {
    left: 7.7%;
    width: 14.2%;
}

.banner-nav-about {
    left: 22%;
    width: 16.5%;
}

.banner-nav-game-engine {
    left: 38.5%;
    width: 21.6%;
}

.banner-nav-register {
    left: 60.2%;
    width: 18.7%;
}

.banner-nav-login {
    left: 78.9%;
    width: 15.3%;
}

.banner-nav-admin {
    left: 78.9%;
    width: 15.3%;
}

.banner-nav-link:hover,
.banner-nav-link:focus-visible {
    background-color: rgba(36, 215, 223, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(36, 215, 223, 0.55),
        0 0 18px rgba(36, 215, 223, 0.22);
}

.banner-nav-link.is-active {
    box-shadow:
        inset 0 -4px 0 var(--gold),
        inset 0 0 0 1px rgba(242, 183, 102, 0.24),
        0 0 18px rgba(242, 183, 102, 0.18);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-main {
    width: min(72rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 4rem;
}

.hero-panel,
.interface-panel,
.engine-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(36, 215, 223, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(11, 35, 38, 0.96), rgba(5, 17, 19, 0.96));
    box-shadow: 0 0 28px rgba(36, 215, 223, 0.1);
}

.hero-panel {
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.hero-panel.compact {
    max-width: 58rem;
}

.hero-panel.centered {
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.12;
}

h1 {
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.35rem, 7vw, 5.6rem);
    font-weight: 700;
    text-shadow: 0 0 18px rgba(36, 215, 223, 0.35);
}

h2 {
    color: var(--teal-soft);
    font-size: clamp(1.25rem, 2.5vw, 1.8rem);
}

p {
    max-width: 68ch;
    margin: 1rem 0 0;
    color: var(--muted);
}

code {
    padding: 0.08rem 0.28rem;
    color: var(--gold-strong);
    background: rgba(242, 183, 102, 0.08);
    border: 1px solid rgba(242, 183, 102, 0.22);
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.95em;
}

input,
select,
textarea,
button {
    font: inherit;
}

.subtitle {
    color: var(--gold-strong);
    font-size: clamp(1.08rem, 2.4vw, 1.45rem);
    letter-spacing: 0;
    text-transform: uppercase;
}

.centered p {
    margin-left: auto;
    margin-right: auto;
}

.content-grid,
.card-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.interface-panel,
.engine-card {
    padding: 1.4rem;
}

.full-width {
    margin-top: 1.25rem;
}

.about-history {
    margin-top: 1.25rem;
}

.form-panel {
    max-width: 64rem;
}

.interest-form {
    margin-top: 1.3rem;
}

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

.form-field {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
}

.form-field label,
.checkbox-fieldset legend {
    color: var(--teal-soft);
    font-size: 0.95rem;
    font-weight: 700;
}

.form-field label span {
    color: var(--gold);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    color: var(--text);
    background: rgba(0, 8, 9, 0.78);
    border: 1px solid rgba(36, 215, 223, 0.42);
    border-radius: 6px;
    outline: 0;
    padding: 0.75rem 0.85rem;
    box-shadow: inset 0 0 18px rgba(36, 215, 223, 0.06);
}

.form-field select {
    min-height: 3rem;
}

.form-field textarea {
    min-height: 10rem;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--gold);
    box-shadow:
        inset 0 0 18px rgba(36, 215, 223, 0.08),
        0 0 0 3px rgba(242, 183, 102, 0.13);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #71999c;
}

.checkbox-fieldset {
    margin: 1rem 0 0;
    padding: 0;
    border: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.check-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-height: 2.75rem;
    padding: 0.65rem;
    color: var(--muted);
    background: rgba(0, 8, 9, 0.54);
    border: 1px solid rgba(36, 215, 223, 0.2);
    border-radius: 6px;
}

.check-option input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.22rem;
    accent-color: var(--gold);
}

.check-option span {
    line-height: 1.35;
}

.captcha-field {
    max-width: 24rem;
}

.captcha-widget {
    min-height: 4.25rem;
}

.form-note {
    margin-top: 0.35rem;
    color: #91b5b8;
    font-size: 0.94rem;
}

.form-alert {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 6px;
}

.form-alert p {
    margin-top: 0;
}

.form-alert ul {
    margin: 0.55rem 0 0;
    padding-left: 1.2rem;
}

.form-alert.success {
    color: #f5ffe9;
    background: rgba(72, 138, 80, 0.16);
    border: 1px solid rgba(138, 221, 138, 0.42);
}

.form-alert.error {
    color: #fff4f0;
    background: rgba(172, 72, 44, 0.16);
    border: 1px solid rgba(255, 157, 119, 0.42);
}

.honeypot-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin-top: 1.2rem;
    padding: 0.75rem 1.2rem;
    color: #061213;
    font-weight: 700;
    background: linear-gradient(180deg, var(--gold-strong), var(--gold));
    border: 1px solid rgba(255, 229, 174, 0.7);
    border-radius: 6px;
    box-shadow: 0 0 18px rgba(242, 183, 102, 0.18);
    cursor: pointer;
}

.form-submit:hover,
.form-submit:focus-visible {
    background: linear-gradient(180deg, #ffe0a5, var(--gold-strong));
    box-shadow: 0 0 0 3px rgba(242, 183, 102, 0.14), 0 0 24px rgba(242, 183, 102, 0.24);
}

.engine-card {
    min-height: 14rem;
}

.engine-card h2 {
    color: var(--gold-strong);
}

.feature-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--muted);
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.45rem;
    height: 0.45rem;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(242, 183, 102, 0.35);
}

.site-footer {
    padding: 1.5rem 1rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(36, 215, 223, 0.2);
    background: #020707;
}

.site-footer p {
    margin: 0 auto;
    color: #7fa6a8;
    font-size: 0.9rem;
}

.admin-panel h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-content {
    align-items: start;
}

.admin-link,
.admin-button-link {
    text-decoration: none;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.4rem 0.75rem;
    color: var(--gold-strong);
    border: 1px solid rgba(242, 183, 102, 0.38);
    border-radius: 6px;
    background: rgba(242, 183, 102, 0.08);
}

.admin-list {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.admin-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem;
    text-decoration: none;
    border: 1px solid rgba(36, 215, 223, 0.24);
    border-radius: 6px;
    background: rgba(0, 8, 9, 0.5);
}

.admin-list-row span {
    color: var(--text);
    font-weight: 700;
}

.admin-list-row small {
    color: var(--muted);
}

.admin-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 0;
}

.admin-facts div {
    padding: 0.75rem;
    border: 1px solid rgba(36, 215, 223, 0.2);
    border-radius: 6px;
    background: rgba(0, 8, 9, 0.42);
}

.admin-facts dt {
    color: var(--teal-soft);
    font-weight: 700;
}

.admin-facts dd {
    margin: 0.2rem 0 0;
    color: var(--muted);
}

.admin-code {
    overflow-x: auto;
    padding: 1rem;
    color: var(--gold-strong);
    border: 1px solid rgba(242, 183, 102, 0.28);
    border-radius: 6px;
    background: rgba(0, 8, 9, 0.74);
}

.world-grid {
    display: grid;
    grid-template-columns: repeat(var(--world-cols), minmax(1.7rem, 1fr));
    gap: 0.18rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.world-cell {
    display: grid;
    place-items: center;
    min-width: 1.7rem;
    aspect-ratio: 1;
    color: #061213;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 4px;
}

.world-cell:hover,
.world-cell:focus-visible {
    outline: 2px solid var(--gold-strong);
    outline-offset: 1px;
}

.terrain-grassland {
    background: #78bf6a;
}

.terrain-forest {
    background: #2f8d59;
}

.terrain-hill {
    background: #a7a264;
}

.terrain-water {
    background: #58a9d8;
}

.terrain-marsh {
    background: #6e9772;
}

.terrain-stone {
    background: #a8adb0;
}

.terrain-sand {
    background: #dfc87d;
}

.world-cell.empty {
    color: var(--muted);
    background: rgba(0, 8, 9, 0.62);
}

@media (max-width: 820px) {
    .content-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .checkbox-grid,
    .admin-facts {
        grid-template-columns: 1fr;
    }

    .admin-heading,
    .admin-list-row {
        display: grid;
    }
}

@media (max-width: 520px) {
    .site-main {
        width: min(100% - 1rem, 72rem);
        padding-top: 1rem;
    }

    .banner-nav-link {
        top: 66%;
        height: 34%;
    }

    .hero-panel,
    .interface-panel,
    .engine-card {
        padding: 1.1rem;
    }

}
