@font-face {
    font-family: 'Ubuntu';
    src: url('/static/Ubuntu-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Ubuntu';
    src: url('/static/Ubuntu-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'UbuntuMono';
    src: url('/static/UbuntuMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

:root {
    --bg-main: #f1ede9; /* Warmer Sand / Off-White */
    --bg-surface: #faf8f6; /* Helles Creme */
    --bg-card: rgba(250, 248, 246, 0.95);
    --modal-overlay: rgba(241, 237, 233, 0.9);
    
    /* Terracotta & Sand Palette for Light Mode */
    --accent-primary: #c2410c; 
    --accent-secondary: #ea580c; 
    --accent-glow: rgba(194, 65, 12, 0.12);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --border-light: rgba(194, 65, 12, 0.08);
    --border-medium: rgba(194, 65, 12, 0.15);
    
    --glass-bg: rgba(250, 248, 246, 0.85);
    --glass-border: rgba(194, 65, 12, 0.05);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --accent: var(--accent-primary);
    --highlight: var(--warning);
    --border: var(--border-light);
    
    --bg-glow-1: rgba(194, 65, 12, 0.05);
    --bg-glow-2: rgba(234, 88, 12, 0.03);

    --pill-blue-bg: rgba(14, 165, 233, 0.12);
    --pill-blue-text: #0369a1;
    --pill-success-bg: rgba(22, 163, 74, 0.1);
    --pill-success-text: #16a34a;
    --pill-danger-bg: rgba(220, 38, 38, 0.1);
    --pill-danger-text: #b91c1c;
    --pill-warning-bg: rgba(217, 119, 6, 0.1);
    --pill-warning-text: #d97706;

    --input-bg: white;
    --input-text: var(--text-primary);
    --input-border: var(--border-medium);
}

:root[data-theme="dark"] {
    --bg-main: #020617;
    --bg-surface: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --modal-overlay: rgba(2, 6, 23, 0.85);
    
    /* Indigo Palette for Dark Mode */
    --accent-primary: #6366f1; 
    --accent-secondary: #8b5cf6; 
    --accent-glow: rgba(99, 102, 241, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --bg-glow-1: rgba(99, 102, 241, 0.15);
    --bg-glow-2: rgba(139, 92, 246, 0.1);

    --pill-blue-bg: rgba(59, 130, 246, 0.15);
    --pill-blue-text: #93c5fd;
    --pill-success-bg: rgba(16, 185, 129, 0.15);
    --pill-success-text: #10b981;
    --pill-danger-bg: rgba(239, 68, 68, 0.15);
    --pill-danger-text: #ef4444;
    --pill-warning-bg: rgba(245, 158, 11, 0.15);
    --pill-warning-text: #f59e0b;

    --input-bg: rgba(15, 23, 42, 0.4);
    --input-text: var(--text-primary);
    --input-border: var(--border-medium);
}

.pending-edit {
    color: var(--highlight) !important;
    position: relative;
}
.pending-edit::after {
    content: '*';
    margin-left: 4px;
    font-size: 0.8em;
}
.original-val {
    font-size: 0.75rem;
    opacity: 0.4;
    margin-right: 5px;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background-color: var(--danger);
    border: 2px solid var(--bg-surface);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}


* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg-main); 
    background-image: 
        radial-gradient(at 0% 0%, var(--bg-glow-1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, var(--bg-glow-2) 0px, transparent 50%);
    color: var(--text-primary); 
    font-family: 'Ubuntu', sans-serif; 
    font-size: 17px;
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    margin: 0; padding: 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

h1, h2, h3 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* Global Form Elements */
label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 8px;
    margin-left: 4px;
    letter-spacing: 1px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    box-sizing: border-box;
    font-size: 1rem;
    transition: var(--transition-base);
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.1);
}

.form-hint {
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: 6px;
    line-height: 1.4;
    font-weight: 500;
    margin-left: 4px;
}

.error-message {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.05);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(220, 38, 38, 0.1);
    margin-top: 1.5rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.nav-actions-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-actions-group {
    display: flex;
    gap: 10px;
}

/* Right Nav Icon Buttons */
.nav-actions-right .tab-btn {
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--border-light);
    border: 1px solid var(--border-medium);
}

.nav-actions-right .tab-btn .btn-icon {
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

/* Unified Navigation Style */
.tab-container { 
    position: sticky; top: 0; z-index: 1000; 
    background: var(--glass-bg); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 0; 
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    border-bottom: 1px solid var(--border-light);
}
.tabs-list { 
    display: flex; gap: 4px; 
    background: var(--border-light); 
    padding: 4px; border-radius: 14px;
    border: 1px solid var(--border-light);
    width: fit-content;
}
.tabs-list-scrollable {
    display: flex; gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tabs-list-scrollable::-webkit-scrollbar { display: none; }
.tab-btn {
    position: relative;
    padding: 0 20px; 
    height: 40px;
    border-radius: 10px; 
    border: none; 
    cursor: pointer;
    background: transparent; 
    color: var(--text-secondary);
    font-weight: 600; 
    font-size: 0.875rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}
.tab-btn.active { 
    background: var(--accent-primary); 
    color: white; 
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.tab-btn:hover:not(.active) { 
    background: var(--border-medium); 
    color: var(--text-primary); 
}

/* Unified Grid System */
.timetable-round {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 32px;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    transition: var(--transition-base);
}
.timetable-round:last-child { border-bottom: none; }
.timetable-round.active { 
    background: rgba(99, 102, 241, 0.05); 
    border-left: 4px solid var(--accent-primary); 
    opacity: 1; 
}
.timetable-round.future { opacity: 0.4; filter: grayscale(0.5); }

.round-meta { display: flex; flex-direction: column; gap: 4px; }
.round-number { font-size: 1.25rem; font-weight: 800; color: var(--accent-primary); }


.nav-actions-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tab-btn-admin {
    background: rgba(59, 130, 246, 0.15) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn-user {
    background: var(--border-light) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-medium) !important;
}



.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 40px;
    white-space: nowrap;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-action.success {
    background: #10b981;
    color: #fff;
}

.btn-action.danger {
    background: var(--danger);
    color: #fff;
}

.btn-action.secondary {
    background: var(--border-light);
    color: var(--text-secondary);
    border-color: var(--border-medium);
}

.btn-action.highlight {
    background: var(--highlight);
    color: #000;
}

.btn-status-display {
    cursor: default !important;
}

.btn-status-display:hover {
    transform: none !important;
    box-shadow: none !important;
}

.timer-display {
    font-size: 8rem; 
    font-weight: 900; 
    text-align: center; 
    color: var(--text-primary);
    letter-spacing: -4px;
    line-height: 1;
    margin: 20px 0;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

.header-timer {
    font-size: 3rem !important;
    text-align: right;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
    margin: 0;
    filter: none;
}
.timer-display.finished { 
    color: var(--danger); 
    filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.6)); 
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Table styles */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { 
    text-align: left;
    color: var(--accent-primary);
    font-size: 0.75rem; text-transform: uppercase; 
    letter-spacing: 1px; font-weight: 800;
    padding: 16px; border-bottom: 2px solid var(--border-medium);
    background: var(--bg-surface) !important;
}
td { padding: 16px; border-bottom: 1px solid var(--border-light); }

.rank-badge { 
    width: 32px; height: 32px; border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: 900; font-size: 0.875rem; margin: 0 auto;
    color: var(--text-primary); background: var(--border-light);
    border: 1px solid var(--border-light);
}
.rank-1 { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); color: #451a03; border: none; }
.rank-2 { background: linear-gradient(135deg, #cbd5e1 0%, #64748b 100%); color: #0f172a; border: none; }
.rank-3 { background: linear-gradient(135deg, #fb923c 0%, #9a3412 100%); color: #451a03; border: none; }

.info-pill {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    white-space: nowrap;
    background: var(--bg-main);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    transition: 0.2s;
}

.info-pill.blue {
    background: var(--pill-blue-bg);
    color: var(--pill-blue-text);
    border-color: var(--pill-blue-bg);
}

.info-pill.success {
    background: var(--pill-success-bg);
    color: var(--pill-success-text);
    border-color: var(--pill-success-bg);
}

.info-pill.danger {
    background: var(--pill-danger-bg);
    color: var(--pill-danger-text);
    border-color: var(--pill-danger-bg);
}

.info-pill.highlight {
    background: var(--pill-success-bg);
    color: var(--highlight);
    border-color: var(--pill-success-bg);
}

/* Variant Pill Group */
.variant-pill-group {
    display: inline-flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border-medium);
    border-radius: 20px;
    padding: 2px 4px;
    gap: 0;
    transition: var(--transition-base);
}

.variant-pill-group:hover {
    border-color: var(--accent-primary);
    background: var(--border-light);
}

.variant-pill-group .info-pill {
    background: transparent !important;
    border: none !important;
    padding: 4px 10px;
    height: auto;
}

.variant-pill-group .v-divider {
    width: 1px;
    height: 12px;
    background: var(--border-medium);
    opacity: 0.5;
}

.tournament-header {
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--accent);
    overflow: visible;
    position: relative;
    background: var(--bg-surface);
}

.tournament-header-title {
    font-weight: 800;
    color: var(--accent);
    font-size: 1.6rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.tournament-bg-text {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 5rem;
    opacity: 0.03;
    font-weight: 900;
    pointer-events: none;
    user-select: none;
}

.badge-pill {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-medium);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .tournament-header .info-pill {
        display: none;
    }
}

.btn-action {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 20px;
    height: 33px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.btn-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.food-item-pill {
    font-size: 0.8rem;
    background: var(--bg-main);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    position: relative;
    cursor: pointer;
    transition: var(--transition-base);
}

.food-item-pill:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Tooltip text */
.food-item-pill::after {
    content: "Haushalt: " attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translate(-50%, 4px) scale(0.95);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

/* Tooltip arrow */
.food-item-pill::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translate(-50%, 4px);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(30, 41, 59, 0.95) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Active states for hover/focus */
.food-item-pill:hover::after,
.food-item-pill:hover::before,
.food-item-pill:focus::after,
.food-item-pill:focus::before {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
}

.col-pts { font-weight: 900; text-align: center; width: 60px; color: var(--accent-primary); font-size: 1.1rem; }
.col-rank { width: 60px; }
.col-score { width: 45px; text-align: center; }

@media (max-width: 600px) {
    .col-score { width: 28px !important; padding: 14px 11px !important; }
    .col-pts { width: 28px !important; padding: 16px 11px !important; }
}

/* Buffet Section */
.buffet-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.buffet-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.buffet-header {
    margin-bottom: 20px;
}

.buffet-title-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.buffet-icon {
    font-size: 1.8rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buffet-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.buffet-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

.buffet-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.buffet-field-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.buffet-field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.6;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="text"].buffet-input-field {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 46px !important;
    border-radius: 12px;
    border: 2px solid var(--border-medium);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition-base);
}

input[type="text"].buffet-input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.buffet-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.buffet-save-btn {
    height: 48px;
    padding: 0 24px;
    background: var(--accent-primary);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.buffet-save-btn:disabled {
    background: var(--border-medium);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
    transform: none !important;
    box-shadow: none !important;
}

.buffet-save-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.buffet-save-btn:active {
    transform: translateY(0);
}

.buffet-delete-btn {
    height: 48px;
    padding: 0 16px;
    background: transparent;
    border: 2px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base);
    white-space: nowrap;
}

.buffet-delete-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
}

@media (max-width: 600px) {
    .buffet-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    .buffet-actions {
        width: 100%;
    }
    .buffet-save-btn, .buffet-delete-btn {
        flex: 1;
        justify-content: center;
    }
}

.buffet-summary {
    margin-top: 15px;
    padding: 10px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 8px;
}

.buffet-summary-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Live Ticker */
.ticker-section {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0,0,0,0.05);
}

.ticker-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.ticker-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.9rem;
    scroll-behavior: smooth;
}

html {
    font-size: 20px; /* New Default */
    -webkit-tap-highlight-color: transparent;
}

html[data-font-size="small"] {
    font-size: 16px;
}

html[data-font-size="large"] {
    font-size: 24px;
}

.ticker-entry {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
    border-left: 2px solid rgba(56, 189, 248, 0.3);
    padding-left: 10px;
    margin-bottom: 5px;
}

.ticker-time {
    opacity: 0.4;
    white-space: nowrap;
}

.ticker-empty {
    opacity: 0.4;
    text-align: center;
    padding: 10px;
    font-style: italic;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Heatmap Table Styles (GT Phase 2 and Normal) */
.bg-table tbody tr {
    transition: background-color 0.2s;
}
.bg-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.01);
}
.bg-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Leaderboard Table Styles */
.table-card {
    padding: 0;
}
@media (max-width: 600px) {
    .table-card {
        padding: 0.4rem;
    }
}
.table-container-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}
.table-container-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}
[data-theme="light"] .bg-table tr:hover .sticky-col { background: #f1ede9 !important; }
[data-theme="dark"] .bg-table tr:hover .sticky-col { background: #1e293b !important; }

.player-name-label {
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-primary);
}
.player-members-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-weight: 400;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .player-name-label { font-size: 0.85rem; }
    .player-members-label { font-size: 0.6rem; }
    .rank-badge { 
        width: 28px; 
        height: 28px; 
        font-size: 0.9rem; 
        border-radius: 8px; 
    }
}
@media (max-width: 480px) {
    .player-name-label { font-size: 0.75rem; }
    .rank-badge { 
        width: 24px; 
        height: 24px; 
        font-size: 0.8rem; 
        border-radius: 6px; 
    }
}

.heatmap-box {
    width: 100%; max-width: 48px; margin: 0 auto; height: 34px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-weight: 800; font-size: 0.95rem; transition: var(--transition-base); cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.heatmap-box:hover { 
    transform: translateY(-2px); 
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
.heatmap-box.empty { 
    background: rgba(0, 0, 0, 0.03); 
    color: var(--text-muted); 
    font-weight: 500; 
    font-size: 0.8rem; 
    border: 1px dashed var(--border-medium);
    box-shadow: none;
}

[data-theme="dark"] .heatmap-box.empty {
    background: rgba(255, 255, 255, 0.03);
}

.bg-total { 
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-primary);
    text-align: center;
}

/* Modal Styles */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-overlay); backdrop-filter: blur(12px);
    display: none; justify-content: center; align-items: flex-start; z-index: 100005;
    opacity: 1; overflow-y: auto; padding: 40px 20px;
}
.modal-overlay.active {
    display: flex !important;
}
.modal-overlay > div {
    margin: auto;
}
.modal-content {
    background: var(--bg-surface); 
    border: 1px solid var(--border-medium); 
    border-radius: 32px;
    padding: 40px; max-width: 600px; width: 95%; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    margin: auto;
}
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 20px 0;
}

