:root {
    color-scheme: dark;
    --bg: #0d0d0c;
    --surface: #171714;
    --surface-soft: #202018;
    --line: #343327;
    --text: #f5f1e6;
    --muted: #b2aa98;
    --gold: #d9aa43;
    --gold-strong: #f0bf55;
    --green: #7fc46f;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 70% 0%, rgba(217, 170, 67, 0.12), transparent 34rem),
        linear-gradient(180deg, #17140e 0%, var(--bg) 38rem);
    color: var(--text);
    font: 15px/1.5 Inter, "Segoe UI", Arial, sans-serif;
}

a {
    color: inherit;
}

.site-header {
    align-items: center;
    backdrop-filter: blur(12px);
    background: rgba(13, 13, 12, 0.78);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 14px max(22px, calc((100vw - 1180px) / 2));
    position: sticky;
    right: 0;
    top: 0;
    z-index: 10;
}

.brand {
    color: var(--gold);
    font: 800 28px/1 Georgia, "Times New Roman", serif;
    text-decoration: none;
}

nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

nav a {
    border-radius: 6px;
    color: var(--muted);
    padding: 8px 10px;
    text-decoration: none;
}

nav a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.nav-button {
    background: var(--gold);
    color: #171108;
    font-weight: 800;
}

main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 34px 22px 60px;
}

.hero {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    padding: 32px 0 22px;
}

.hero-copy {
    align-items: end;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: none;
}

.status {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    gap: 9px;
    margin: 0 0 18px;
}

.status span {
    background: var(--green);
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(127, 196, 111, 0.55);
    height: 9px;
    width: 9px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font: 800 50px/1.02 Georgia, "Times New Roman", serif;
    margin-bottom: 18px;
    max-width: 760px;
}

.lead {
    color: #ddd5c2;
    font-size: 18px;
    max-width: 640px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.button {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    text-decoration: none;
}

.button:hover {
    border-color: var(--gold);
}

.button.primary {
    background: var(--gold);
    border-color: var(--gold);
    color: #161006;
}

.quick-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 130px));
    margin-top: 0;
}

