:root {
    --bg-color: #0d0f1a;
    --sidebar-bg: rgba(20, 24, 40, 0.6);
    --glass-bg: rgba(30, 36, 60, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f0f2f5;
    --text-muted: #9ba3b5;
    --accent: #00f0ff;
    --accent-hover: #00c3d9;
    --accent-yellow: #fce803;
    --win-color: #00e676;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);

}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*ReusableComponents*/
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.card {
    padding: 2rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

/*Dashboard*/
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 800;
}

.stat-card .value.accent {
    color: var(--accent);
}

.activity-list {
    list-style: none;
    margin-top: 1rem;
}

.activity-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.activity-list li:last-child {
    border-bottom: none;
}

/*BingoGrid*/
.subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.bingo-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.bingo-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.bingo-cell:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

/* .completed is now driven by inline JS color styles */
.bingo-cell.completed {
    color: #fff;
    font-weight: 700;
}

.bingo-cell.completed.winning-cell {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
    z-index: 2;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.cell-task {
    display: block;
    font-size: 0.82rem;
    line-height: 1.2;
    text-align: center;
}

.lucide {
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.4rem;
}

.header-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.8rem;
    color: var(--accent);
}

.header-icon-inline {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.4rem;
    color: var(--accent);
}

.nav-links i {
    margin-right: 0.8rem;
}

.btn i {
    margin-right: 0.4rem;
}

.players-claimed {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.9;
    color: #fff;
}

.player-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 4px currentColor;
}

/* Custom Task Panel */
.custom-task-input {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.custom-task-input input {
    flex: 1;
}

.custom-task-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.custom-task-list li {
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--accent);
}

/*Olympiade*/
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.leaderboard-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tbody tr {
    transition: var(--transition);
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: 800;
    background: var(--glass-bg);
}

.rank-1.rank-badge {
    background: var(--accent-yellow);
    color: #000;
    box-shadow: 0 0 15px rgba(252, 232, 3, 0.4);
}

.rank-2.rank-badge {
    background: #e0e0e0;
    color: #000;
}

.rank-3 .rank-badge {
    background: #cd7f32;
    color: #fff;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    font-size: 1.1rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #0077ff 100%);
    color: var(--bg-color);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0077ff 0%, var(--accent) 100%);
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.5);
    color: #fff;
}

.primary-btn:hover::before {
    opacity: 1;
}

.outline-btn {
    background: rgba(30, 36, 60, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    color: var(--text-main);
}

.outline-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

.small-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    text-transform: none;
    letter-spacing: normal;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 15, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.login-overlay.active-overlay {
    opacity: 1;
    pointer-events: all;
}

.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 3rem 2rem;
}

.login-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

#loginForm input {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

#loginForm input:focus {
    border-color: var(--accent);
}

/* Multi-user Bingo Styles */
.bingo-cell {
    position: relative;
    overflow: hidden;
}

.players-claimed {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 10px;
}

.bingo-cell.completed .players-claimed {
    color: var(--accent);
}

/* Updated CSS to handle the new Landing Page and App state */

/* Hide app initially */
.hidden-app {
    display: none !important;
}

/* Landing Page Styles */
.landing-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.1), transparent 60%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.landing-view.active-landing {
    display: flex;
    animation: fadeIn 0.5s ease-out;
}

