:root {
    --bg: #07111f;
    --bg-accent: linear-gradient(160deg, #081426 0%, #0b1f3b 45%, #10294c 100%);
    --panel: rgba(11, 24, 44, 0.88);
    --panel-border: rgba(129, 169, 255, 0.18);
    --text: #e8f0ff;
    --muted: #9db2d4;
    --accent: #4d7cff;
    --accent-dark: #8fb2ff;
    --warning: #f0b35c;
    --danger: #ff8f88;
    --shadow: 0 18px 45px rgba(1, 7, 17, 0.45);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(77, 124, 255, 0.22), transparent 26%),
        radial-gradient(circle at left 20%, rgba(46, 88, 191, 0.18), transparent 24%),
        radial-gradient(circle at bottom center, rgba(111, 168, 255, 0.08), transparent 34%),
        var(--bg-accent);
    min-height: 100vh;
}

a {
    color: var(--accent-dark);
}

code {
    background: rgba(143, 178, 255, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
}

.site-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.site-header h1,
.hero-card h2,
.panel h2 {
    margin: 0;
    font-weight: 600;
}

.season-end-note {
    color: rgba(157, 178, 212, 0.78);
    font-weight: 400;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.timezone-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    flex: 0 0 auto;
}

.menu-dropdown {
    position: relative;
}

.menu-trigger {
    list-style: none;
    appearance: none;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 0.48rem 0.82rem;
    font-size: 0.9rem;
    line-height: 1.1;
    cursor: pointer;
    white-space: nowrap;
}

.menu-trigger::-webkit-details-marker {
    display: none;
}

.menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    min-width: 180px;
    padding: 0.45rem;
    display: grid;
    gap: 0.2rem;
    background: rgba(7, 18, 34, 0.96);
    border: 1px solid var(--panel-border);
    border-radius: 0.95rem;
    box-shadow: var(--shadow);
    z-index: 10;
}

.menu-dropdown:not([open]) .menu-panel {
    display: none;
}

.menu-link {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 0.7rem;
    color: var(--text);
    text-decoration: none;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.timezone-form select {
    width: auto;
    min-width: 124px;
    max-width: 150px;
    padding: 0.35rem 1.8rem 0.35rem 0.55rem;
    border-radius: 999px;
    font-size: 0.83rem;
    line-height: 1.1;
}

.timezone-label {
    color: var(--muted);
    font-size: 0.74rem;
    white-space: nowrap;
}

.nav-link,
.button-link,
button {
    appearance: none;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 0.48rem 0.78rem;
    text-decoration: none;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.1;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link.active,
.button-link.secondary,
button.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: var(--panel-border);
}

.nav-meta,
.meta-text,
.lead,
small {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 0.35rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--accent-dark);
}

.page-content {
    display: grid;
    gap: 1rem;
}

.hero-card,
.panel,
.flash,
.filter-bar {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    border-radius: 1.15rem;
    backdrop-filter: blur(12px);
}

.hero-card,
.panel,
.filter-bar {
    padding: 1.2rem;
}

.stack {
    display: grid;
    gap: 0.9rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.time-format-widget {
    display: grid;
    gap: 0.55rem;
}

.time-format-row {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
}

.time-format-row input,
.time-format-row select {
    width: auto;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    color: var(--text);
}

.checkbox-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0.1rem 0 0;
    flex: 0 0 1rem;
}

.inline-note {
    padding: 0.8rem 0.95rem;
    font-size: 0.92rem;
    color: var(--muted);
}

input,
select {
    width: 100%;
    border-radius: 0.7rem;
    border: 1px solid rgba(129, 169, 255, 0.2);
    padding: 0.75rem 0.9rem;
    font: inherit;
    color: var(--text);
    background: rgba(5, 14, 28, 0.72);
}

input::placeholder {
    color: rgba(157, 178, 212, 0.72);
}

input:focus,
select:focus,
button:focus,
.button-link:focus,
.nav-link:focus {
    outline: 2px solid rgba(143, 178, 255, 0.45);
    outline-offset: 2px;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-actions,
.toolbar,
.actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.table-scroll {
    overflow-x: auto;
    background: rgba(7, 18, 34, 0.78);
    border-radius: 1rem;
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(129, 169, 255, 0.12);
    text-align: left;
    vertical-align: middle;
}

.schedule-table th {
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
}

.mode-cell {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.mode-cell img {
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    padding: 0.15rem;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
}

.chance-expired {
    color: rgba(232, 240, 255, 0.42);
}

.flash {
    padding: 0.9rem 1rem;
}

.flash-success {
    border-color: rgba(77, 124, 255, 0.28);
}

.flash-error {
    border-color: rgba(255, 143, 136, 0.32);
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    background: rgba(8, 19, 37, 0.72);
    border: 1px dashed rgba(129, 169, 255, 0.22);
    border-radius: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.action-card {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 720px) {
    .site-shell {
        padding: 1rem;
    }

    .site-header {
        flex-direction: column;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .timezone-form {
        order: -1;
    }

    .timezone-form select {
        min-width: 0;
        max-width: 100%;
    }

    .menu-panel {
        left: 0;
        right: auto;
    }
}
