* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: row;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    overflow: hidden;
}

.left-panel, .right-panel {
    padding: 30px;
    position: relative;
}

.left-panel {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow-y: auto;
    gap: 8px;
}

.toolbar-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    margin-bottom: 6px;
}

.room-indicator {
    align-self: center;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-modal {
    width: min(520px, 95vw);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-modal h2 {
    margin-bottom: 16px;
    font-size: 20px;
    color: #a29bfe;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.login-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
}

.login-tab.active {
    background: linear-gradient(135deg, #00b894, #00cec9);
    border-color: transparent;
    color: #fff;
}

.login-section select {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    outline: none;
}

.login-section select:focus {
    border-color: rgba(162, 155, 254, 0.8);
    box-shadow: 0 0 0 3px rgba(162, 155, 254, 0.18);
}

.login-section select option {
    background: #16213e;
    color: #ffffff;
}

.login-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 14px 0;
}

.login-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.login-row label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

.login-row input {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    outline: none;
}

.login-row input:focus {
    border-color: rgba(162, 155, 254, 0.8);
    box-shadow: 0 0 0 3px rgba(162, 155, 254, 0.18);
}

.login-error {
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 107, 107, 0.14);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.login-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}

.toolbar {
    display: flex;
    gap: 6px;
}

.burger-btn {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 22px;
    z-index: 100;
}

.burger-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 8px;
    min-width: 200px;
    z-index: 500;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    gap: 4px;
    animation: slideIn 0.18s ease-out;
}

.burger-menu.open {
    display: flex;
}

.burger-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.burger-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.burger-item span {
    font-weight: 500;
}

