:root {
    color-scheme: dark;
    --bg: #0c0f14;
    --panel: #151a22;
    --panel-soft: #1b222d;
    --border: #273140;
    --text: #f2f5f8;
    --muted: #93a1b2;
    --accent: #56b6ff;
    --danger: #ff647c;
    --success: #57d68d;
    --warning: #ffd166;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #090c11;
    border-right: 1px solid var(--border);
    padding: 20px;
    flex-shrink: 0;
}

.brand {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 28px;
}

.brand-kev {
    color: white;
}

.brand-flix {
    color: var(--accent);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted);
}

.nav a:hover {
    background: var(--panel);
    color: var(--text);
}

.main {
    flex: 1;
    min-width: 0;
}

.topbar {
    height: 68px;
    border-bottom: 1px solid var(--border);
    background: rgba(12, 15, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
}

.menu-button {
    display: none;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
}

.user-box a {
    color: var(--accent);
}

.content {
    padding: 24px;
}

.hero-card,
.info-card,
.service-card,
.status-card {
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
}

.hero-card {
    margin-bottom: 20px;
}

.hero-card h1,
.info-card h2,
.section-header h2 {
    margin: 0 0 8px;
}

.hero-card p,
.info-card p,
.service-card p {
    color: var(--muted);
    margin: 0;
}

.info-card {
    margin-bottom: 20px;
}

.server-box {
    margin-top: 12px;
    padding: 14px;
    background: #090c11;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow-x: auto;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.status-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-card small {
    color: var(--muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.unknown {
    background: var(--warning);
}

.section-header {
    margin: 28px 0 12px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.service-card {
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.service-card h3 {
    margin: 0 0 8px;
}

.service-card span {
    display: inline-block;
    margin-top: 18px;
    color: var(--accent);
    font-size: 0.9rem;
}

.disabled {
    opacity: 0.65;
}

.poster-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.poster-card {
    min-width: 150px;
    height: 220px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    overflow: hidden;
}

.poster-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: linear-gradient(145deg, #1d2633, #10151d);
}

.muted {
    color: var(--muted);
}

.flash-stack {
    margin-bottom: 16px;
    display: grid;
    gap: 10px;
}

.flash {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
}

.flash-success {
    border-color: var(--success);
}

.flash-danger {
    border-color: var(--danger);
}

.flash-warning {
    border-color: var(--warning);
}

.flash-info {
    border-color: var(--accent);
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
}

.login-brand {
    margin-bottom: 8px;
}

form {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

label {
    color: var(--muted);
}

input {
    width: 100%;
    background: #090c11;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

button {
    background: var(--accent);
    color: #00111f;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: 68px;
        left: 0;
        bottom: 0;
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 15;
        padding: 20px;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 10;
    }

    .sidebar-overlay.sidebar-overlay-open {
        display: block;
    }

    .topbar {
        z-index: 30;
    }

    .menu-button {
        display: block;
    }



    .content {
        padding: 16px;
    }

    .status-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .user-box span {
        display: none;
    }
}

.centered-brand {
    text-align: center;
}

.header-brand {
    margin-bottom: 0;
    font-size: 1.5rem;
}



.poster-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: thin;
}

.poster-card {
    width: 165px;
    min-width: 165px;
    height: 285px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.poster-image {
    width: 100%;
    height: 235px;
    background: #111722;
    overflow: hidden;
}

.poster-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Extra useful for odd Jellyfin images */
.poster-image img.contain {
    object-fit: contain;
    background: #05070a;
}

.poster-meta {
    height: 50px;
    padding: 6px 9px;
    background: rgba(9, 12, 17, 0.85);
}

.poster-title,
.poster-subtitle {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poster-title {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.25;
}

.poster-subtitle {
    margin-top: 3px;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.2;
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 12px;
    color: var(--muted);
    background: linear-gradient(145deg, #1d2633, #10151d);
}

@media (max-width: 600px) {
    .poster-card {
        width: 135px;
        min-width: 135px;
        height: 245px;
    }

    .poster-image {
        height: 195px;
    }

    .poster-title {
        font-size: 0.82rem;
    }

    .poster-subtitle {
        font-size: 0.74rem;
    }
}

.admin-actions {
    margin-top: 14px;
}

.button-link {
    display: inline-block;
    background: var(--accent);
    color: #00111f;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
}

.setup-title {
    margin: 0 0 8px;
    text-align: center;
}

.setup-copy {
    text-align: center;
    margin-bottom: 20px;
}

.pill {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: #252d3a;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.pill-admin {
    background: rgba(86, 182, 255, 0.16);
    color: var(--accent);
}

.pill-good {
    background: rgba(87, 214, 141, 0.16);
    color: var(--success);
}

.pill-bad {
    background: rgba(255, 100, 124, 0.16);
    color: var(--danger);
}

.request-search {
    display: grid;
    gap: 12px;
}

.media-toggle {
    display: flex;
    gap: 10px;
}

.media-type {
    background: var(--panel-soft);
    color: var(--muted);
    border: 1px solid var(--border);
}

.media-type.active {
    background: var(--accent);
    color: #00111f;
}

.poster-meta-request {
    height: 88px;
}

.poster-meta-request .mini-button {
    margin-top: 6px;
}

.mini-button {
    width: 100%;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 0.78rem;
}

.mini-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.service-health-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}

.health-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #252d3a;
    color: var(--muted);
}

.health-pill.online {
    background: rgba(87, 214, 141, 0.16);
    color: var(--success);
}

.health-pill.offline {
    background: rgba(255, 100, 124, 0.16);
    color: var(--danger);
}

button:disabled,
.media-type:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.poster-card.status-available {
    border-color: #57d68d;
    box-shadow: 0 0 18px rgba(87, 214, 141, 0.35);
}

.poster-card.status-downloading {
    border-color: #b56cff;
    box-shadow: 0 0 18px rgba(181, 108, 255, 0.35);
}

.poster-card.status-upcoming {
    border-color: #4de3ff;
    box-shadow: 0 0 18px rgba(77, 227, 255, 0.28);
}

.poster-card.status-requested {
    border-color: #ffb347;
    box-shadow: 0 0 18px rgba(255, 179, 71, 0.28);
}

.poster-card.status-success {
    border-color: #57d68d;
    box-shadow: 0 0 18px rgba(87, 214, 141, 0.38);
}

.poster-card.status-error {
    border-color: #ff647c;
    box-shadow: 0 0 18px rgba(255, 100, 124, 0.38);
}

.status-label {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-label.available {
    color: #57d68d;
}

.status-label.downloading {
    color: #b56cff;
}
.status-label.upcoming { color: #4de3ff; }
.status-label.requested { color: #ffb347; }
.status-label.success { color: #57d68d; }
.status-label.error { color: #ff647c; }


.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-3px);
}

.poster-card.is-working {
    opacity: 0.75;
}

.legend-card {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0 22px;
    color: var(--muted);
    font-size: 0.82rem;
}

.legend-card span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.legend-dot.available { background: #57d68d; }
.legend-dot.downloading { background: #b56cff; }
.legend-dot.upcoming { background: #4de3ff; }
.legend-dot.requested { background: #ffb347; }
.legend-dot.error { background: #ff647c; }

.sidebar-overlay {
    display: none;
}

.request-pill {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #252d3a;
    color: var(--muted);
}

.request-pill.available {
    background: rgba(87, 214, 141, 0.16);
    color: #57d68d;
}

.request-pill.downloading,
.request-pill.requested {
    background: rgba(181, 108, 255, 0.16);
    color: #b56cff;
}

.request-pill.upcoming {
    background: rgba(77, 227, 255, 0.16);
    color: #4de3ff;
}

.request-pill.error {
    background: rgba(255, 100, 124, 0.16);
    color: #ff647c;
}

.diag-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.diag-list div {
    display: grid;
    gap: 6px;
    padding: 12px;
    background: #090c11;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.diag-list span {
    color: var(--muted);
    font-size: 0.85rem;
}

.diag-list code {
    overflow-x: auto;
    white-space: nowrap;
}

.diag-good {
    color: var(--success);
}

.diag-bad {
    color: var(--danger);
}

input,
textarea,
select {
    font-size: 16px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.2rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(25, 32, 44, 0.95), rgba(10, 14, 22, 0.95));
    border: 1px solid rgba(80, 170, 255, 0.18);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(80, 170, 255, 0.65);
    box-shadow: 0 14px 38px rgba(0, 140, 255, 0.18);
}

.primary-feature {
    background: linear-gradient(145deg, rgba(0, 103, 190, 0.55), rgba(8, 14, 28, 0.95));
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: rgba(80, 170, 255, 0.14);
    color: #6ec6ff;
    flex-shrink: 0;
}

.feature-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.feature-card p {
    margin: 0;
    color: var(--muted, #aab4c0);
}

.feature-card small {
    display: block;
    margin-top: 0.45rem;
    color: #6ec6ff;
}

.disabled-feature {
    opacity: 0.65;
}

@media (max-width: 800px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.status-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.status-card-link:hover {
    transform: translateY(-2px);
}

.feature-card {
    text-decoration: none;
    color: inherit;
}

.feature-card * {
    text-decoration: none;
}

.feature-card,
.feature-card:link,
.feature-card:visited,
.feature-card:hover,
.feature-card:active {
    text-decoration: none;
    color: inherit;
}

input,
textarea,
select {
    font-size: 16px;
    background: #090c11;
    color: var(--text);
    border: 1px solid var(--border);
    color-scheme: dark;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

button,
.button-link {
    font-size: 16px;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0;
}

.alphabet-filter button {
    background: var(--panel-soft);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 0.85rem;
}

.alphabet-filter button.active {
    background: var(--accent);
    color: #00111f;
}

.game-list-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 8px;
}

.game-list-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-list-panel li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.game-list-panel li:last-child {
    border-bottom: none;
}

.game-list-panel li:hover {
    background: var(--panel-soft);
}

.game-title {
    color: var(--text);
}

.game-region {
    color: var(--muted);
    font-size: 0.85rem;
}

.gameboy-player-page {
    min-height: calc(100vh - 120px);
}

.gameboy-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.gameboy-topbar > div {
    text-align: right;
}

.gameboy-topbar strong,
.gameboy-topbar span {
    display: block;
}

#emulator-wrapper,
#emulator-border,
.mobile-controls,
.portrait-controls,
.landscape-controls,
.dpad-wrapper,
.ab-wrapper,
.dpad-zone,
.ab-zone {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

#emulator-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#emulator-border {
    border: 3px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    width: min(960px, 90vw);
    aspect-ratio: 10 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 22px rgba(86, 182, 255, 0.22);
}
@media (min-width: 1025px) {
    .gameboy-player-page {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #emulator-wrapper {
        width: 100%;
    }

    #emulator-border {
        width: min(680px, 72vw);
        max-height: calc(100vh - 190px);
    }
}
#emulator {
    background: #000;
    width: 100%;
    height: 100%;
}

#start-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 9;
    cursor: pointer;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#rom-loading {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111;
    border: 2px solid var(--accent);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    z-index: 999;
    text-align: center;
    box-shadow: 0 0 14px rgba(86, 182, 255, 0.4);
    display: none;
}

#rom-loading-text {
    font-size: 1rem;
    margin-bottom: 8px;
}

.progress-bar {
    width: 240px;
    height: 12px;
    background: #333;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
}

.mobile-controls {
    display: none;
}

.dpad-wrapper,
.ab-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
}

.dpad-wrapper img,
.ab-wrapper img,
.mobile-controls img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.dpad-zone,
.ab-zone {
    position: absolute;
    background-color: rgba(255, 0, 0, 0);
    touch-action: none;
}

.dpad-zone.up { top: 0; left: 35%; width: 30%; height: 33%; }
.dpad-zone.down { bottom: 0; left: 35%; width: 30%; height: 33%; }
.dpad-zone.left { top: 35%; left: 0; width: 33%; height: 30%; }
.dpad-zone.right { top: 35%; right: 0; width: 33%; height: 30%; }

.ab-zone.a {
    right: 12%;
    top: 9%;
    width: 30%;
    height: 32%;
}

.ab-zone.b {
    left: 13%;
    top: 57%;
    width: 30%;
    height: 32%;
}

#fullscreen-toggle {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: url('/games/imgs/fullscreen.svg') center/contain no-repeat;
    background-color: rgba(0,0,0,0.4);
    border-radius: 4px;
    z-index: 20;
    opacity: 0.55;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

#fullscreen-toggle:hover {
    opacity: 1;
}

:fullscreen #emulator-wrapper {
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

:fullscreen #emulator-border {
    height: 100vh;
    width: auto;
    max-width: 100vw;
    border-radius: 0;
}

@media only screen and (max-width: 1024px) and (orientation: portrait) {
    #emulator-border {
        width: 100vw;
        border-radius: 0;
    }

    .mobile-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 90vw;
        padding: 10px;
    }

    .portrait-left,
    .portrait-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .portrait-left img[alt="DPad"],
    .portrait-right img[alt="A and B"] {
        width: 140px;
    }

    .portrait-left img[alt="Select"],
    .portrait-right img[alt="Start"] {
        width: 80px;
        margin-top: 14px;
    }

    .portrait-controls {
        display: flex;
    }

    .landscape-controls {
        display: none;
    }

    .gameboy-topbar {
        align-items: flex-start;
    }
}

@media only screen and (max-width: 1024px) and (orientation: landscape) {
    .gameboy-topbar {
        display: none;
    }

    #emulator-wrapper {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    #emulator-border {
        height: 95vh;
        width: auto;
        border-radius: 0;
    }

    .mobile-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 90vh;
        width: 100vw;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        padding: 0;
        margin: 0;
    }

    .mobile-controls img,
    .dpad-zone,
    .ab-zone {
        pointer-events: auto;
    }

    .landscape-left,
    .landscape-right {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 20px;
        pointer-events: auto;
    }

    .landscape-left {
        left: 0;
        align-items: center;
    }

    .landscape-right {
        right: 0;
        align-items: center;
    }

    .landscape-left img,
    .landscape-right img {
        width: 140px;
    }

    #select-button-landscape,
    #start-button-landscape {
        width: 80px;
        margin-top: 10px;
    }

    .portrait-controls {
        display: none;
    }

    .landscape-controls {
        display: flex;
    }
}

@media (max-width: 767px) {
    #fullscreen-toggle {
        display: none;
    }
}

@media (max-width: 600px) {
    .gameboy-topbar {
        gap: 10px;
    }

    .gameboy-topbar .button-link {
        padding: 8px 10px;
        font-size: 0;
    }

    .gameboy-topbar .button-link::after {
        content: "Back";
        font-size: 14px;
    }

    .gameboy-topbar > div {
        min-width: 0;
    }

    #rom-title,
    #rom-subtitle {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 58vw;
    }
}

#save-icon {
    position: absolute;
    top: 8px;
    right: 44px;
    width: 28px;
    height: 28px;
    background: url('/games/imgs/save.svg') center/contain no-repeat;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    z-index: 20;
    opacity: 0.65;
    transition: background 0.2s ease, opacity 0.2s, transform 0.2s ease;
    cursor: pointer;
}