.quick-stats div,
.server-info article,
.panel,
.account-strip,
.final-cta {
    background: rgba(23, 23, 20, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.quick-stats div {
    padding: 14px;
}

.quick-stats strong {
    color: var(--gold-strong);
    display: block;
    font-size: 25px;
    line-height: 1;
}

.quick-stats span,
.server-info span,
.panel-head a,
.character-list span {
    color: var(--muted);
}

.video-card {
    aspect-ratio: 16 / 9;
    background: #0a0a09;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: min(76vh, 760px);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.video-card iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.server-info {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 10px;
}

.server-info article {
    padding: 18px;
}

.server-info strong {
    display: block;
    font-size: 18px;
    margin: 5px 0;
}

.server-info p {
    color: var(--muted);
    margin-bottom: 0;
}

.update-highlight {
    align-items: center;
    background: rgba(32, 32, 24, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 16px;
    padding: 22px;
}

.update-highlight span {
    color: var(--gold-strong);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.update-highlight h2 {
    margin-bottom: 6px;
}

.update-highlight p {
    color: var(--muted);
    margin-bottom: 0;
}

.account-strip {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 22px;
}

.account-strip h2,
.account-strip p {
    margin-bottom: 4px;
}

.account-strip p {
    color: var(--muted);
}

.quick-create {
    align-items: stretch;
}

.quick-register {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
    min-width: min(100%, 560px);
}

.quick-register .notice {
    grid-column: 1 / -1;
}

.content-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    margin-top: 18px;
}

.panel {
    padding: 20px;
}

.panel-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
}

.panel-head h2 {
    margin: 0;
}

.panel-head a {
    text-decoration: none;
}

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

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.character-list {
    display: grid;
    gap: 10px;
}

.character-list div,
.character-list a {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    padding: 12px;
    text-decoration: none;
}

.character-list strong,
.character-list span {
    display: block;
}

.page-title {
    padding: 42px 0 18px;
}

.page-title h1 {
    margin-bottom: 10px;
}

.page-title p {
    color: var(--muted);
    font-size: 18px;
    max-width: 720px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tabs a {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    padding: 8px 10px;
    text-decoration: none;
}

.tabs a.active,
.tabs a:hover {
    border-color: var(--gold);
    color: var(--text);
}

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

.update-panel .panel-head span {
    color: var(--muted);
}

.update-section {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 18px;
}

.update-section:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.update-section h3 {
    color: var(--gold-strong);
    margin: 0 0 8px;
}

.update-section p,
.update-section li {
    color: var(--muted);
}

.update-section ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.update-section li {
    margin-bottom: 7px;
}

.wide-form {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 18px;
}

.character-action-form {
    grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(180px, 1fr) auto;
    margin-bottom: 0;
    margin-top: 18px;
}

.account-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
}

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

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

.account-form label {
    display: grid;
    gap: 7px;
}

.account-form label span {
    color: var(--muted);
    font-size: 13px;
}

.submit-button {
    min-height: 48px;
}

.notice {
    border-radius: 7px;
    display: grid;
    gap: 4px;
    padding: 13px;
}

.notice strong,
.notice span {
    display: block;
}

.notice.success {
    background: rgba(127, 196, 111, 0.12);
    border: 1px solid rgba(127, 196, 111, 0.45);
}

.notice.error {
    background: rgba(208, 107, 95, 0.12);
    border: 1px solid rgba(208, 107, 95, 0.45);
}

.page-notice {
    margin-bottom: 16px;
}

.account-help ol {
    color: var(--muted);
    margin: 0 0 18px;
    padding-left: 20px;
}

.account-help li {
    margin-bottom: 8px;
}

input,
button,
select {
    border-radius: 7px;
    font: inherit;
}

input,
select {
    background: #0a0a09;
    border: 1px solid var(--line);
    color: var(--text);
    min-width: 0;
    padding: 11px 12px;
}

button {
    background: var(--gold);
    border: 1px solid var(--gold);
    color: #161006;
    cursor: pointer;
    font-weight: 800;
    padding: 11px 16px;
}

td a {
    color: var(--gold-strong);
    text-decoration: none;
}

.empty {
    color: var(--muted);
}

.profile-card {
    align-items: center;
    display: flex;
    gap: 16px;
}

.avatar {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--gold);
    display: flex;
    font: 800 34px/1 Georgia, "Times New Roman", serif;
    height: 74px;
    justify-content: center;
    text-transform: uppercase;
    width: 74px;
}

.profile-card h2,
.profile-card p {
    margin-bottom: 4px;
}

.profile-card p {
    color: var(--muted);
}

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

.profile-grid div {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 14px;
}

.profile-grid span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    text-transform: uppercase;
}

.profile-grid strong {
    display: block;
    font-size: 18px;
    margin-top: 4px;
}

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

.character-create h2,
.account-form h2 {
    margin-bottom: 0;
}

.form-note {
    color: var(--muted);
    margin-bottom: 0;
}

.character-panel {
    margin-top: 16px;
}

.character-panel .panel-head span {
    color: var(--muted);
}

.flat-panel {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.profile-sections {
    margin-top: 18px;
}

.small-link {
    color: var(--gold-strong);
    font-weight: 700;
    text-decoration: none;
}

.compact {
    margin-top: 10px;
}

.final-cta {
    margin-top: 18px;
    padding: 28px;
    text-align: center;
}

.final-cta p {
    color: var(--muted);
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
}

.final-cta .actions {
    justify-content: center;
}

@media (max-width: 900px) {
    .site-header,
    nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-copy,
    .server-info,
    .content-grid,
    .updates-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 42px;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .wide-form,
    .character-action-form,
    .account-layout,
    .auth-layout,
    .dashboard-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .account-strip,
    .update-highlight {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-register {
        grid-template-columns: 1fr;
        width: 100%;
    }
}