@media (max-width: 480px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modal Tab Styles */
.modal-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    padding: 6px;
    background: var(--bg-main);
    border-radius: 16px;
    border: 1px solid var(--border-light);
}
.modal-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1px solid transparent;
}
.modal-tab:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}
.modal-tab.active {
    background: var(--bg-surface);
    color: var(--accent-primary);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.modal-tab span {
    font-size: 1.4rem;
    transition: transform 0.2s;
}
.modal-tab.active span {
    transform: scale(1.1);
}
.modal-tab-pane {
    display: none;
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-tab-pane.active {
    display: block;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Layout Helpers */
.modal-section-header {
    margin-bottom: 2rem;
    text-align: center;
}
.modal-title-main {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
    max-width: 90%;
    margin: 0 auto;
}
.modal-link-box {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border-medium);
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.modal-link-label {
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
}
.modal-link-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-link-input {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-overflow: ellipsis;
    box-shadow: var(--shadow-sm);
}
.modal-copy-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--accent-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    transition: 0.2s;
    flex-shrink: 0;
}
.modal-copy-btn:hover {
    transform: scale(1.05);
    background: var(--accent-primary) !important;
    color: white !important;
}
.modal-toast {
    position: absolute;
    top: -45px;
    right: 0;
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
    pointer-events: none;
    box-shadow: var(--shadow-md);
}
.modal-pane-content {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}
.modal-pane-title {
    margin-bottom: 15px;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-instruction-list {
    padding: 0;
    margin: 0;
    list-style-position: inside;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
}
.modal-btn-primary {
    margin-top: 1.5rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}
.modal-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.roll-box {
    background: var(--bg-main); 
    border: 1px solid var(--border-medium); 
    border-radius: 14px;
    padding: 8px 14px; 
    font-size: 1.4rem; 
    font-weight: 900; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.roll-box:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-medium);
}

.roll-box.dropped {
    opacity: 0.6;
    background: var(--pill-danger-bg);
    color: var(--pill-danger-text);
    border-color: var(--pill-danger-text);
    border-style: dashed;
}

.roll-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-weight: 800;
    text-decoration: none !important; /* Prevent line-through on label */
}

.roll-box.dropped .roll-label {
    color: var(--pill-danger-text);
}

/* Point Animation Overlay */
.point-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%);
    z-index: 5000;
    display: none;
    align-items: center; justify-content: center;
    overflow: hidden;
}

