:root {
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --neon-purple: #bc13fe;
    --neon-green: #39ff14;
    --neon-yellow: #fbbf24;
}

body {
    user-select: none;
    -webkit-user-select: none;
}

body.light {
    background-color: #f1f5f9;
    color: #1e293b;
}

body.light header {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: #e2e8f0;
}

body.light .bg-slate-900\/50 {
    background-color: rgba(255, 255, 255, 0.7);
    border-color: #cbd5e1;
}

body.light #current-number {
    color: #0f172a;
    text-shadow: none;
}

body.light .bg-slate-800 {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.light #next-btn, 
body.light #reset-btn {
    background-color: #1e293b;
    color: white;
}

#timer-ring {
    filter: drop-shadow(0 0 8px var(--neon-blue));
}

body.light #timer-ring {
    filter: none;
    color: #3b82f6;
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 20px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
}

body.light ::-webkit-scrollbar-track {
    background: #f1f5f9;
}
body.light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 2px solid #f1f5f9;
}
body.light ::-webkit-scrollbar-thumb:hover {
    background: var(--neon-pink);
}

/* BINGO Board Rows */
.bingo-row {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 14px 8px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.bingo-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.bingo-row:last-child {
    border-bottom: none;
}

body.light .bingo-row {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.bingo-numbers {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 54px;
}

@media (min-width: 1024px) {
    .bingo-numbers {
        flex-wrap: nowrap;
        gap: 8px;
    }
}

.bingo-letter {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    border-radius: 12px;
    background: #1e293b;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.letter-B { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.letter-I { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.letter-N { background: linear-gradient(135deg, #10b981, #047857); }
.letter-G { background: linear-gradient(135deg, #f59e0b, #b45309); }
.letter-O { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.board-tile {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #475569;
}

body.light .board-tile {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.board-tile.called {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    border-color: var(--neon-pink);
    transform: scale(1.1) translateY(-2px);
}

.board-tile.newly-called {
    background: var(--neon-blue);
    color: #0f172a;
    box-shadow: 0 0 25px var(--neon-blue);
    border-color: var(--neon-blue);
    animation: boardHitPulse 1.5s infinite;
    z-index: 10;
}

body.light .board-tile.called {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 255, 0.3);
    border-color: var(--neon-pink);
    transform: scale(1.1) translateY(-2px);
}

body.light .board-tile.newly-called {
    background: var(--neon-blue);
    color: #0f172a;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
    animation: boardHitPulse 1.5s infinite;
}

@keyframes boardHitPulse {
    0% { transform: scale(1.1) translateY(-2px); box-shadow: 0 0 10px var(--neon-blue); }
    50% { transform: scale(1.2) translateY(-4px); box-shadow: 0 0 30px var(--neon-blue); }
    100% { transform: scale(1.1) translateY(-2px); box-shadow: 0 0 10px var(--neon-blue); }
}

body.light .close-modal {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.light .close-modal:hover {
    background-color: #e2e8f0;
    color: var(--neon-pink);
}

body.light .close-modal img {
    filter: invert(1) brightness(0.2);
}

.history-ball {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #94a3b8;
}

.history-ball:first-child {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.2);
}

body.light .history-ball {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

body.light .indicator-pending {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

/* Modal and Overlays */
.shadow-3xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Animations */
.animate-pulse-number {
    animation: numberPulse 0.5s ease-out;
}

@keyframes numberPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* Big Screen / Audience Mode */
body.big-screen-mode .xl\:col-span-4 {
    grid-column: span 12 / span 12;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

body.big-screen-mode header,
body.big-screen-mode footer,
body.big-screen-mode .xl\:col-span-8,
body.big-screen-mode #bingo-btn,
body.big-screen-mode #settings-toggle {
    display: none !important;
}

body.big-screen-mode #caller-section svg {
    display: none !important;
}

body.big-screen-mode #history-row .history-ball {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    border-radius: 20px;
}

body.big-screen-mode .grid.grid-cols-4.gap-3 {
    gap: 2rem;
    margin-top: 2rem;
}

body.big-screen-mode .grid.grid-cols-4.gap-3 button {
    padding: 2rem;
    border-radius: 2rem;
}

body.big-screen-mode #start-btn {
    padding-left: 4rem;
    padding-right: 4rem;
}

body.big-screen-mode #caller-section {
    width: 100%;
    max-width: 1200px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

body.big-screen-mode #current-number {
    font-size: clamp(8rem, 40vw, 24rem);
    line-height: 1;
    margin: 0.5rem 0;
    text-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
}

body.light.big-screen-mode #current-number {
    color: #1e293b;
    text-shadow: none;
}

body.big-screen-mode .grid.grid-cols-4.gap-3,
body.big-screen-mode #caller-section h2,
body.big-screen-mode #caller-section .flex-col > span:not([id="history-row"]) {
    opacity: 0.15;
    transition: opacity 0.3s;
}

body.big-screen-mode #history-row {
    opacity: 1 !important;
}

body.big-screen-mode #caller-section:hover .grid.grid-cols-4.gap-3,
body.big-screen-mode #caller-section:hover h2,
body.big-screen-mode #caller-section:hover .flex-col > span {
    opacity: 1;
}

body.big-screen-mode #timer-ring {
    display: none !important;
}

body.big-screen-mode #audience-timer-container {
    display: block !important;
}

body.big-screen-mode #exit-audience-btn {
    display: flex !important;
}

body.light #modal-confirm .bg-slate-900 {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

body.light #modal-confirm #confirm-title {
    color: #0f172a;
}

body.light #modal-confirm #confirm-message {
    color: #64748b;
}

body.light #modal-confirm #confirm-cancel {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.light #modal-confirm #confirm-cancel:hover {
    background-color: #e2e8f0;
}

body.big-screen-mode .relative.flex.items-center.justify-center {
    width: auto !important;
    height: auto !important;
}
