/* Global dark gamer theme */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.theme-dark {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1d1b3a 0, #05040a 45%, #000000 100%);
    color: #f5f5ff;
    min-height: 100vh;
}

a {
    color: #7df9ff;
    text-decoration: none;
}

a:hover {
    text-shadow: 0 0 6px rgba(125, 249, 255, 0.8);
}

/* HUD style header */
.hud-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, rgba(12, 11, 30, 0.95), rgba(40, 6, 70, 0.95));
    border-bottom: 1px solid rgba(122, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hud-title {
    font-family: "Orbitron", system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e0d7ff;
    text-shadow: 0 0 10px rgba(187, 134, 252, 0.9);
}

.hud-subtitle {
    font-size: 0.85rem;
    color: #a0a0ff;
    opacity: 0.8;
}

.hud-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hud-nav a,
.hud-nav button {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 249, 255, 0.6);
    background: rgba(8, 20, 40, 0.6);
    color: #e0f9ff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.hud-nav a:hover,
.hud-nav button:hover {
    background: rgba(0, 255, 255, 0.18);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.45);
    transform: translateY(-1px);
}

.auth-container,
.page-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem 3rem;
}

.panel {
    border-radius: 18px;
    padding: 1.8rem;
}

.panel-glass {
    background: radial-gradient(circle at top left, rgba(125, 249, 255, 0.08), rgba(0, 0, 0, 0.9));
    border: 1px solid rgba(125, 249, 255, 0.35);
    box-shadow:
        0 0 22px rgba(125, 249, 255, 0.22),
        0 0 40px rgba(187, 134, 252, 0.12);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

input,
select {
    background: rgba(5, 10, 25, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(125, 249, 255, 0.4);
    padding: 0.5rem 0.7rem;
    color: #f8f8ff;
}

input:focus,
select:focus {
    outline: none;
    border-color: #bb86fc;
    box-shadow: 0 0 0 1px rgba(187, 134, 252, 0.7);
}

.btn {
    border-radius: 999px;
    border: none;
    padding: 0.6rem 1.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, #bb86fc, #7df9ff);
    color: #05030a;
    box-shadow: 0 0 14px rgba(125, 249, 255, 0.6);
}

.btn-primary:hover {
    filter: brightness(1.07);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(125, 249, 255, 0.5);
    color: #e0f2ff;
}

.btn-ghost:hover {
    background: rgba(125, 249, 255, 0.15);
}

.alert {
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.85rem;
}

.alert-error {
    background: rgba(255, 82, 82, 0.08);
    border: 1px solid rgba(255, 82, 82, 0.7);
    color: #ffb3b3;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.table th,
.table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
}

.table thead {
    background: linear-gradient(90deg, rgba(24, 18, 55, 0.9), rgba(34, 16, 65, 0.9));
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.75rem;
}

.table tbody tr:nth-child(odd) {
    background: rgba(13, 17, 35, 0.85);
}

.table tbody tr:nth-child(even) {
    background: rgba(9, 10, 25, 0.85);
}

.table tbody tr:hover {
    outline: 1px solid rgba(125, 249, 255, 0.4);
}

/* Match status badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.badge-waiting {
    background: rgba(120, 120, 120, 0.15);
    border: 1px solid rgba(190, 190, 190, 0.7);
    box-shadow: 0 0 6px rgba(180, 180, 180, 0.4);
}

.badge-warmup {
    background: rgba(0, 255, 255, 0.12);
    border: 1px solid rgba(0, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

.badge-in-game {
    background: rgba(187, 134, 252, 0.15);
    border: 1px solid rgba(187, 134, 252, 0.9);
    box-shadow: 0 0 8px rgba(187, 134, 252, 0.7);
}

.badge-finished {
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.9);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.85);
}

.badge-pending {
    background: rgba(255, 140, 0, 0.16);
    border: 1px solid rgba(255, 165, 0, 0.9);
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.7);
}

/* Versus match layout (2-column) */
.match-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 1.2rem;
    margin-top: 1rem;
}

.match-versus {
    border-radius: 16px;
    padding: 1.2rem;
    background: radial-gradient(circle at top, rgba(9, 9, 26, 0.95), rgba(0, 0, 0, 0.96));
    border: 1px solid rgba(125, 249, 255, 0.45);
}

.match-versus-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-players-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 0.5rem;
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.player-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(125, 249, 255, 0.7);
    background: radial-gradient(circle at 30% 20%, #7df9ff, #1b1039);
    box-shadow: 0 0 14px rgba(125, 249, 255, 0.8);
}

.player-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.versus-text {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #bb86fc;
}

.score-input-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

.score-input {
    width: 60px;
    text-align: center;
    font-size: 1.1rem;
}

.match-server-info {
    border-radius: 16px;
    padding: 1rem;
    background: radial-gradient(circle at top, rgba(14, 22, 40, 0.95), rgba(0, 0, 0, 0.98));
    border: 1px solid rgba(187, 134, 252, 0.6);
}

.match-server-info dl {
    margin: 0;
}

.match-server-info dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
}

.match-server-info dd {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

/* GM quick-filter buttons */
.gm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
}

.gm-filter-bar .btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
}

/* Banned user row */
.table tbody tr.row-banned {
    opacity: 0.6;
    background: rgba(80, 20, 20, 0.4) !important;
}

/* Responsive */
@media (max-width: 800px) {
    .match-layout {
        grid-template-columns: 1fr;
    }

    .hud-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .hud-nav {
        margin-top: 0.4rem;
        flex-wrap: wrap;
    }
}