.point-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.point-content {
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
}

.point-overlay.active .point-content {
    animation: bounceInLarge 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.2s;
}

.point-name {
    font-size: clamp(2rem, 10vw, 4rem);
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(255,255,255,0.4);
    max-width: 90vw;
    line-height: 1.1;
}

.point-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--success);
    letter-spacing: 8px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.point-val {
    font-size: 10rem;
    font-weight: 950;
    color: white;
    line-height: 0.8;
    text-shadow: 0 20px 80px rgba(0,0,0,0.6);
}

@keyframes bounceInLarge {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
    .container { padding: 16px; }
    .glass-card { padding: 24px; border-radius: 20px; }
    
    .timer-display { font-size: 5rem; letter-spacing: -2px; }
    
    .timetable-round { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
    .round-meta { flex-direction: row; align-items: center; gap: 10px; }
    
    
    .point-name { font-size: 2.5rem; }
    .point-val { font-size: 7rem; }
    
    .mobile-hide { display: none !important; }
    
    td { padding: 4px !important; }
}

/* Tab View Handling */
.view { display: none; }
.view.active { display: block; animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

/* Archive Styles */
.tournament-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-primary);
    border-radius: 16px;
    padding: 22px 25px;
    margin-bottom: 15px;
    display: block;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: visible;
}

.tournament-card:hover {
    background: var(--border-light);
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.tournament-card.dev-tournament {
    border-left: 4px dashed var(--danger) !important;
    background: rgba(239, 68, 68, 0.02) !important;
}

.tournament-card.dev-tournament:hover {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.06) !important;
}