.landing-content {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-logo {
    border-bottom: none;
    margin-bottom: 2rem;
    text-align: center;
}

.landing-logo h2 {
    font-size: 3rem;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.landing-card {
    width: 100%;
    padding: 3rem;
}

.landing-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* App Shell & Sidebar Layout */
.app-container {
    display: grid !important;
    /* Override the default block flex to enforce grid */
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.sidebar .logo {
    margin-bottom: 3rem;
}

.sidebar .logo h2 {
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-links li {
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-links li.active {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, transparent 100%);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.content {
    padding: 2rem 3rem;
    overflow-y: auto;
    position: relative;
    height: 100vh;
}

.content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

/* Visibility Classes for Navigation */
.hidden-app {
    display: none !important;
}

.view {
    display: none;
}

.active-view {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
}

.toast {
    background: rgba(20, 24, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideInRight 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    transform: translateX(120%);
    font-weight: 600;
}

.toast.error {
    border-left-color: #ff3366;
}

.toast.success {
    border-left-color: var(--win-color);
}

.toast.removing {
    animation: slideOutRight 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group select {
    appearance: none;
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-color);
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.form-row {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.flex-1 {
    flex: 1;
}

.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 1rem;
}

.form-divider {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.9rem;
}

/* Remove old login overlay styles */
.login-overlay,
.login-card,
#loginForm {
    display: none !important;
}

/* Task Manager Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.modal-open {
    display: flex;
}

.modal-box {
    width: min(700px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
}

.close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(255, 59, 102, 0.2);
    border-color: #ff3366;
    color: #ff3366;
}

.all-tasks-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-right: 0.5rem;
}

.all-tasks-list::-webkit-scrollbar {
    width: 4px;
}

.all-tasks-list::-webkit-scrollbar-track {
    background: transparent;
}

.all-tasks-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.task-section-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding: 0.8rem 0 0.3rem;
    border-bottom: 1px solid var(--glass-border);
    margin-top: 0.5rem;
}

.task-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.task-list-item.default-task {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.task-list-item.custom-task {
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.15);
    color: var(--text-main);
}

.remove-task-btn {
    background: none;
    border: none;
    color: #ff3366;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.remove-task-btn:hover {
    background: rgba(255, 51, 102, 0.15);
}

/* Modal task input (shares styling with form but needs non-.form-group wrapper) */
.custom-task-input {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 0.5rem;
}

.custom-task-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.custom-task-input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

/* ---- Utility ---- */
.hidden {
    display: none !important;
}

.muted {
    color: var(--text-muted);
    font-style: italic;
}

/* ---- Bingo Settings Panel ---- */
.settings-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.2s ease;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.settings-row>label:first-child {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    min-width: 180px;
}

.settings-row input[type="number"] {
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.settings-row input[type="number"]:focus {
    border-color: var(--accent);
}

.settings-row input[type="radio"] {
    accent-color: var(--accent);
    cursor: pointer;
}

/* ---- Bingo Scoreboard ---- */
.bingo-scoreboard {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1.2rem;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    font-size: 0.9rem;
    min-height: 44px;
}

.scoreboard-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-right: 0.3rem;
}

.scoreboard-entry {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}


/* ---- User Color Dot (header) ---- */
.user-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

.room-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 1px 7px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ---- Player List ---- */
.player-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.player-entry {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 0.95rem;
}

.player-entry.muted {
    color: var(--text-muted);
    font-style: italic;
}

.player-entry-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.player-entry-name {
    font-weight: 600;
}

/* ---- Winchallenge Game Add Form ---- */
.game-add-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--glass-border);
}

.game-add-form .form-group {
    margin: 0;
}

.game-add-form input[type="text"],
.game-add-form input[type="number"] {
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    width: 100%;
    transition: var(--transition);
}

.game-add-form input:focus {
    border-color: var(--accent);
}

.checkbox-group {
    display: flex;
    align-items: flex-end;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.7rem 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ---- Game Cards (Winchallenge) ---- */
.game-card {
    padding: 1.5rem;
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.game-card-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.game-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 2px 8px;
}

.player-score-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.player-score-row.done {
    background: rgba(0, 230, 118, 0.05);
}

.player-score-name {
    font-weight: 600;
    min-width: 90px;
    font-size: 0.9rem;
}

.progress-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.win-count {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}

.win-btn,
.reset-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.win-btn.disabled {
    opacity: 0.5;
    cursor: default;
}

/* ---- Team Olympiade ---- */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
}

.team-card {
    padding: 1.2rem;
}

.team-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.team-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bingo-footer {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bingo-wrapper {
    position: relative;
    width: 100%;
}

/* ---- Bingo Game Flow ---- */
.board-hidden {
    position: relative;
    filter: blur(8px) grayscale(0.5);
    pointer-events: none;
    min-height: 400px;
    transition: filter 0.5s ease;
}

.board-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    pointer-events: all;
    border-radius: 12px;
}

.overlay-content {
    text-align: center;
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.overlay-content p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.board-locked {
    filter: grayscale(0.2);
    opacity: 0.9;
    pointer-events: none !important;
}

.board-locked::after {
    content: "Spiel Beendet";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--accent);
    padding: 1.2rem 3.5rem;
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 8px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.2), inset 0 0 16px rgba(0, 240, 255, 0.1);
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.winning-cell {
    animation: winningPulse 1.5s infinite;
    z-index: 10;
}

@keyframes winningPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px var(--accent);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px var(--accent);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px var(--accent);
    }
}

/* ---- Winchallenge Team Styles ---- */
.is-my-team {
    background: rgba(0, 240, 255, 0.1) !important;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.large-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 800;
}

/* Team Olympiade Expansion */
.game-list-simple {
    list-style: none;
    padding: 0;
}

.oly-game-item {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.oly-game-item:hover {
    border-color: var(--accent);
}

.leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-row {
    animation: slideInOly 0.3s ease-out forwards;
}

@keyframes slideInOly {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tiny-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    min-height: auto;
}

.danger-btn {
    background: rgba(255, 60, 60, 0.1);
    color: #ff3c3c;
    border: 1px solid rgba(255, 60, 60, 0.3);
}

.danger-btn:hover {
    background: #ff3c3c;
    color: white;
}

/* Solo Olympiade Styles */
.solo-player-ranks {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.rank-select {
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.rank-select:hover {
    border-color: var(--accent);
}

.rank-select option {
    background: var(--bg-color);
    color: var(--text-main);
}

/* Rank Toggle Buttons */
.rank-toggle-btn {
    min-width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.rank-toggle-btn.primary-btn {
    background: var(--accent);
    color: var(--bg-color);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Disabled state for all buttons and inputs */
button:disabled,
input:disabled,
select:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(80%);
}