:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #f8fafc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 34rem),
        #020617;
    color: #f8fafc;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.min-h-screen {
    min-height: 100vh;
}

.site-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(2, 6, 23, 0.92);
}

.nav-inner,
.page-shell {
    width: min(100% - 2rem, 64rem);
    margin: 0 auto;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 800;
}

.page-shell {
    padding: 3rem 0;
}

.narrow-shell,
.auth-shell {
    width: min(100% - 2rem, 42rem);
}

.hero {
    width: min(100%, 48rem);
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: #67e8f9;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.4rem, 8vw, 4rem);
    line-height: 1;
}

h2 {
    margin-bottom: 0.25rem;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.2;
}

.muted,
.meta,
.subtle,
.status-text {
    color: #cbd5e1;
}

.muted {
    font-size: 1.125rem;
    line-height: 1.7;
}

.meta,
.subtle,
.status-text {
    display: block;
    font-size: 0.9rem;
}

.subtle {
    color: #94a3b8;
}

.panel,
.list-panel,
.selected-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
}

.panel {
    border-radius: 1.5rem;
    padding: 1.5rem;
}

.search-panel {
    width: min(100%, 48rem);
    margin: 2.5rem auto 0;
}

.search-panel label,
.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 700;
}

.text-input,
.auth-form input[type="password"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    outline: none;
    background: #0f172a;
    color: #fff;
    padding: 1rem 1.1rem;
    font-size: 1.05rem;
}

.text-input:focus,
.auth-form input[type="password"]:focus {
    border-color: #67e8f9;
    box-shadow: 0 0 0 0.25rem rgba(103, 232, 249, 0.22);
}

.alert,
.success-message {
    margin-top: 1rem;
    border-radius: 1rem;
    padding: 1rem;
}

.alert {
    border: 1px solid rgba(252, 211, 77, 0.35);
    background: rgba(252, 211, 77, 0.1);
    color: #fef3c7;
}

.success-message {
    border: 1px solid rgba(110, 231, 183, 0.35);
    background: rgba(110, 231, 183, 0.1);
    color: #d1fae5;
}

.status-text {
    margin-top: 1rem;
}

.result-list,
.list-panel {
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 1rem;
}

.result-list {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
}

.result-button,
.admin-row,
.selected-game,
.page-heading,
.tab-row,
.pill-row {
    display: flex;
    gap: 1rem;
}

.result-button,
.admin-row {
    width: 100%;
    align-items: center;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: inherit;
    padding: 1rem;
    text-align: left;
}

.result-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.game-thumb,
.selected-thumb {
    flex: 0 0 auto;
    border-radius: 0.8rem;
    object-fit: cover;
}

.game-thumb {
    width: 7rem;
    height: 5rem;
}

.selected-thumb {
    width: 9rem;
    height: 6rem;
}

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.75rem;
}

.game-copy {
    min-width: 0;
    flex: 1;
}

.game-title,
.game-copy h2 {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-panel {
    margin-top: 1.5rem;
    border-color: rgba(103, 232, 249, 0.3);
    border-radius: 1.5rem;
    background: rgba(103, 232, 249, 0.1);
    padding: 1.25rem;
}

.selected-game {
    align-items: center;
}

.primary-button,
.success-button,
.danger-button,
.ghost-button,
.tab-button,
.auth-form button {
    border-radius: 0.8rem;
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.primary-button,
.auth-form button {
    margin-top: 1.25rem;
    background: #67e8f9;
    color: #020617;
}

.success-button {
    border-color: rgba(110, 231, 183, 0.35);
    background: rgba(110, 231, 183, 0.13);
    color: #d1fae5;
}

.danger-button {
    border-color: rgba(252, 165, 165, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.ghost-button,
.tab-button {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.tab-button.active {
    border-color: #67e8f9;
    background: #67e8f9;
    color: #020617;
}

.tab-button.danger.active {
    border-color: #fca5a5;
    background: #fca5a5;
    color: #450a0a;
}

.page-heading {
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    font-size: clamp(2rem, 6vw, 3rem);
}

.tab-row {
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-tabs {
    align-items: center;
    justify-content: space-between;
}

.primary-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.list-panel {
    margin-top: 0;
}

.count-badge {
    display: flex;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: #67e8f9;
    color: #020617;
    font-size: 1.2rem;
    font-weight: 900;
}

.row-actions {
    flex: 0 0 auto;
}

.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.pill-row {
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.pill {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.pill.success {
    background: rgba(52, 211, 153, 0.12);
    color: #a7f3d0;
}

.pill.info {
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
}

.pill.subtle-pill {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.pill.danger {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

.empty-state {
    color: #cbd5e1;
}

.error-panel {
    border-color: rgba(252, 165, 165, 0.35);
    background: rgba(239, 68, 68, 0.1);
    color: #fee2e2;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2rem 0;
}

.auth-panel {
    width: 100%;
}

.auth-form {
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .page-heading,
    .admin-row,
    .result-button,
    .selected-game {
        align-items: stretch;
        flex-direction: column;
    }

    .game-thumb,
    .selected-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .row-actions,
    .row-actions button {
        width: 100%;
    }

    .admin-tabs,
    .primary-tabs {
        align-items: stretch;
        flex-direction: column;
    }
}