.tournament-card.confirmed-tournament {
    border-left: 4px solid var(--success) !important;
    background: rgba(16, 185, 129, 0.03);
}

.tournament-card.confirmed-tournament:hover {
    border-color: var(--success) !important;
    background: rgba(16, 185, 129, 0.08);
}

.tournament-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    margin-top: -3px;
}

.status-dot.status-online {
    background: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    animation: pulse-blink 2s infinite;
}

.status-dot.status-offline {
    background: var(--text-muted);
}

.status-dot.status-planned {
    background: var(--info);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

@keyframes pulse-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile Nav Bar */
.mobile-nav-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px;
    border-radius: 20px;
    border: 1px solid var(--border-medium);
    margin-bottom: 25px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 15px;
    z-index: 1000;
}

.mobile-nav-active-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.hamburger-btn {
    background: var(--border-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.4rem;
}

.mobile-menu-close {
    display: none;
}

/* Responsive Nav-Bar: Show icons only on tablets and small laptops to prevent overflow */
@media (max-width: 1080px) and (min-width: 769px) {

    .tabs-list .tab-btn .btn-text {
        display: none !important;
    }
    .tabs-list .tab-btn {
        padding: 0 14px;
        gap: 0;
    }
    .tab-container {
        gap: 8px;
    }
}

@media (max-width: 768px) {

    .mobile-nav-bar { display: flex; }
    .tab-container { display: none; }
    
    .tab-container.active {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background: var(--bg-surface);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px 30px;
        flex-direction: column;
        justify-content: flex-start;
        margin: 0 !important;
        border-radius: 0;
        overflow-y: auto;
    }

    .tab-container.active .tabs-list {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .tab-container.active .tab-btn {
        width: 100%;
        padding: 18px;
        justify-content: flex-start;
        font-size: 1.1rem;
    }

    .nav-actions-right {
        margin-top: 30px;
        width: 100%;
        flex-direction: column;
        gap: 15px;
    }

    .nav-actions-right .tab-btn {
        width: 100%;
        justify-content: center;
    }

    .nav-actions-group {
        width: 100%;
    }

    .nav-actions-group .tab-btn {
        flex: 1;
    }

    .tab-btn-admin {
        border-bottom: 1px solid var(--border-light);
        padding-bottom: 20px !important;
        margin-bottom: 5px;
    }
    
    .mobile-menu-close {
        display: flex !important;
        align-self: flex-end;
        background: var(--border-light);
        border: 1px solid var(--border-medium);
        width: 44px;
        height: 44px;
        border-radius: 14px;
        color: var(--text-primary);
        font-size: 1.2rem;
        margin-bottom: 20px;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
    }
}

/* Table Selection */
.is-selected-row {
    background: rgba(245, 158, 11, 0.15) !important;
}
.is-selected-row td {
    border-top: 1px solid var(--highlight) !important;
    border-bottom: 1px solid var(--highlight) !important;
}

/* Variant Status */
.variant-cancelled {
    opacity: 0.4 !important;
    pointer-events: none !important;
    filter: grayscale(0.8);
    position: relative;
}

.variant-cancelled-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    font-size: 2rem;
    font-weight: 900;
    color: var(--danger);
    border: 4px solid var(--danger);
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 100;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    pointer-events: none;
}

@keyframes badge-pulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(245, 158, 11, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
}

@media (max-width: 600px) {
    .container { padding: 0.8rem; }
    .glass-card { padding: 1rem !important; border-radius: 16px; }
    .glass-card.table-card { padding: 0.4rem !important; }

    .bg-total { font-size: 1rem;}

}

/* Sorting Indicators */
.sort-asc, .sort-desc {
    white-space: nowrap;
}

.sort-asc::after {
    content: "\00a0↑";
    font-size: 0.7rem;
    opacity: 0.8;
}

.sort-desc::after {
    content: "\00a0↓";
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Heatmap / Score Badges */
.heatmap-box {
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-weight: 900;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.heatmap-box:hover {
    transform: translateY(-2px) scale(1.15);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    z-index: 10;
}

.heatmap-box.empty {
    background: rgba(255,255,255,0.03) !important;
    color: rgba(255,255,255,0.15) !important;
    border: 1px dashed rgba(255,255,255,0.1);
    box-shadow: none;
    font-family: inherit;
    font-weight: 400;
}

@media (max-width: 768px) {
    .heatmap-box {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.8rem;
        border-radius: 7px;
    }
}

@media (max-width: 600px) {
    .heatmap-box {
        width: 1.4rem;
        height: 1.4rem;
        font-size: 0.7rem;
        border-radius: 7px;
    }
}

@media (max-width: 480px) {
    .heatmap-box {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.7rem;
        border-radius: 5px;
    }
}

th[onclick] {
    cursor: pointer;
    transition: 0.2s;
}

th[onclick]:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
}

/* Game Pills Styling */
.game-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
    padding: 0 10px;
    justify-content: center;
}

.game-pill {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-medium);
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-base);
}

.game-pill-num {
    color: var(--accent);
    font-weight: 900;
    font-family: 'Silkscreen', sans-serif;
    font-size: 0.9rem;
}

