@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    --bg: #090b16;
    --panel: #101625;
    --panel-2: #151c2d;
    --line: #262f44;
    --text: #eef2f7;
    --muted: #9ca7bc;
    --accent: #ff7a1a;
    --accent-2: #ff9a3d;
    --danger: #ff6b6b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.16), transparent 35%),
        linear-gradient(315deg, rgba(120, 70, 20, 0.20), transparent 35%),
        var(--bg);
}

.auth-panel {
    width: min(420px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.home-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.landing-shell {
    min-height: 100vh;
    display: grid;
    align-content: center;
    gap: 24px;
    position: relative;
    padding-top: 84px;
}

.landing-shell::before {
    content: "";
    position: absolute;
    inset: 8% 12% auto;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 122, 26, 0.28), transparent 65%);
    filter: blur(24px);
    pointer-events: none;
    z-index: 0;
}

.landing-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 92%);
    pointer-events: none;
    z-index: 0;
}

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 122, 26, 0.35);
    background: rgba(8, 10, 20, 0.86);
    backdrop-filter: blur(8px);
    z-index: 30;
}

.brand-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: absolute;
    left: 22px;
}

.brand-left strong {
    display: block;
    font-size: 22px;
    color: #ff7a1a;
    line-height: 1;
}

.brand-left span {
    color: #c7ccd8;
    font-size: 13px;
    letter-spacing: 1px;
}

.landing-links {
    display: inline-flex;
    align-items: center;
    gap: 26px;
    justify-content: center;
}

.landing-links a {
    color: #dbe1ef;
    text-decoration: none;
    font-weight: 600;
}

.landing-links a:hover {
    color: #ffffff;
}

.landing-top {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 18px;
    border-radius: 12px;
    padding: 24px 20px 8px;
    position: relative;
    z-index: 1;
}

.top-right-actions {
    display: flex;
    gap: 10px;
    z-index: 31;
    position: absolute;
    right: 22px;
}

.hero-logo {
    width: min(340px, 62vw);
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 122, 26, 0.35));
}

.hero-sub {
    margin: 0;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ff9a3d;
}

.status-grid {
    width: min(980px, 100%);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-card {
    background: rgba(15, 20, 34, 0.8);
    border: 1px solid #222a3a;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}

.status-card span {
    display: block;
    color: #9da7bc;
    font-size: 13px;
    margin-bottom: 8px;
}

.status-card strong {
    font-size: 30px;
    color: #eef2f7;
}

.status-card:first-child strong {
    color: #7be49c;
}

.home-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.home-logo {
    margin-bottom: 0;
}

.server-meta h1 {
    margin: 0 0 6px;
}

.server-meta p {
    margin: 0;
}

.server-meta strong {
    color: var(--text);
}

.home-top .button {
    margin-left: auto;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.showcase-bottom {
    margin-top: 10px;
}

.showcase-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0f1218;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.showcase-grid img:hover {
    transform: translateY(-2px);
    border-color: #4b5366;
}

.home-auth {
    max-width: 460px;
    text-align: left;
}

.server-ip {
    font-size: 34px;
    font-weight: 700;
    color: #ffdbd9;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

.connect-btn {
    margin-top: 4px;
}

.connect-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.ip-strip {
    width: min(860px, 100%);
    background: rgba(11, 14, 25, 0.94);
    border: 1px solid rgba(255, 122, 26, 0.45);
    border-radius: 20px;
    padding: 14px;
}

.copy-ip-btn {
    margin-top: 4px;
}

.copy-feedback {
    margin: 0;
    min-height: 18px;
    font-size: 13px;
    color: #8fe29c;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.copy-feedback.is-visible {
    opacity: 1;
}

.login-fab {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    min-height: 56px;
    padding: 0;
    background: var(--accent);
    color: #fff4f3;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(255, 122, 26, 0.45);
}

.login-fab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.forum-fab {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    min-height: 56px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
}

.forum-fab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.login-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.login-modal.is-open {
    display: flex;
}

.login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.login-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, calc(100% - 32px));
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.brand-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: #17120a;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark.small {
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.logo-main {
    width: 210px;
    height: auto;
    display: block;
    margin-bottom: 14px;
    border-radius: 8px;
}

.logo-side {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

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

p {
    color: var(--muted);
}

.form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    background: #10131a;
    color: var(--text);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 16px;
}

button, .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff4f3;
    font-weight: 700;
    padding: 0 16px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.button.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.button.ghost:hover {
    border-color: #4b5366;
    background: rgba(255, 255, 255, 0.03);
}

.alert {
    border: 1px solid rgba(255, 107, 107, 0.45);
    background: rgba(255, 107, 107, 0.12);
    color: #ffd8d8;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

.app {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--line);
    background: #141820;
    padding: 20px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.sidebar-brand a {
    display: inline-flex;
}

.sidebar nav {
    display: grid;
    gap: 6px;
}

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

.sidebar nav a:hover {
    color: var(--text);
    background: var(--panel-2);
}

.content {
    padding: 26px;
    min-width: 0;
}

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

.topbar h1 {
    margin-bottom: 4px;
}

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

.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card,
.section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stat-card {
    padding: 16px;
}

.stat-card span,
.detail span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 22px;
}

.section {
    margin-top: 18px;
    overflow: hidden;
}

.section-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    margin: 0;
    font-size: 18px;
}

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

.detail {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
    min-width: 0;
}

.detail strong {
    overflow-wrap: anywhere;
}

.skin-preview-wrap {
    padding: 0 18px 18px;
}

.skin-preview {
    width: 160px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0f1218;
    display: block;
}

.skin-fallback {
    display: none;
    color: var(--muted);
    font-size: 14px;
    margin-top: 8px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th, td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 13px;
    background: #171b23;
}

td {
    color: #dbe4f0;
}

.compact table {
    min-width: 520px;
}

.compact td:last-child {
    white-space: normal;
    overflow-wrap: anywhere;
}

.empty {
    padding: 18px;
    margin: 0;
}

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

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

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

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

    .landing-links {
        display: none;
    }

    .brand-left {
        left: 12px;
    }

    .top-right-actions {
        right: 12px;
    }
}

@media (max-width: 600px) {
    .home-shell {
        padding: 16px;
    }

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

    .home-top .button {
        margin-left: 0;
    }

    .connect-actions {
        width: 100%;
    }

    .hero-sub {
        font-size: 24px;
        letter-spacing: 3px;
    }

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

    .server-ip {
        font-size: 24px;
    }

    .content {
        padding: 16px;
    }

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

    .sidebar nav,
    .stat-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
