@font-face {
    font-family: "BlackOps";
    src: url("../fonts/BlackOpsOne-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Patrick";
    src: url("../fonts/PatrickHand-Regular.ttf") format("truetype");
    font-display: swap;
}

:root {
    --paper: #ece5d8;
    --paper-soft: rgba(247, 244, 237, 0.76);
    --paper-strong: rgba(247, 244, 237, 0.9);
    --ink: #17120e;
    --muted: #4f4a45;
    --red: #9f1210;
    --red-dark: #730807;
    --green: #297a34;
    --line: rgba(55, 45, 34, 0.24);
    --shadow: rgba(28, 22, 16, 0.22);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    background: #ded7ca url("../img/background.png") center / cover fixed no-repeat;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(236, 229, 216, 0.2), rgba(236, 229, 216, 0.08) 48%, rgba(23, 18, 14, 0.08)),
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.3), transparent 34%);
}

a {
    color: var(--red);
    text-decoration: none;
}

.home-shell {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: grid;
    grid-template-rows: 170px minmax(0, 1fr) 58px;
    padding: 24px clamp(18px, 3vw, 44px) 0;
    overflow: hidden;
}

.site-header {
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    gap: 24px;
    align-items: start;
    min-height: 0;
}

.network-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-top: 16px;
}

.network-brand img {
    width: 62px;
    height: auto;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.22));
}

.network-brand strong,
.network-brand span,
.hero-title h1,
.hero-title p,
.auth-tabs,
.primary-action,
.text-action,
.home-footer,
.lore-card h2 {
    font-family: "BlackOps", Georgia, serif;
    letter-spacing: 0;
    text-transform: uppercase;
}

.network-brand strong {
    display: block;
    font-size: 20px;
    line-height: 1;
}

.network-brand span {
    display: block;
    margin-top: 5px;
    color: var(--red);
    font-size: 13px;
}

.hero-title {
    text-align: center;
    padding-top: 0;
}

.hero-title img {
    width: min(100%, 560px);
    max-height: 128px;
    height: auto;
    filter: drop-shadow(0 5px 3px rgba(255, 255, 255, 0.18));
}

.status-card {
    border: 1px solid rgba(55, 45, 34, 0.22);
    border-radius: 5px;
    background: rgba(239, 235, 226, 0.68);
    box-shadow: 0 12px 26px var(--shadow);
    backdrop-filter: blur(3px);
    padding: 14px 18px;
}

.status-card dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.status-card div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: center;
}

.status-card dt,
.status-card dd {
    margin: 0;
    font-size: 14px;
}

.status-card dt {
    font-family: "BlackOps", Georgia, serif;
    text-transform: uppercase;
}

.status-card dd {
    text-align: right;
    font-weight: 700;
}

.status-card .is-online {
    color: var(--green);
    text-transform: uppercase;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(360px, 420px) 1fr minmax(390px, 500px) 1fr;
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
    min-height: 0;
    padding: 4px 0 26px;
}

.lore-card {
    grid-column: 1;
    align-self: end;
    max-width: 420px;
    min-height: 372px;
    padding: 24px 28px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px var(--shadow);
}

.lore-card h2 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.05;
}

.lore-card p,
.lore-card strong {
    font-size: clamp(14px, 0.9vw, 17px);
    line-height: 1.08;
}

.lore-card p {
    margin: 0 0 7px;
}

.lore-card strong {
    display: block;
    margin-top: 8px;
    line-height: 1.08;
}

.auth-card {
    grid-column: 3;
    position: relative;
    min-height: 430px;
    padding: 60px 46px 26px;
    background: rgba(247, 244, 237, 0.82);
    border: 1px solid rgba(55, 45, 34, 0.18);
    box-shadow: 0 18px 44px rgba(28, 22, 16, 0.26);
    backdrop-filter: blur(3px);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/icon.png") center 48% / 230px auto no-repeat;
    opacity: 0.045;
    pointer-events: none;
}

.auth-badge {
    position: absolute;
    top: 42px;
    left: 50%;
    width: 78px;
    transform: translateX(-50%);
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.26));
}

.auth-tabs {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 58px 0 12px;
    color: #332c26;
    font-size: 15px;
    text-align: center;
}

.auth-tabs button {
    cursor: pointer;
    color: #332c26;
    font: inherit;
    text-transform: inherit;
    background: transparent;
    border: 0;
    padding: 0;
}

.auth-tabs .active,
.auth-tabs button:hover {
    color: var(--red);
}

.auth-form,
.account-card h2,
.account-card p,
.account-card .primary-action {
    position: relative;
    z-index: 1;
}