.game-pill-name {
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

@media (max-width: 600px) {
    .game-pills-container { gap: 8px; margin-top: 15px; }
    .game-pill {
        padding: 4px 12px;
        border-radius: 12px;
        gap: 8px;
    }
    .game-pill-num { font-size: 0.8rem; }
    .game-pill-name { font-size: 0.65rem; letter-spacing: 0.5px; }
}

/* Inline styles moved from index.html */
.bg-table tr:last-child td {
    border-bottom: none !important;
}
.missing-info-glow {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    border: 2px solid var(--warning) !important;
    animation: pulse-warning 1.5s infinite;
}
@keyframes pulse-warning {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 0 25px rgba(245, 158, 11, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
}
.podium-pillar {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.podium-pillar:hover {
    transform: scale(1.05);
}
@keyframes crown-bob {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* Login Card Styles */
.login-card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 2rem 0;
}
.login-card {
    width: 92%;
    max-width: 520px;
    text-align: center;
    position: relative;
    padding: 1.5rem 2.5rem;
    margin-bottom: 0;
    animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-top-left-radius: 24px; border-top-right-radius: 24px;
    transition: background 0.4s ease;
}
.login-card h1 { margin-bottom: 0.5rem; letter-spacing: -1.5px; font-size: 2.8rem; color: var(--accent-primary); transition: color 0.4s ease; }
.login-card .subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.4; transition: color 0.4s ease; }
.login-card .form-group { text-align: left; margin-bottom: 1.2rem; }

/* Premium Input Styles for Login Card */
.login-card label {
    color: var(--text-primary) !important;
    font-weight: 800 !important;
    font-size: 0.78rem !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.8px !important;
    transition: color 0.25s ease;
}

.login-card input {
    background-color: #ffffff !important;
    border: 2px solid rgba(194, 65, 12, 0.22) !important; /* Elegant, clear terracotta border */
    border-radius: 14px !important;
    padding: 0.8rem 1.1rem !important;
    font-size: 1rem !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.login-card input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
}

.login-card input:hover {
    border-color: rgba(194, 65, 12, 0.45) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01), 0 4px 10px rgba(194, 65, 12, 0.08) !important;
}

.login-card input:focus {
    background-color: #ffffff !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.15), 0 6px 14px rgba(194, 65, 12, 0.1) !important;
    transform: translateY(-1.5px); /* Premium elevator lift effect */
}

/* Morphing form hint for better layout */
.login-card .form-hint {
    margin-top: 6px;
    line-height: 1.4;
    opacity: 0.85;
}

.login-card .admin-toggle { font-size: 0.75rem; color: var(--text-secondary); cursor: pointer; margin-top: 1.8rem; display: inline-block; opacity: 0.7; transition: 0.2s; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.login-card .admin-toggle:hover { opacity: 1; color: var(--accent-primary); }
.login-card #admin-pw-section {
    margin-top: 1.2rem; display: none; padding: 20px;
    background: rgba(194, 65, 12, 0.05); border-radius: 20px;
    border: 1px solid var(--border-medium);
    animation: slideDown 0.3s ease-out;
    transition: background 0.4s ease, border-color 0.4s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Pimped Admin Mode morph styling overrides */
.login-card.admin-mode {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.25) !important;
}
.login-card.admin-mode::before {
    background: linear-gradient(90deg, #6366f1, #a855f7) !important;
}
.login-card.admin-mode h1 {
    color: #6366f1 !important;
}
.login-card.admin-mode label {
    color: #6366f1 !important;
}
.login-card.admin-mode input {
    border-color: rgba(99, 102, 241, 0.25) !important;
}
.login-card.admin-mode input:hover {
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01), 0 4px 10px rgba(99, 102, 241, 0.1) !important;
}
.login-card.admin-mode input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 6px 14px rgba(99, 102, 241, 0.12) !important;
}
.login-card.admin-mode .admin-toggle:hover {
    color: #6366f1 !important;
}
.login-card.admin-mode #admin-pw-section {
    background: rgba(99, 102, 241, 0.05) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}
.login-card.admin-mode .modal-btn-primary {
    background: linear-gradient(90deg, #6366f1, #a855f7) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

/* Smooth HTMX Swapping Transitions */
[id^="htmx-view-"] {
    transition: opacity 120ms ease-in-out, transform 120ms ease-in-out;
}
.htmx-swapping {
    opacity: 0;
    transform: scale(0.99);
}
.htmx-added {
    opacity: 0;
    transform: scale(0.99);
}
.htmx-settling {
    opacity: 1;
    transform: scale(1);
}
/* ==========================================================================
   Responsive Ewige Bestenliste (Hall of Fame) Table Styles
   ========================================================================== */
/* Leaderboard Column Defaults (Desktop / Tablet) */
.bg-table th, 
.bg-table td {
    font-size: 0.92rem !important; /* Unified balanced cell font size */
    padding: 12px 10px !important; /* Elegant cell padding */
    vertical-align: middle;
}

.bg-table td.col-player {
    font-weight: 800;
    color: var(--text-primary);
}
.bg-table td.col-player a.player-link {
    font-size: 0.92rem !important;
    font-weight: 800;
}

.bg-table td.col-elo {
    font-weight: 800;
    text-align: center;
}

.bg-table td.col-wins {
    font-weight: 800;
    color: var(--highlight) !important;
    text-align: center;
}

.bg-table td.col-podiums {
    font-weight: 700;
    opacity: 0.95;
    text-align: center;
}

.bg-table td.col-tournaments {
    font-weight: 600;
    opacity: 0.7;
    text-align: center;
}

@media (max-width: 640px) {
    /* Equalize font-sizes and tighten padding across all cells */
    .bg-table th, 
    .bg-table td {
        padding: 8px 4px !important;
        font-size: 0.82rem !important;
    }
    
    /* Player link size matching */
    .bg-table td.col-player a.player-link {
        font-size: 0.82rem !important;
    }

    /* Tighten player column left padding on mobile */
    .col-player {
        padding-left: 6px !important;
    }

    /* Explicit column widths for mobile to prevent overflow */
    .bg-table th.col-platz { width: 38px !important; }
    .bg-table th.col-player { width: auto !important; }
    .bg-table th.col-elo { width: 52px !important; text-align: center; }
    .bg-table th.col-wins { width: 36px !important; text-align: center; }
    .bg-table th.col-podiums { width: 36px !important; text-align: center; }
    .bg-table th.col-tournaments { width: 36px !important; text-align: center; }

    /* Show emojis in table headers on mobile */
    .hdr-emoji {
        display: inline-block !important;
    }

    /* Abbreviate text headers on mobile */
    .hdr-text-long {
        display: none !important;
    }
    .hdr-text-short {
        display: inline !important;
        font-weight: 800;
    }

    /* Make all column value font sizes equal on mobile */
    .col-elo, 
    .col-elo span,
    .col-wins, 
    .col-podiums, 
    .col-tournaments {
        font-size: 0.82rem !important;
    }

    /* Hide crown/stars/chemistry emoji inside ELO to avoid wrapping */
    .col-elo .elo-emoji {
        display: none !important;
    }

    /* Shrink rank badge to fit perfectly */
    .rank-badge {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.72rem !important;
        border-radius: 5px !important;
    }

    /* Profile Header card mobile adjustments */
    .profile-vcard-btn-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
    .profile-vcard-btn-wrapper a {
        justify-content: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   Player Profile Header Styles
   ========================================================================== */
.profile-header-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.profile-vcard-btn-wrapper {
    flex-shrink: 0;
    margin-left: auto;
}

/* ==========================================================================
   Friendly Match Form Styles
   ========================================================================== */
.friendly-match-details {
    width: 100%;
    max-width: 480px; /* Elegant compact width */
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    cursor: pointer;
    background: var(--bg-card); /* Theme-aware card background */
}
.friendly-match-details:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 36px var(--accent-glow);
}

.friendly-match-summary {
    list-style: none;
    font-weight: 900;
    font-size: 0.85rem; /* Reduced from 0.95rem */
    color: white !important; /* Always white text for high contrast on orange gradient */
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
    padding: 10px 18px; /* Reduced from 14px 24px */
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.2);
    transition: var(--transition-base);
}
.friendly-match-summary::-webkit-details-marker {
    display: none; /* Hide default chrome chevron */
}
.friendly-match-summary:hover {
    transform: scale(1.008);
}
.friendly-match-summary .chevron-indicator {
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.2s;
    opacity: 0.85;
}
.friendly-match-details[open] .friendly-match-summary .chevron-indicator {
    transform: rotate(180deg);
}

.friendly-match-form {
    padding: 16px 20px; /* Reduced padding from 20px 24px */
    display: flex;
    flex-direction: column;
    gap: 12px; /* Reduced gap from 16px */
    cursor: default;
    text-align: left;
    background: rgba(0, 0, 0, 0.02); /* Very soft dark tint in dark mode, light mode */
}
[data-theme="dark"] .friendly-match-form {
    background: rgba(0, 0, 0, 0.15); /* Slightly darker in dark mode for depth */
}

.friendly-match-label {
    font-size: 0.68rem; /* Compact label */
    opacity: 0.8;
    font-weight: 800;
    margin-bottom: 4px;
    display: block;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.friendly-match-select,
.friendly-match-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.82rem; /* Reduced from 0.85rem */
    padding: 8px 10px; /* Reduced from 10px */
    background: var(--input-bg); /* Theme-aware input background */
    border: 1px solid var(--input-border); /* Theme-aware border */
    color: var(--input-text); /* Theme-aware text color */
    border-radius: 8px;
    cursor: pointer;
    height: 36px; /* Reduced from 41px */
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.friendly-match-input {
    cursor: text;
}
.friendly-match-select:focus,
.friendly-match-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.friendly-match-btn {
    margin: 4px 0 0 0; /* Tightened top margin */
    width: 100%;
    border-radius: 8px;
    padding: 10px 14px; /* Reduced from 12px */
    font-weight: 900;
    font-size: 0.85rem; /* Reduced from 0.9rem */
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: white !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.15);
    transition: var(--transition-base);
}
.friendly-match-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.25);
}