#save-icon:hover {
    opacity: 1;
}

#save-icon.save-ok {
    background-image: url('/games/imgs/check.svg');
    transform: scale(1.12);
}

#save-icon.save-fail {
    background-image: url('/games/imgs/fail.svg');
    transform: scale(1.12);
}

.first-section-header {
    margin-top: 0;
}

.compact-info-card {
    min-width: 260px;
    padding: 16px;
}

.nav-subgroup {
    display: grid;
    gap: 4px;
    margin: -2px 0 8px 10px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.nav-subgroup a {
    font-size: 0.9rem;
    padding: 8px 10px;
}

.brand-link {
    text-decoration: none;
    color: inherit;
}

.brand-link:hover .brand-flix {
    filter: brightness(1.2);
}

.collapsible-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 14px;
}

.collapsible-header {
    width: 100%;
    background: transparent;
    color: var(--text);
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
    font-weight: 800;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.collapsible-chevron {
    color: var(--muted);
    transition: transform 0.18s ease;
}

.collapsible-body {
    padding: 0 20px 20px;
}

.collapsible-card.collapsed .collapsible-body {
    display: none;
}

.collapsible-card.collapsed .collapsible-chevron {
    transform: rotate(-90deg);
}

.compact-server-box {
    display: inline-block;
    min-width: 120px;
}

.misc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.utility-card {
    max-width: 760px;
}

.utility-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    cursor: pointer;
}

.toggle-row input {
    width: auto;
}

.warning-copy {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 209, 102, 0.35);
    background: rgba(255, 209, 102, 0.08);
    color: var(--warning);
    border-radius: 12px;
    font-size: 0.9rem;
}

.legal-copy {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.82rem;
}

.download-ready-box {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(87, 214, 141, 0.35);
    background: rgba(87, 214, 141, 0.08);
    border-radius: 14px;
}

.download-ready-box p {
    margin: 0 0 12px;
    color: var(--success);
}

