:root {
    --bg: #05080d;
    --panel: rgba(11, 15, 23, 0.94);
    --panel-border: rgba(255, 255, 255, 0.06);
    --text: #eef1f4;
    --muted: #8f97a4;
    --green: #4aa8ff;
    --green-soft: rgba(74, 168, 255, 0.18);
    --green-bright: #8ed8ff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 50% 42%, rgba(18, 49, 91, 0.5), transparent 28%),
        radial-gradient(circle at 28% 32%, rgba(31, 91, 156, 0.28), transparent 18%),
        radial-gradient(circle at 78% 34%, rgba(19, 60, 114, 0.24), transparent 20%),
        linear-gradient(180deg, #080b10 0%, #040609 100%);
    color: var(--text);
    font-family: "Inter", sans-serif;
}

body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    min-height: 100vh;
    position: relative;
}

.topbar {
    position: relative;
    z-index: 5;
    background: rgba(12, 16, 23, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-inner,
.navbar-inner {
    width: min(1380px, calc(100% - 48px));
    margin: 0 auto;
}

.topbar-inner {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #99a2ae;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.top-pill strong {
    color: var(--green-bright);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 14px rgba(142, 216, 255, 0.95);
}

.divider {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.14);
}

.navbar {
    position: relative;
    z-index: 5;
    background: rgba(10, 14, 21, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-inner {
    height: 54px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.brand {
    justify-self: start;
    font-family: "Cinzel", serif;
    font-size: 23px;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #f2f5f8;
}

.brand span {
    color: var(--green);
}

.menu {
    display: flex;
    align-items: center;
    gap: 34px;
    font-size: 13px;
    color: #d4dae2;
    font-weight: 600;
}

.menu a {
    opacity: 0.82;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.menu a:hover {
    opacity: 1;
    color: white;
}

.menu a.menu-active {
    opacity: 1;
    color: #fff3f4;
}

.menu a i {
    font-size: 10px;
    opacity: 0.6;
}

.signin {
    padding: 9px 14px;
    border-radius: 7px;
    border: 1px solid rgba(74, 168, 255, 0.45);
    background: rgba(17, 58, 103, 0.28);
    color: #a9dcff;
    opacity: 1 !important;
}

.lang-switch {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    color: #d9dee6;
    background: rgba(15, 20, 29, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font: inherit;
    font-size: 13px;
}

.lang-switch i:last-child {
    font-size: 10px;
    opacity: 0.7;
}

.hero {
    position: relative;
    min-height: calc(100vh - 78px);
    overflow: hidden;
    background: url("assets/freya-bg.png") center center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 1;
    pointer-events: none;
}

.hero-overlay,
.hero-particles,
.hero-character,
.hero-dragon {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-overlay {
    display: none;
}

.hero-particles {
    background: none;
    z-index: 1;
}

.hero-character,
.hero-dragon {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
    padding-top: 275px;
    text-align: center;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 298px;
    height: 28px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(56, 160, 112, 0.45);
    background: rgba(13, 56, 43, 0.48);
    color: #93dfff;
    font-family: "Cinzel", serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    box-shadow: 0 0 30px rgba(39, 99, 173, 0.18);
}

.hero h1 {
    margin: 25px 0 22px;
    font-family: "Cinzel", serif;
    font-size: clamp(38px, 4.2vw, 60px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #f5f7f9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
}

.hero h1 span {
    color: var(--green);
}

.lead {
    max-width: 710px;
    margin: 0 auto;
    color: #c0c6cf;
    font-size: 18px;
    line-height: 1.65;
}

.sublead {
    margin: 12px auto 0;
    max-width: 760px;
    color: rgba(179, 187, 197, 0.58);
    font-size: 14px;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.btn {
    height: 48px;
    padding: 0 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: white;
    background: linear-gradient(180deg, #63c5ff 0%, #2f84e6 100%);
    box-shadow: 0 10px 28px rgba(74, 168, 255, 0.28);
}

.btn-secondary {
    color: #edf2f7;
    background: rgba(10, 14, 21, 0.62);
    border-color: rgba(255, 255, 255, 0.09);
}

.socials {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 2;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.scroll-cue i {
    font-size: 13px;
}

@media (max-width: 1200px) {
    .menu {
        gap: 20px;
        font-size: 12px;
    }

    .hero-content {
        padding-top: 220px;
    }
}

@media (max-width: 980px) {
    .navbar-inner {
        grid-template-columns: 1fr;
        gap: 16px;
        height: auto;
        padding: 18px 0;
        justify-items: center;
    }

    .topbar-inner {
        height: auto;
        padding: 8px 0;
        flex-direction: column;
        gap: 8px;
    }

    .topbar-left,
    .topbar-right,
    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-character,
    .hero-dragon {
        opacity: 0.36;
    }

    .hero-content {
        padding-top: 160px;
    }
}

@media (max-width: 640px) {
    .topbar-inner,
    .navbar-inner {
        width: min(100% - 24px, 1380px);
    }

    .menu {
        gap: 14px;
    }

    .version-badge {
        min-width: auto;
        width: 100%;
        max-width: 340px;
        padding: 0 12px;
        font-size: 10px;
        letter-spacing: 0.16em;
    }

    .hero h1 {
        font-size: 34px;
    }

    .lead {
        font-size: 16px;
    }

    .sublead {
        font-size: 13px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero-character,
    .hero-dragon {
        display: none;
    }
}

.content-section {
    position: relative;
    z-index: 3;
    width: min(1380px, calc(100% - 48px));
    margin: 0 auto 36px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
    margin-top: -56px;
}

.panel {
    background: rgba(11, 15, 23, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
}

.panel-wide {
    grid-column: 1 / -1;
}

.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading span {
    font-family: "Cinzel", serif;
    font-size: 24px;
    font-weight: 700;
    color: #f4f6f8;
}

.panel-heading small {
    color: var(--muted);
    font-size: 13px;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.status-card {
    padding: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-card.is-online {
    border-color: rgba(91, 184, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(91, 184, 255, 0.06);
}

.status-card.is-offline {
    border-color: rgba(191, 79, 79, 0.2);
}

.status-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.status-title-row h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.status-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.05);
}

.is-online .status-chip {
    color: #bde9ff;
    background: rgba(74, 168, 255, 0.14);
}

.is-offline .status-chip {
    color: #f39696;
    background: rgba(191, 79, 79, 0.14);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.metric-box {
    padding: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 9px;
}

.metric-box strong {
    font-size: 28px;
    color: #f5f7fa;
}

.flash {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.flash-success {
    background: rgba(74, 168, 255, 0.12);
    border: 1px solid rgba(74, 168, 255, 0.24);
    color: #c5edff;
}

.flash-error {
    background: rgba(191, 79, 79, 0.12);
    border: 1px solid rgba(191, 79, 79, 0.22);
    color: #ffb7b7;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 8px;
}

.auth-form span {
    font-size: 13px;
    font-weight: 700;
    color: #dce2e9;
}

.auth-form input {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 8, 14, 0.8);
    color: white;
    padding: 0 14px;
    outline: none;
}

.auth-form input:focus {
    border-color: rgba(142, 216, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(142, 216, 255, 0.08);
}

.btn-full {
    width: 100%;
}

.account-box p {
    margin: 0 0 10px;
    color: #d3d9e2;
}

.table-wrap {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.ranking-table th {
    color: #95a0ae;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ranking-table td {
    color: #edf2f7;
    font-size: 14px;
}

.table-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.table-status.is-online {
    background: rgba(74, 168, 255, 0.12);
    color: #c3ecff;
}

.table-status.is-offline {
    background: rgba(255, 255, 255, 0.05);
    color: #bcc6d1;
}

.page-stack {
    margin-top: 26px;
}

.subpage-hero {
    position: relative;
    min-height: 300px;
    display: grid;
    place-items: center;
    padding: 60px 0 10px;
    background: url("assets/freya-bg.png") center center / cover no-repeat;
}

.subpage-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 1.48);
    z-index: 0;
    pointer-events: none;
}

.subpage-intro {
    width: min(820px, calc(100% - 40px));
    text-align: center;
    position: relative;
    z-index: 1;
}

.subpage-intro h1 {
    margin: 22px 0 14px;
    font-family: "Cinzel", serif;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.1;
}

.subpage-intro h1 span {
    color: var(--green);
}

.subpage-intro p {
    margin: 0 auto;
    max-width: 720px;
    color: #c6ccd5;
    font-size: 17px;
    line-height: 1.7;
}

.auth-grid {
    grid-template-columns: 1fr 1fr;
}

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

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .status-cards,
    .metrics-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .content-section {
        width: min(100% - 24px, 1380px);
    }

    .panel {
        padding: 18px;
        border-radius: 16px;
    }

    .panel-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-heading span {
        font-size: 20px;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 12px 10px;
    }
}