/* ==========================================================================
   FAQ Views and Custom Styling (Cleaned and consolidated)
   ========================================================================== */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid var(--border-medium);
    border-radius: 24px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.faq-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.faq-header h2 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.faq-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 auto;
    line-height: 1.5;
}

/* Sub-tab styling inside FAQ */
.faq-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-tab-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.faq-tab-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Accordion Panel Styles */
.faq-accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: 18px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.faq-accordion-trigger {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.05rem;
    transition: background 0.2s;
}

.faq-accordion-trigger:hover {
    background: rgba(255, 255, 255, 0.01);
}

.faq-trigger-text {
    flex: 1;
    padding-right: 15px;
}

.faq-trigger-icon {
    font-size: 0.75rem;
    opacity: 0.5;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion-item.open {
    border-color: var(--accent-primary);
    background: var(--bg-surface);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.08);
}

.faq-accordion-item.open .faq-trigger-icon {
    transform: rotate(180deg);
}

.faq-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content-inner {
    padding: 0 24px 24px 24px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border-top: 1px solid transparent;
}

.faq-accordion-item.open .faq-accordion-content {
    max-height: 1500px; /* High limit for rich content nested maps/forms */
}

/* Interactive ELO Calculator Styles */
.elo-calc-container {
    background: rgba(255, 255, 255, 0.01);
    border: 2px dashed var(--border-medium);
    border-radius: 20px;
    padding: 24px;
    margin-top: 15px;
}

.elo-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.elo-calc-card {
    background: var(--bg-main);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elo-calc-card label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elo-calc-card input {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-medium);
    padding: 4px 0;
    outline: none;
    width: 100%;
}

.elo-calc-card input:focus {
    border-bottom-color: var(--accent-primary);
}

