:root {
    --bg-0: #060a13;
    --bg-1: #0a101b;
    --bg-2: #10192b;
    --panel: #151f32;
    --panel-soft: #121a2a;
    --line: #2a3d5f;
    --line-soft: #22314e;
    --line-bright: #2f93ff;
    --text: #ecf3ff;
    --muted: #9bb0cf;
    --blue: #2395ff;
    --blue-2: #1b64df;
    --ok: #8ef0c2;
    --err: #ff95b6;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

.home-page {
    background: linear-gradient(180deg, #0b111d, #070c15);
}

.home-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(980px 420px at 8% -10%, rgba(26, 93, 173, 0.3), transparent 57%),
        radial-gradient(820px 420px at 92% 0%, rgba(12, 148, 255, 0.18), transparent 62%),
        linear-gradient(180deg, #0c1220 0%, #070c15 100%);
}

.home-shell {
    width: min(1680px, 100% - 64px);
    margin: 0 auto;
}

.top-nav {
    background: rgba(10, 14, 22, 0.28);
    border-bottom: 1px solid rgba(48, 72, 105, 0.58);
    backdrop-filter: blur(6px);
}

.top-nav-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.home-logo {
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    max-height: 42px;
}

.home-logo-image {
    height: 36px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 16px rgba(35, 149, 255, 0.18));
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.top-nav-links a {
    text-decoration: none;
    color: #d9e7ff;
    font-weight: 700;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
}

.top-nav-links a:hover {
    border-color: rgba(47, 147, 255, 0.6);
}

.top-nav-links .arrow {
    font-size: 0.7rem;
    margin-left: 6px;
    color: #8ba3c6;
}

.sub-nav {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #182337, #121b2b);
    min-height: 60px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sub-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-nav-links a {
    text-decoration: none;
    color: #d5e4ff;
    border: 1px solid transparent;
    border-radius: 9px;
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.sub-nav-links a:hover {
    border-color: #36557c;
    background: rgba(32, 48, 73, 0.7);
}

.sub-nav-links a.active {
    border-color: var(--line-bright);
    background: rgba(30, 75, 131, 0.5);
}

.sub-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-search-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 40px;
    min-width: 310px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid #34547b;
    background: #0c1423;
}

.sub-search-icon {
    width: 14px;
    height: 14px;
    border: 2px solid #86a4cb;
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
}

.sub-search-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    border-radius: 1px;
    right: -6px;
    bottom: -1px;
    transform: rotate(45deg);
    background: #86a4cb;
}

.sub-search {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    min-height: 38px;
    outline: none;
}

.community-btn {
    text-decoration: none;
    color: #dce9ff;
    font-weight: 700;
    border: 1px solid #385a84;
    background: #101d30;
    border-radius: 9px;
    min-height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
}

.community-btn:hover {
    border-color: #4a77ac;
}

.home-content {
    margin-top: 16px;
    padding-bottom: 40px;
}

.hero-carousel {
    position: relative;
    border: 1px solid #2a4469;
    border-radius: 12px;
    overflow: hidden;
    background: #0e1625;
}

.slide-track {
    min-height: 392px;
    transition: background 0.28s ease;
}

.slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    min-height: 392px;
}

.slide.active {
    display: grid;
}

.slide-copy {
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.slide-tag {
    width: fit-content;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    padding: 5px 10px;
}

.slide-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    line-height: 1.05;
}

.slide-copy p {
    margin: 0;
    color: #d5e4ff;
    max-width: 54ch;
    line-height: 1.45;
}

.slide-cta {
    margin-top: 4px;
    text-decoration: none;
    min-height: 44px;
    width: fit-content;
    padding: 0 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
}

.slide-art {
    position: relative;
    display: grid;
    place-items: center;
    padding: 24px;
}

.art-frame {
    width: min(460px, 92%);
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    border: 1px solid rgba(91, 149, 220, 0.35);
    background:
        linear-gradient(140deg, rgba(157, 73, 255, 0.35), rgba(44, 100, 255, 0.2)),
        linear-gradient(180deg, rgba(14, 30, 54, 0.88), rgba(8, 17, 32, 0.96));
    box-shadow: inset 0 0 36px rgba(36, 111, 214, 0.35), 0 0 40px rgba(35, 149, 255, 0.2);
}

.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(10, 18, 31, 0.74);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

.slide-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#slide-prev {
    left: 10px;
}

#slide-next {
    right: 10px;
}

.carousel-controls {
    margin-top: 8px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.pause-btn {
    width: 34px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #355782;
    background: rgba(19, 31, 49, 0.9);
    color: #dce8ff;
    font-weight: 800;
    cursor: pointer;
}

.pause-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.slide-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    border: none;
    background: #334c6a;
    cursor: pointer;
}

.dot.active {
    background: #1f8fff;
    box-shadow: 0 0 12px rgba(31, 143, 255, 0.6);
}

.news-wrap {
    margin-top: 20px;
}

.news-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.news-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 2.2vw, 2.2rem);
}

.api-state {
    color: #c7d6ed;
    font-weight: 700;
}

.api-state strong.ok {
    color: var(--ok);
}

.api-state strong.err {
    color: var(--err);
}

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