.burger-item-danger {
    color: rgba(255, 120, 120, 0.9);
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.burger-item-danger:hover {
    background: rgba(255, 80, 80, 0.12);
}

body.light-theme .burger-menu {
    background: linear-gradient(135deg, #f0f0f8 0%, #e8e8f4 100%);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

body.light-theme .burger-item {
    color: rgba(0, 0, 0, 0.8);
}

body.light-theme .burger-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

body.light-theme .burger-item-danger {
    color: rgba(180, 40, 40, 0.9);
    border-top-color: rgba(0, 0, 0, 0.1);
}

.toolbar-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.stats-group {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.stats-bar {
    display: flex;
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #a29bfe;
}

.game-mode-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0;
    margin-bottom: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.mode-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mode-btn.active {
    background: linear-gradient(135deg, #00b894, #00cec9);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 206, 201, 0.3);
}

.auto-draw-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auto-draw-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.auto-draw-toggle input {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.auto-draw-toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.auto-draw-toggle input:checked + .toggle-slider::after {
    left: 26px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.auto-draw-interval {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.auto-draw-interval input {
    width: 50px;
    padding: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.add-winner-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-winner-section input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.winner-name {
    font-weight: 600;
    color: #ffeaa7;
}

.winner-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.plates-modal {
    max-width: 900px;
    min-width: 850px;
}

.plates-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.plates-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.plates-controls input {
    width: 60px;
    padding: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#plates-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.banko-plate {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    color: #333;
}

.banko-plate h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c5ce7;
}

.plate-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 3px;
}

.plate-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #f0f0f0;
    border-radius: 4px;
}

.plate-cell.empty {
    background: transparent;
}

.plate-cell.has-number {
    background: #e8e8e8;
}

body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 50%, #d1d8e0 100%);
    color: #2d3436;
}

body.light-theme .left-panel {
    background: rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .right-panel {
    background: rgba(255, 255, 255, 0.3);
}

body.light-theme .toolbar-btn,
body.light-theme .stat-item,
body.light-theme .auto-draw-section {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .stat-label,
body.light-theme .toggle-label,
body.light-theme .auto-draw-interval {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .stat-value {
    color: #6c5ce7;
}

body.light-theme .board {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .number {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #2d3436;
}

body.light-theme .drawn-number {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #6c5ce7 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-theme .slang {
    color: #e17055;
}

body.light-theme .previous-label {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .previous-numbers .prev-num {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .draw-section input,
body.light-theme .auto-draw-interval input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: #2d3436;
}

body.light-theme .history-modal {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    color: #2d3436;
}

body.light-theme .history-game,
body.light-theme .winner-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .game-mode-bar {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .mode-label {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .mode-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .mode-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #2d3436;
}

body.light-theme .mode-btn.active {
    background: linear-gradient(135deg, #00b894, #00cec9);
    border-color: transparent;
    color: #fff;
}

body.light-theme .number.called {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    border-color: transparent;
}

/* Tema: Jul */
body.theme-christmas {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a27 50%, #8b0000 100%);
}
body.theme-christmas .drawn-number {
    background: linear-gradient(135deg, #fff 0%, #ff6b6b 50%, #2ecc71 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.theme-christmas .slang { color: #ff6b6b; }
body.theme-christmas .stat-value { color: #2ecc71; }
body.theme-christmas .number.called {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    border-color: #2ecc71;
}

/* Tema: Fest */
body.theme-party {
    background: linear-gradient(135deg, #ff0084 0%, #33001b 50%, #ff0084 100%);
}
body.theme-party .drawn-number {
    background: linear-gradient(135deg, #fff 0%, #ffeaa7 50%, #ff0084 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.theme-party .slang { color: #ffeaa7; }
body.theme-party .stat-value { color: #ff9ff3; }
body.theme-party .number.called {
    background: linear-gradient(135deg, #ff0084, #ff6b6b);
    border-color: #ffeaa7;
}

/* Tema: Ocean */
body.theme-ocean {
    background: linear-gradient(135deg, #0c2461 0%, #1e3799 50%, #0a3d62 100%);
}
body.theme-ocean .drawn-number {
    background: linear-gradient(135deg, #fff 0%, #48dbfb 50%, #0abde3 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.theme-ocean .slang { color: #48dbfb; }
body.theme-ocean .stat-value { color: #00d2d3; }
body.theme-ocean .number.called {
    background: linear-gradient(135deg, #0abde3, #48dbfb);
    border-color: #00d2d3;
}

/* Tema: Guld */
body.theme-gold {
    background: linear-gradient(135deg, #2c2c54 0%, #40407a 50%, #2c2c54 100%);
}
body.theme-gold .drawn-number {
    background: linear-gradient(135deg, #ffd700 0%, #fff 50%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.theme-gold .slang { color: #ffd700; }
body.theme-gold .stat-value { color: #f9ca24; }
body.theme-gold .number.called {
    background: linear-gradient(135deg, #f9ca24, #ffd700);
    border-color: #ffd700;
}

@media print {
    body * {
        visibility: hidden;
    }
    #plates-content, #plates-content * {
        visibility: visible;
    }
    #plates-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .banko-plate {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.draw-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.draw-section input {
    padding: 16px 24px;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    width: 200px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.draw-section input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.draw-section input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 25px rgba(108, 92, 231, 0.4);
}

.button-primary {
    padding: 18px 50px;
    font-size: 18px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    box-shadow: 0 6px 20px rgba(0, 206, 201, 0.4);
}

.button-primary:hover {
    background: linear-gradient(135deg, #00cec9, #00b894);
    box-shadow: 0 10px 30px rgba(0, 206, 201, 0.5);
}

.right-panel {
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
    background: rgba(255, 255, 255, 0.02);
}

.board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    max-width: 600px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.number {
    padding: 10px 8px;
    font-size: 22px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.number:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.number.called {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 206, 201, 0.4);
    animation: pop 0.3s ease-out;
}

@keyframes pop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.slang {
    font-size: 28px;
    margin: 15px 0;
    font-weight: 600;
    text-align: center;
    color: #ffeaa7;
    text-shadow: 0 2px 10px rgba(255, 234, 167, 0.3);
    min-height: 40px;
}

.drawn-number {
    font-size: clamp(170px, 24vh, 250px);
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 50%, #6c5ce7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 30px rgba(108, 92, 231, 0.5));
    line-height: 1;
    min-height: clamp(170px, 24vh, 250px);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.previous-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

@media (max-width: 1500px) and (min-width: 1025px) {
    .toolbar-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .stat-item {
        padding: 6px 10px;
    }

    .stat-value {
        font-size: 16px;
    }

    .mode-label {
        font-size: 13px;
    }
}

.previous-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.previous-numbers {
    display: flex;
    gap: 12px;
    min-height: 60px;
    align-items: center;
}

.prev-num {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.prev-num:nth-child(1) {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    box-shadow: 0 4px 20px rgba(232, 67, 147, 0.4);
}

.prev-num:nth-child(2) {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    box-shadow: 0 4px 20px rgba(9, 132, 227, 0.4);
}

.prev-num:nth-child(3) {
    background: linear-gradient(135deg, #55efc4, #00b894);
    box-shadow: 0 4px 20px rgba(0, 184, 148, 0.4);
}

.prev-num:nth-child(4) {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    box-shadow: 0 4px 20px rgba(253, 203, 110, 0.4);
    color: #2d3436;
}

@keyframes slideIn {
    0% { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.8);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

.button {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin: 8px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.5);
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.button:active {
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


.confetti {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}
.banko-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 200px;
    font-weight: 900;
    text-align: center;
    z-index: 1001;
    display: none;
    letter-spacing: 0.2em;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd, #ff6b6b);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 1.5s linear infinite, banko-pulse 0.5s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(255, 107, 107, 0.8)) drop-shadow(0 0 80px rgba(84, 160, 255, 0.6));
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes banko-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
}

.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1001;
    display: none;
}

.history-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    max-height: 85vh;
    overflow-y: auto;
    min-width: 800px;
    display: none;
    color: #fff;
}

.history-modal::-webkit-scrollbar {
    width: 8px;
}

.history-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.history-modal::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.5);
    border-radius: 4px;
}

.history-modal h2 {
    margin: 0 0 20px 0;
    font-weight: 700;
    font-size: 28px;
    background: linear-gradient(135deg, #fff, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-game {
    padding: 20px;
    margin: 15px 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.history-game:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.history-game h3 {
    margin: 0 0 10px 0;
    color: #a29bfe;
    font-weight: 600;
    font-size: 18px;
}

.history-numbers {
    font-size: 14px;
    word-wrap: break-word;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.history-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-top: 15px;
    max-width: 100%;
}

.history-board .num {
    padding: 10px 6px;
    font-size: 18px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.history-board .num.called {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    font-weight: 700;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 206, 201, 0.3);
}

/* Slot machine animation */
.slot-spin {
    animation: slot-spin 0.08s ease-in-out;
}

.slot-land {
    animation: slot-land 0.3s ease-out;
}

@keyframes slot-spin {
    0% { transform: translateY(-5px); opacity: 0.7; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes slot-land {
    0% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin: 20px 0;
}

.stat-num {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 50px;
}

.stat-n {
    font-weight: 700;
    font-size: 14px;
}

.stat-f {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

/* Plate check */
#plate-numbers {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin: 15px 0;
    resize: vertical;
}

.check-summary {
    margin: 20px 0;
}

.check-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
}

.check-numbers span {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.check-numbers.matched span {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
}

.check-numbers.missing span {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.banko-alert {
    font-size: 24px;
    font-weight: 700;
    color: #ffeaa7;
    text-align: center;
    animation: pulse 0.5s ease-in-out infinite;
}

.error {
    color: #ff6b6b;
}

/* Mobil layout */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .left-panel, .right-panel {
        width: 100%;
        padding: 15px;
    }
    
    .left-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: auto;
        padding-top: 80px;
    }
    
    .toolbar-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 8px;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(10px);
        z-index: 100;
        align-items: center;
        gap: 4px;
    }
    
    .toolbar {
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .toolbar-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    .stats-group {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .stats-bar {
        transform: none;
        justify-content: center;
        margin-bottom: 10px;
        z-index: auto;
    }
    
    .stat-item {
        padding: 6px 10px;
    }
    
    .game-mode-bar {
        flex-direction: column;
        gap: 8px;
        padding: 10px 15px;
    }
    
    .mode-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .mode-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .drawn-number {
        font-size: 150px;
        min-height: 160px;
    }
    
    .slang {
        font-size: 20px;
    }
    
    .previous-numbers .prev-num {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .draw-section input {
        width: 160px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .board {
        padding: 10px;
        gap: 4px;
    }

    .right-panel {
        padding-top: 15px;
    }
    
    .number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .auto-draw-section {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .toolbar-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .drawn-number {
        font-size: 100px;
        min-height: 120px;
    }
    
    .previous-numbers .prev-num {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .number {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 85vh;
        padding: 15px;
    }
}

/* Pause overlay */
.pause-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.pause-overlay.active {
    display: flex;
}

.pause-content {
    text-align: center;
    animation: pause-pulse 2s ease-in-out infinite;
}

.pause-icon {
    font-size: 120px;
    margin-bottom: 20px;
}

.pause-content h1 {
    font-size: 80px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.pause-content p {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

@keyframes pause-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}

/* ===== DISCO MODE (Konami Code easter egg) ===== */
@keyframes disco-bg {
    0%   { background-color: #ff0055 !important; }
    14%  { background-color: #ff7700 !important; }
    28%  { background-color: #ffee00 !important; }
    42%  { background-color: #00dd44 !important; }
    57%  { background-color: #0088ff !important; }
    71%  { background-color: #8800ff !important; }
    85%  { background-color: #ff00cc !important; }
    100% { background-color: #ff0055 !important; }
}

@keyframes disco-number {
    0%   { color: #ff0055; text-shadow: 0 0 30px #ff0055, 0 0 60px #ff0055; }
    25%  { color: #ffee00; text-shadow: 0 0 30px #ffee00, 0 0 60px #ffee00; }
    50%  { color: #00ddff; text-shadow: 0 0 30px #00ddff, 0 0 60px #00ddff; }
    75%  { color: #ff00cc; text-shadow: 0 0 30px #ff00cc, 0 0 60px #ff00cc; }
    100% { color: #ff0055; text-shadow: 0 0 30px #ff0055, 0 0 60px #ff0055; }
}

@keyframes disco-cell {
    0%   { background: #ff0055; color: #fff; transform: scale(1.05); }
    20%  { background: #ff7700; color: #fff; transform: scale(0.95); }
    40%  { background: #ffee00; color: #333; transform: scale(1.05); }
    60%  { background: #00dd44; color: #fff; transform: scale(0.95); }
    80%  { background: #0088ff; color: #fff; transform: scale(1.05); }
    100% { background: #8800ff; color: #fff; transform: scale(0.95); }
}

@keyframes disco-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes disco-message {
    0%   { color: #ff0055; transform: translate(-50%, -50%) scale(1)   rotate(-3deg); }
    25%  { color: #ffee00; transform: translate(-50%, -50%) scale(1.1) rotate(3deg); }
    50%  { color: #00ddff; transform: translate(-50%, -50%) scale(1)   rotate(-3deg); }
    75%  { color: #ff00cc; transform: translate(-50%, -50%) scale(1.1) rotate(3deg); }
    100% { color: #ff0055; transform: translate(-50%, -50%) scale(1)   rotate(-3deg); }
}

body.disco-mode {
    animation: disco-bg 0.4s linear infinite;
}

body.disco-mode .left-panel,
body.disco-mode .right-panel {
    background: transparent !important;
}

body.disco-mode #drawn-number {
    animation: disco-number 0.3s linear infinite !important;
}

body.disco-mode .number-cell.called {
    animation: disco-cell 0.35s linear infinite !important;
}

body.disco-mode .toolbar {
    animation: disco-bg 0.25s linear infinite reverse;
}

#disco-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

#disco-overlay.active {
    display: block;
}

#disco-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    white-space: nowrap;
    animation: disco-message 0.25s linear infinite;
    -webkit-text-stroke: 2px #000;
}