.elo-calc-outcome-picker {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.elo-calc-outcome-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-medium);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.elo-calc-outcome-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.elo-calc-outcome-btn.active {
    background: var(--accent-glow);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.elo-calc-result-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

.elo-calc-player-res {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.elo-calc-val-header {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.elo-calc-val-diff {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.1;
}

.elo-calc-val-diff.positive { color: var(--success); }
.elo-calc-val-diff.negative { color: #ef4444; }
.elo-calc-val-diff.neutral { color: var(--text-secondary); }

.elo-calc-val-final {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Analogy Card Styling */
.analogy-card {
    background: var(--accent-glow);
    border-left: 4px solid var(--accent-primary);
    padding: 16px;
    border-radius: 12px;
    margin: 15px 0;
}

.analogy-title {
    font-weight: 800;
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analogy-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
}

/* Custom SVGs Container styling */
.svg-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.svg-illustration {
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255,255,255,0.01);
    padding: 10px;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.8rem;
}

.matrix-table th {
    text-align: left;
    background: rgba(255,255,255,0.02);
    color: var(--accent);
    padding: 10px;
    border-bottom: 2px solid var(--border-medium);
    font-weight: 800;
    text-transform: uppercase;
}

.matrix-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 600;
}

.matrix-table tr:hover td {
    background: rgba(255,255,255,0.01);
}

/* Consolidated Semantic Classes for FAQ Elements */
.faq-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.faq-card-sub {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-medium);
    padding: 15px;
    border-radius: 12px;
}

.faq-card-sub.large {
    padding: 18px;
    border-radius: 16px;
}

.faq-card-sub-title {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 5px;
}

.faq-card-sub-title.highlight { color: var(--highlight); }
.faq-card-sub-title.success { color: var(--success); }
.faq-card-sub-title.large {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.faq-card-sub-heading {
    color: var(--text-primary);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
}

.faq-card-sub-heading.space-top {
    margin-top: 15px;
}

.faq-card-sub-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.faq-card-sub-text.small {
    font-size: 0.8rem;
    line-height: 1.5;
    display: block;
    margin-bottom: 12px;
}

.faq-card-sub-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: block;
    padding-left: 10px;
    border-left: 2px solid var(--accent-primary);
}

.faq-card-sub-note.danger {
    border-left-color: var(--danger);
}

.faq-card-sub-note.success {
    border-left-color: var(--success);
}

.faq-card-sub.success-tint {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.faq-card-sub.danger-tint {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.faq-card-sub.dashed {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-medium);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.faq-list {
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.faq-list.space-bottom {
    margin-bottom: 15px;
}

.faq-no-margin {
    margin-bottom: 0;
}

.faq-cursor-default {
    cursor: default;
}

.faq-icon-fixed {
    transform: none;
    opacity: 1;
}

.faq-content-visible {
    max-height: none !important;
    overflow: visible !important;
}

.faq-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.faq-borders-x {
    border-left: 1px solid var(--border-medium);
    border-right: 1px solid var(--border-medium);
}

.elo-calc-expected-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    margin: 6px 0;
}

.faq-space-top {
    margin-top: 15px;
}

.faq-space-bottom {
    margin-bottom: 15px;
}

.matrix-table.compact {
    margin-top: 5px;
    font-size: 0.75rem;
}

/* FAQ Modal Template Styles */
.faq-modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-modal-label {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 5px;
}

.faq-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.faq-modal-body-scroll {
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.faq-modal-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

/* ==========================================================================
   ZIGBEE / LORATAP REFERENCE CARD STYLES
   ========================================================================== */

.ref-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.ref-card h4 {
    margin-top: 0;
    color: var(--accent);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.combo-line {
    display: grid;
    grid-template-columns: 110px 35px 1fr;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
}

.combo-line:last-child {
    border-bottom: none;
}

.key-cap {
    background: linear-gradient(145deg, var(--border-medium), var(--bg-main));
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 0 var(--border-medium);
    min-width: 25px;
    text-align: center;
    margin-right: 4px;
    display: inline-block;
}

.key-cap.double {
    border-color: var(--accent);
    box-shadow: 0 2px 0 var(--accent-glow);
}

.player-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.7rem;
    margin: 0 4px;
    vertical-align: middle;
}

.player-badge.p1 {
    background: #f8fafc;
    color: #0f172a;
    border: 2px solid #cbd5e1;
}

[data-theme="dark"] .player-badge.p1 {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

.player-badge.p2 {
    background: #ef4444;
    color: #fff;
}

.action-hint {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-style: italic;
    opacity: 0.6;
    padding-left: 10px;
}

.action-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ==========================================================================
   COLLAPSIBLE DETAILS STYLES (ZIGBEE REF CARDS)
   ========================================================================== */

.faq-ref-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    margin-top: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-ref-details[open] {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.faq-ref-summary {
    padding: 14px 20px;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    outline: none;
}

.faq-ref-summary:hover {
    background: var(--border-light);
    color: var(--accent-primary);
}

.faq-ref-content {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-main);
    animation: fadeIn 0.3s ease-out;
}

/* Styled Switch/Toggle Button for Privacy Settings */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-medium);
    transition: .3s;
    border-radius: 22px;
}
.switch .slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.faq-modal-body-scroll {
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.faq-modal-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

/* ==========================================================================
   ZIGBEE / LORATAP REFERENCE CARD STYLES
   ========================================================================== */

.ref-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.ref-card h4 {
    margin-top: 0;
    color: var(--accent);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.combo-line {
    display: grid;
    grid-template-columns: 110px 35px 1fr;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
}

.combo-line:last-child {
    border-bottom: none;
}

.key-cap {
    background: linear-gradient(145deg, var(--border-medium), var(--bg-main));
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 0 var(--border-medium);
    min-width: 25px;
    text-align: center;
    margin-right: 4px;
    display: inline-block;
}

.key-cap.double {
    border-color: var(--accent);
    box-shadow: 0 2px 0 var(--accent-glow);
}

.player-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.7rem;
    margin: 0 4px;
    vertical-align: middle;
}

.player-badge.p1 {
    background: #f8fafc;
    color: #0f172a;
    border: 2px solid #cbd5e1;
}

[data-theme="dark"] .player-badge.p1 {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

.player-badge.p2 {
    background: #ef4444;
    color: #fff;
}

.action-hint {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-style: italic;
    opacity: 0.6;
    padding-left: 10px;
}

.action-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ==========================================================================
   COLLAPSIBLE DETAILS STYLES (ZIGBEE REF CARDS)
   ========================================================================== */

.faq-ref-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    margin-top: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-ref-details[open] {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.faq-ref-summary {
    padding: 14px 20px;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    outline: none;
}

.faq-ref-summary:hover {
    background: var(--border-light);
    color: var(--accent-primary);
}

.faq-ref-content {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-main);
    animation: fadeIn 0.3s ease-out;
}

/* Styled Switch/Toggle Button for Privacy Settings */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-medium);
    transition: .3s;
    border-radius: 22px;
}
.switch .slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.switch input:checked + .slider {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}
.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* ==========================================================================
   INTERACTIVE PRODUCT TOUR STYLES
   ========================================================================== */

/* Custom Tour Dismiss Switch styling to prevent any weird layout shifting */
.tour-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    border-top: 1px dashed var(--border-light);
    padding-top: 14px;
}

.tour-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    min-width: 44px;
    height: 22px;
    min-height: 22px;
    flex-shrink: 0;
    margin: 0;
}

.tour-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tour-switch .tour-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-medium);
    transition: all 0.3s ease;
    border-radius: 22px;
}

.tour-switch .tour-slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    top: 3px;
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tour-switch input:checked + .tour-slider {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

.tour-switch input:checked + .tour-slider::before {
    transform: translateX(22px);
}

.tour-switch-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1.2;
    user-select: none;
}


#tour-spotlight {
    position: absolute;
    pointer-events: none;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.78), 0 0 25px rgba(245, 158, 11, 0.4);
    border: 3px solid var(--accent-primary);
    z-index: 100000;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

#tour-spotlight.active {
    opacity: 1;
    visibility: visible;
}

#tour-card {
    position: fixed;
    z-index: 100010;
    width: 90%;
    max-width: 420px;
    bottom: 24px;
    right: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100px) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

