:root {
    color-scheme: dark;

    --background: #090d0a;
    --background-soft: #111713;
    --panel: rgb(18 26 21 / 92%);
    --panel-strong: #151e18;
    --panel-dark: #090e0b;

    --border: #2b3c31;
    --border-bright: #3b5845;

    --text: #eef6f0;
    --text-soft: #b3c1b7;
    --text-muted: #7f9285;

    --green: #71e09b;
    --green-dark: #163d28;
    --green-bright: #98f3b8;

    --red: #ff858d;
    --red-dark: #4b2226;

    --amber: #f1c86a;
    --amber-dark: #4b3c18;

    --shadow: 0 24px 70px rgb(0 0 0 / 34%);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(
            180deg,
            rgb(10 17 12 / 40%),
            rgb(7 10 8 / 96%)
        ),
        var(--background);
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.background-glow {
    position: fixed;
    z-index: -1;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    pointer-events: none;
}

.background-glow-one {
    top: -220px;
    left: -180px;
    background: #4fbb78;
}

.background-glow-two {
    right: -220px;
    bottom: -260px;
    background: #275c40;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
    padding: 38px 0 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

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

.brand-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid #42644d;
    border-radius: 15px;
    background:
        linear-gradient(145deg, #223f2e, #122219);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 9%),
        0 12px 28px rgb(0 0 0 / 25%);
    color: var(--green-bright);
    font-family: Georgia, serif;
    font-size: 1.8rem;
    font-weight: 800;
}

.eyebrow,
.card-kicker {
    margin: 0 0 5px;
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.1;
}

h2 {
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.refresh-state {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 15px;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    transition:
        transform 120ms ease,
        border-color 120ms ease,
        background 120ms ease,
        opacity 120ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:active:not(:disabled) {
    transform: translateY(0);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.button-secondary {
    border-color: var(--border-bright);
    background: #18251d;
}

.button-secondary:hover:not(:disabled),
.button-copy:hover:not(:disabled) {
    background: #213328;
}

.button-copy {
    border-color: #34513e;
    background: #18251d;
}

.button-start {
    border-color: #297a49;
    background: #17422a;
    color: #a2f6bd;
}

.button-restart {
    border-color: #8a6b2b;
    background: #3c3119;
    color: #f6d984;
}

.button-stop {
    border-color: #7d353b;
    background: #3e2024;
    color: #ff9ea4;
}

.server-hero,
.panel-card,
.stat-card {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.server-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    overflow: hidden;
    border-radius: 22px;
}

.hero-main {
    padding: clamp(24px, 5vw, 36px);
}

.hero-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.hero-main h2 {
    margin-top: 14px;
    font-size: clamp(1.9rem, 6vw, 3.4rem);
    line-height: 1;
}

.world-name {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.server-emblem {
    display: grid;
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #36513e;
    border-radius: 50%;
    background:
        radial-gradient(circle, #223b2b, #101b14);
    color: #7fdca1;
    font-family: Georgia, serif;
    font-size: 2.4rem;
    opacity: 0.85;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-badge::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    box-shadow: 0 0 10px currentColor;
}

.status-running {
    background: var(--green-dark);
    color: var(--green-bright);
}

.status-stopped,
.status-inactive {
    background: var(--red-dark);
    color: var(--red);
}

.status-failed {
    background: #641f27;
    color: #ff949b;
}

.status-activating,
.status-deactivating {
    background: var(--amber-dark);
    color: var(--amber);
}

.status-loading,
.status-unknown {
    background: #273129;
    color: #b0beb4;
}

.address-panel {
    display: flex;
    max-width: 620px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    border: 1px solid #23332a;
    border-radius: 13px;
    padding: 11px 11px 11px 15px;
    background: var(--panel-dark);
}

.address-panel > div {
    min-width: 0;
}

.address-panel code {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #d9e7dc;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.control-note {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.server-summary {
    display: grid;
    align-content: center;
    gap: 4px;
    border-left: 1px solid var(--border);
    padding: 28px;
    background:
        linear-gradient(
            155deg,
            rgb(34 51 40 / 45%),
            rgb(12 18 14 / 85%)
        );
}

.summary-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #27382e;
    padding: 14px 0;
}

.summary-item:last-child {
    border-bottom: 0;
}

.summary-icon {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 10px;
    background: #1c2a21;
    color: #84c99d;
}

.summary-item strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #dce8df;
    font-size: 0.91rem;
    text-overflow: ellipsis;
}

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

.stat-card {
    border-radius: 15px;
    padding: 19px;
}

.stat-card strong {
    display: block;
    margin: 8px 0 3px;
    font-size: 1.55rem;
}

.stat-detail {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
    gap: 18px;
    margin-top: 18px;
}

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

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.card-header h2 {
    font-size: 1.25rem;
}

.card-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 11px;
    background: #1b2b21;
    color: var(--green);
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.world-files {
    margin-top: 18px;
}

.world-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #27372e;
    padding: 15px 0;
}

.world-file:last-child {
    border-bottom: 0;
}

.world-file > div {
    min-width: 0;
}

.world-file strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.world-file-info {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.file-state {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.file-present {
    background: var(--green-dark);
    color: var(--green-bright);
}

.file-missing {
    background: var(--red-dark);
    color: var(--red);
}

.loading-placeholder {
    color: var(--text-muted);
    padding: 20px 0;
}

.future-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
    border-top: 1px solid #27372e;
    padding-top: 18px;
}

.log-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.text-button {
    margin-left: auto;
    border: 0;
    padding: 0;
    background: transparent;
    color: #91cfa7;
    cursor: pointer;
}

.text-button:hover {
    text-decoration: underline;
}

.logs {
    height: 390px;
    margin: 12px 0 0;
    overflow: auto;
    border: 1px solid #1e2b23;
    border-radius: 12px;
    padding: 15px;
    background: #070b08;
    color: #b9c8bd;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.76rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.roadmap-card {
    margin-top: 18px;
}

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

.roadmap-item {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 10px;
    border: 1px solid #293a30;
    border-radius: 12px;
    padding: 14px;
    background: #111a15;
}

.roadmap-current {
    border-color: #3a6a4c;
    background: #14251a;
}

.roadmap-number {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #24352a;
    color: var(--green-bright);
    font-weight: 800;
}

.roadmap-item p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.77rem;
    line-height: 1.4;
}

.error-message {
    margin: 18px 0 0;
    border: 1px solid #81353c;
    border-radius: 12px;
    padding: 14px;
    background: #3c1d21;
    color: #ffadb2;
}

.page-footer {
    display: flex;
    justify-content: center;
    gap: 9px;
    padding: 24px 0 4px;
    color: #607267;
    font-size: 0.78rem;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10;
    max-width: min(360px, calc(100% - 44px));
    border: 1px solid #3b664a;
    border-radius: 12px;
    padding: 12px 16px;
    background: #17271c;
    box-shadow: var(--shadow);
    color: #dff4e5;
}

@media (max-width: 900px) {
    .server-hero,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .server-summary {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

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

@media (max-width: 620px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

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

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hero-heading-row {
        flex-direction: column-reverse;
    }

    .server-emblem {
        width: 58px;
        height: 58px;
        font-size: 1.8rem;
    }

    .address-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .address-panel .button {
        width: 100%;
    }

    .control-row .button {
        flex: 1 1 120px;
    }

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

    .panel-card {
        padding: 18px;
    }

    .logs {
        height: 310px;
    }

    .page-footer {
        align-items: center;
        flex-direction: column;
    }
}