.news-card {
    text-decoration: none;
    color: var(--text);
    border: 1px solid #2b4365;
    border-radius: 14px;
    background: linear-gradient(180deg, #18263b, #121d2d);
    min-height: 220px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.news-card:hover {
    border-color: #3f71ad;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(11, 22, 37, 0.32);
}

.news-card-top {
    display: flex;
    justify-content: flex-start;
}

.news-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    padding: 4px 8px;
    background: #1d69c4;
}

.news-card h3 {
    margin: 0;
    font-size: 1.24rem;
    line-height: 1.2;
}

.news-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

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

.status-card {
    border: 1px solid #2a4366;
    border-radius: 14px;
    background: linear-gradient(180deg, #18263b, #111b2b);
    min-height: 160px;
    padding: 16px;
}

.status-card h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.status-line {
    margin: 0 0 8px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.status-line span {
    color: var(--muted);
}

.status-line strong {
    color: #e9f2ff;
    font-weight: 700;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #3b5375;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    font-weight: 800;
    text-transform: uppercase;
    color: #d9e8ff;
    background: rgba(20, 31, 49, 0.8);
}

.pill.ok {
    border-color: #2d9f76;
    color: var(--ok);
    background: rgba(16, 58, 44, 0.45);
}

.pill.err {
    border-color: #b24b68;
    color: var(--err);
    background: rgba(70, 25, 41, 0.45);
}

.pill.pending {
    border-color: #647e9f;
    color: #d2e3ff;
}

.status-table-wrap {
    margin-top: 20px;
    border: 1px solid #2a4467;
    border-radius: 14px;
    background: linear-gradient(180deg, #162336, #111b2a);
    padding: 16px;
}

.mini-btn {
    min-height: 34px;
    border-radius: 8px;
    padding: 0 12px;
    border: 1px solid #3969a3;
    background: linear-gradient(180deg, #1f5fa7, #194b82);
    color: #eff5ff;
    font-weight: 700;
    cursor: pointer;
}

.mini-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-table-scroller {
    margin-top: 8px;
    overflow-x: auto;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.status-table th,
.status-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #263d5e;
}

.status-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9db4d7;
}

.status-table td {
    color: #e7f0ff;
    font-size: 0.95rem;
}

.status-table td.mono {
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
    font-size: 0.76rem;
    color: #a9bddc;
}

.status-table .empty {
    text-align: center;
    color: var(--muted);
    padding: 26px 12px;
}

.release-info {
    margin-top: 6px;
    border: 1px solid #2b4466;
    border-radius: 8px;
    min-height: 40px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    color: #c1d4ef;
    background: #111b2b;
}

.release-info.ok {
    border-color: #2f9f77;
    color: var(--ok);
}

/* Login / register pages */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(780px 380px at 5% -10%, rgba(18, 114, 255, 0.22), transparent 54%),
        radial-gradient(740px 360px at 96% 0%, rgba(15, 99, 193, 0.2), transparent 58%),
        linear-gradient(180deg, #0b111c, #080c14);
}

.shell {
    width: min(900px, 100% - 30px);
    margin: 48px auto 0;
}

.nav {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    color: #d9e8ff;
    border: 1px solid #2a4669;
    border-radius: 8px;
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.nav a.active {
    border-color: #348fff;
    box-shadow: 0 0 0 1px rgba(37, 127, 255, 0.4) inset;
}

.card {
    border: 1px solid #2a405f;
    background: linear-gradient(180deg, #131e2f, #101925);
    border-radius: 10px;
    padding: 22px;
}

.card h1 {
    margin: 0 0 14px;
    font-size: 2rem;
}

.grid {
    display: grid;
    gap: 14px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #bfd3f2;
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #355073;
    background: #0b1321;
    color: white;
}

button {
    border: none;
    border-radius: 8px;
    min-height: 40px;
    padding: 0 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1d8bff, #0f66cf);
    cursor: pointer;
}

button.secondary {
    background: linear-gradient(135deg, #1583c3, #1d5dc7);
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status {
    margin-top: 14px;
    border: 1px solid #2b4669;
    border-radius: 8px;
    min-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
}

.status.ok {
    border-color: #2c9a71;
    color: var(--ok);
}

.status.err {
    border-color: #b94f6c;
    color: var(--err);
}

@media (max-width: 1280px) {
    .home-shell {
        width: min(1680px, 100% - 28px);
    }

    .sub-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sub-nav-actions {
        justify-content: flex-start;
    }

    .sub-search-wrap {
        min-width: 0;
        width: 100%;
    }

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

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

@media (max-width: 860px) {
    .top-nav-inner {
        min-height: 56px;
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav-links {
        width: 100%;
        gap: 12px;
    }

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

    .slide-copy {
        padding: 24px;
    }

    .slide-art {
        min-height: 220px;
        padding-top: 0;
    }
}

@media (max-width: 680px) {
    .home-shell {
        width: min(1680px, 100% - 16px);
    }

    .sub-nav-links,
    .sub-nav-links a,
    .community-btn {
        width: 100%;
    }

    .sub-nav-links a,
    .community-btn {
        justify-content: center;
    }

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

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

    .slide-track,
    .slide,
    .hero-carousel {
        min-height: 340px;
    }

    .slide-arrow {
        width: 38px;
        height: 38px;
    }

    .shell {
        width: min(900px, 100% - 16px);
        margin-top: 18px;
    }

    .nav a {
        width: 100%;
        justify-content: center;
    }
}