#tour-card.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.tour-card-glow {
    position: relative;
    overflow: hidden;
}

.tour-progress-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
}

#tour-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 0 8px var(--accent-primary);
    transition: width 0.3s ease;
}

.tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tour-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tour-close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

/* Spotlight Highlight Pulse effect */
@keyframes spotlight-pulse {
    0% { box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.78), 0 0 25px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.78), 0 0 40px rgba(245, 158, 11, 0.65); }
    100% { box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.78), 0 0 25px rgba(245, 158, 11, 0.4); }
}

#tour-spotlight.active {
    animation: spotlight-pulse 2s infinite ease-in-out;
}

@media (max-width: 600px) {
    #tour-card {
        bottom: 16px;
        right: 5%;
        left: 5%;
        width: 90%;
        max-width: none;
    }
}

/* Disabled and premium loading states for login button */
.modal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.modal-btn-primary.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: default;
}

.modal-btn-primary.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Playtime Styles and Glow-Animations (Dynamic Startpage Feature)
   ========================================================================== */
.playtime-banner {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.12) 100%);
    border: 1px dashed var(--accent);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse-banner 3s infinite ease-in-out;
}

.playtime-pulse {
    color: #ef4444;
    animation: live-pulse-dot 1.5s infinite;
}

@keyframes live-pulse-dot {
    0% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.25); }
    100% { opacity: 0.3; transform: scale(0.9); }
}

@keyframes pulse-banner {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

/* Form Highlight */
.friendly-match-details.playtime-highlight {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.15);
    animation: playtime-border-pulse 4s infinite alternate ease-in-out;
}

@keyframes playtime-border-pulse {
    0% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.08);
        border-color: rgba(245, 158, 11, 0.4);
    }
    100% {
        box-shadow: 0 0 28px rgba(245, 158, 11, 0.22);
        border-color: var(--accent);
    }
}

/* Premium Select Dropdown for Settings & Forms */
.premium-select-dropdown {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    border: 2px solid var(--border-medium);
    border-radius: 10px;
    color: var(--input-text, var(--text-primary));
    cursor: pointer;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    height: 38px;
    max-width: 220px;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .premium-select-dropdown {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.08);
}

.premium-select-dropdown:hover {
    border-color: var(--accent);
    transform: translateY(-0.5px);
}

.premium-select-dropdown:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Premium Player Profile and Tournament Timeline Custom Cards */
.timeline-card {
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    cursor: pointer;
    transition: var(--transition-base);
}

.timeline-card-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.timeline-card-summary {
    padding: 14px 20px 14px 26px !important;
    font-weight: 800;
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.timeline-card-content {
    padding: 0 20px 20px 26px !important;
    cursor: default;
    border-top: 1px solid var(--border-light);
    margin-top: 5px;
    padding-top: 15px;
}

.profile-timeline-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-timeline-sep {
    opacity: 0.4;
}

.profile-timeline-date {
    white-space: nowrap;
}

.match-timeline-card {
    position: relative;
    overflow: hidden;
    padding: 14px 20px 14px 26px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.match-timeline-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .profile-timeline-sep {
        display: none !important;
    }
    .profile-timeline-subtext {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
    }
}

/* Versus Header Responsive Card Styles */
.vs-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.vs-player-column {
    flex: 1;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.vs-player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    transition: var(--transition-base);
}

.vs-player-name {
    margin: 0;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.vs-badge-column {
    flex-shrink: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vs-badge-circle {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--accent);
    color: white;
    padding: 10px 18px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(255,255,255,0.1);
    transition: var(--transition-base);
}

.vs-badge-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 8px;
    letter-spacing: 1px;
}

.elo-trend-badge {
    font-size: 0.7rem;
    font-weight: 850;
    padding: 2px 5px;
    border-radius: 6px;
    cursor: help;
    display: inline-flex;
    align-items: center;
}
.elo-trend-badge.up {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}
.elo-trend-badge.down {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* Mobile responsive compact styling */
@media (max-width: 600px) {
    .vs-header-container {
        gap: 8px !important;
    }
    
    .vs-player-avatar {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.4rem !important;
        border-radius: 12px !important;
    }
    
    .vs-player-name {
        font-size: 0.9rem !important;
    }
    
    .vs-player-column {
        gap: 4px !important;
    }
    
    .vs-badge-circle {
        font-size: 0.9rem !important;
        padding: 6px 11px !important;
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2) !important;
    }
    
    .vs-badge-text {
        display: none !important;
    }
    
    .vs-player-column span {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
    }
    
    .col-elo .elo-trend-badge {
        font-size: 0.58rem !important;
        padding: 1.5px 3.5px !important;
        border-radius: 4px !important;
    }
    
    .col-elo svg {
        width: 48px !important;
        height: 16px !important;
        margin-left: 4px !important;
    }
}

/* Weather Pill & Rich Hover Popover */
.weather-pill {
    position: relative !important;
    cursor: pointer !important;
}

.weather-popover {
    position: absolute;
    top: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    background: rgba(15, 23, 42, 0.96); /* Slate 900 background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 12px;
    width: 220px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none !important; /* Prevent parent uppercase */
    letter-spacing: normal !important;
    line-height: 1.4;
    text-align: left;
}

.weather-popover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent rgba(15, 23, 42, 0.96) transparent;
}

.weather-pill:hover .weather-popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.weather-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.weather-popover-header strong {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.8rem;
}

.weather-popover-header span {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
}

.weather-popover-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-popover-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.weather-popover-time {
    color: #94a3b8;
    font-weight: 700;
    width: 45px;
}

.weather-popover-emoji {
    font-size: 0.95rem;
    width: 25px;
    text-align: center;
}

.weather-popover-temp {
    font-weight: 700;
    width: 40px;
    text-align: right;
    color: #f8fafc;
}

.weather-popover-precip {
    color: #60a5fa; /* Blue 400 */
    font-size: 0.65rem;
    font-weight: 700;
    width: 55px;
    text-align: right;
}

/* Collapsible Widgets Grid & Styles */
.overview-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .overview-widgets-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.collapsible-widget {
    transition: var(--transition-base);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.widget-toggle-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .widget-toggle-icon {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.widget-body {
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-out, margin-top 0.35s ease;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
}

.widget-body.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    pointer-events: none;
}

.widget-toggle-icon.collapsed {
    transform: rotate(-90deg);
}