.auth-form label {
    display: block;
    width: 1px;
    height: 1px;
    overflow: hidden;
    position: absolute;
}

.auth-form input:not([type="checkbox"]) {
    width: 100%;
    min-height: 48px;
    margin-bottom: 14px;
    padding: 12px 14px;
    color: #101010;
    font-size: 15px;
    font-family: Georgia, "Times New Roman", serif;
    background: rgba(228, 237, 249, 0.7);
    border: 1px solid rgba(70, 78, 88, 0.45);
    border-radius: 0;
}

.auth-form input::placeholder {
    color: rgba(23, 18, 14, 0.72);
    opacity: 1;
}

.auth-panel {
    display: none;
}

.auth-card[data-auth-mode="login"] [data-auth-panel="login"],
.auth-card[data-auth-mode="register"] [data-auth-panel="register"] {
    display: block;
}

[data-auth-panel="register"] input:not([type="checkbox"]) {
    min-height: 42px;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin: 3px 0 18px;
    font-size: 14px;
}

.remember-line {
    display: flex !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    gap: 10px;
    align-items: center;
}

.remember-line input {
    width: 14px;
    height: 14px;
}

.primary-action,
.text-action {
    cursor: pointer;
}

.primary-action {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 14px 18px;
    color: #fff8ec;
    text-align: center;
    font-size: 16px;
    background: linear-gradient(90deg, #b82420, var(--red-dark));
    border: 0;
    border-radius: 0;
    box-shadow: 0 10px 18px rgba(112, 8, 6, 0.18);
}

.secondary-action {
    background: #1c2527;
}

.form-error {
    margin: 0 0 14px;
    padding: 10px 12px;
    color: #7b0a08;
    background: rgba(255, 232, 226, 0.82);
    border: 1px solid rgba(159, 18, 16, 0.28);
}

.account-card {
    display: grid;
    align-content: center;
    text-align: center;
}

.account-card h2 {
    margin: 0 0 12px;
    font-family: "BlackOps", Georgia, serif;
    text-transform: uppercase;
}

.account-card p {
    margin: 0 0 24px;
    line-height: 1.45;
}

.home-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 0 calc(clamp(18px, 3vw, 44px) * -1);
    padding: 16px clamp(18px, 7vw, 130px);
    color: #fff;
    background: rgba(5, 14, 20, 0.88);
    font-size: 14px;
    text-align: center;
    align-self: end;
}

@media (max-width: 1180px) {
    .site-header {
        grid-template-columns: 230px 1fr;
    }

    .status-card {
        grid-column: 2;
        justify-self: end;
        width: min(100%, 260px);
    }

    .content-grid {
        grid-template-columns: minmax(250px, 320px) minmax(340px, 500px);
    }

    .auth-card {
        grid-column: 2;
    }
}

@media (max-width: 860px) {
    .site-header,
    .content-grid,
    .home-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .network-brand,
    .status-card,
    .lore-card,
    .auth-card {
        width: min(100%, 500px);
        justify-self: center;
    }

    .hero-title {
        order: -1;
    }

    .status-card {
        grid-column: auto;
        justify-self: center;
    }

    .content-grid {
        padding-bottom: 34px;
    }

    .lore-card {
        align-self: auto;
        max-width: 500px;
    }

    .auth-card {
        min-height: auto;
        padding-inline: 22px;
    }

    .home-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 760px) {
    .home-shell {
        grid-template-rows: 140px minmax(0, 1fr) 50px;
        padding-top: 16px;
    }

    .hero-title img {
        max-height: 106px;
    }

    .network-brand {
        padding-top: 8px;
    }

    .network-brand img {
        width: 52px;
    }

    .status-card {
        padding: 10px 14px;
    }

    .status-card dl {
        gap: 5px;
    }

    .content-grid {
        padding-bottom: 16px;
    }

    .lore-card {
        min-height: 330px;
        padding: 18px 24px;
    }

    .lore-card p,
    .lore-card strong {
        font-size: 14px;
    }

    .auth-card {
        min-height: 390px;
        padding-top: 46px;
    }

    .auth-badge {
        top: 30px;
        width: 66px;
    }

    .auth-tabs {
        margin-top: 48px;
    }

    .auth-form input:not([type="checkbox"]) {
        min-height: 40px;
        margin-bottom: 9px;
    }

    .primary-action {
        min-height: 42px;
        padding: 11px 16px;
    }

    .home-footer {
        padding-top: 12px;
        padding-bottom: 12px;
        font-size: 12px;
    }
}
