/* Game Reactor Styles - Extracted from game_reactor.html */
:root {
    /* Map Legacy Variables to Premium Theme */
    --bg-dark-primary: var(--bg-app);
    /* #09090b or #000000 */
    --bg-dark-secondary: var(--bg-surface);
    /* #18181b */
    --bg-dark-tertiary: var(--bg-glass);
    /* Glassy background */

    --yellow-primary: var(--gold-primary);
    /* #fbbf24 */
    --yellow-hover: var(--gold-hover);
    /* #f59e0b */

    --text-light: var(--text-primary);
    /* #f4f4f5 */
    --text-dark: var(--text-secondary);
    /* #a1a1aa */

    --bg-glass-panel: var(--bg-glass);
    /* Glassy panel background */
    --border-glass: rgba(255, 255, 255, 0.08);
    /* Consistent border */

    /* Keep game-specific flame colors */
    --flame-yellow: #fef08a;
    --flame-orange: #f97316;
}

body {
    font-family: 'Exo 2', sans-serif;
    overflow: hidden;
    background-color: var(--bg-dark-primary);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #0a0a23 0%, #00001a 100%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    filter: brightness(1.1);
}

.loader {
    border: 4px solid #f3f3f340;
    border-top: 4px solid var(--yellow-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#multiplier-display {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

#multiplier-display.text-red-500 {
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.canvas-overlay-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 5vw;
    text-transform: uppercase;
}

.bet-btn {
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-weight: 800;
}

.bet-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.bet-btn:disabled {
    filter: grayscale(80%);
    opacity: 0.6;
}

@media (max-width: 1024px) {
    .bet-panel {
        width: 100% !important;
    }

    #gameCanvas {
        height: 50vh;
    }

    .game-container {
        flex-direction: column;
        height: 100vh;
    }

    .controls-column {
        height: 50vh;
    }

    #history-bar {
        display: none;
    }
}

.input-bet-styled {
    background-color: var(--bg-dark-primary);
    border: 1px solid var(--bg-dark-tertiary);
    color: var(--yellow-primary);
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    width: 100%;
}

.input-bet-styled:focus {
    outline: none;
    border-color: var(--yellow-primary);
}

.input-bet-styled::-webkit-outer-spin-button,
.input-bet-styled::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-bet-styled {
    -moz-appearance: textfield;
}

.mod-btn {
    background-color: var(--bg-dark-tertiary);
    color: var(--text-light);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.125rem 0.25rem;
    text-align: center;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.mod-btn:hover:not(:disabled) {
    background-color: #4a4d5e;
}

.quick-bet-btn {
    background-color: var(--bg-dark-tertiary);
    color: var(--text-light);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.125rem 0.25rem;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.quick-bet-btn:hover:not(:disabled) {
    background-color: #4a4d5e;
    color: var(--yellow-primary);
}

.btn-yellow-primary {
    background-color: var(--yellow-primary);
    color: var(--bg-dark-primary);
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.btn-yellow-primary:hover {
    background-color: var(--yellow-hover);
}

.btn-gradient-yellow {
    background-image: linear-gradient(to right, #facc15, #eab308);
    color: var(--bg-dark-primary);
}

.btn-gradient-yellow:hover {
    background-image: linear-gradient(to right, #eab308, #facc15);
}

.btn-gradient-red {
    background-image: linear-gradient(to right, #ef4444, #dc2626);
    color: white;
}

.btn-gradient-red:hover {
    background-image: linear-gradient(to right, #dc2626, #ef4444);
}

.btn-gradient-blue {
    background-image: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.btn-gradient-blue:hover {
    background-image: linear-gradient(to right, #2563eb, #3b82f6);
}

.btn-dark-toggle {
    background-color: var(--bg-dark-tertiary);
    color: var(--text-light);
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.btn-dark-toggle:hover {
    background-color: #4a4d5e;
}

.tab-btn {
    background-color: transparent;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: var(--bg-dark-tertiary);
    color: var(--text-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tab-btn:not(.active):hover {
    color: var(--text-light);
}

#all-bets-panel-container {
    scrollbar-gutter: stable;
}

#plane-flame {
    width: 50px;
    height: 20px;
    background: linear-gradient(to right, var(--flame-yellow), var(--flame-orange));
    border-radius: 50% 0 0 50%;
    transform-origin: 100% 50%;
    box-shadow: 0 0 15px 5px var(--flame-orange);
    filter: blur(3px);
    animation: flicker 0.1s infinite alternate;
    opacity: 0;
    /* Xóa transition, dùng JS để điều khiển opacity để tránh flicker khi khởi tạo */
}

.flame-blue {
    background: linear-gradient(to right, #60a5fa, #2563eb) !important;
    box-shadow: 0 0 20px 7px #2563eb !important;
}

.flame-purple {
    background: linear-gradient(to right, #c084fc, #7e22ce) !important;
    box-shadow: 0 0 20px 7px #7e22ce !important;
}

/* [NÂNG CẤP] Lửa cầu vồng siêu xịn (100x) */
.flame-rainbow {
    /* 7 màu: Đỏ, Cam, Vàng, Lục, Lam, Tím, Đỏ */
    background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000) !important;
    background-size: 400% 100% !important;
    /* Thêm animation pulse cho shadow */
    animation-name: flicker, rainbow-flow, rainbow-pulse !important;
    animation-duration: 0.1s, 2s, 1s !important;
    animation-iteration-count: infinite, infinite, infinite !important;
    animation-timing-function: linear, linear, ease-in-out !important;
    animation-direction: alternate, normal, alternate !important;
}

@keyframes flicker {
    0% {
        transform: scale(1, 1);
    }

    50% {
        transform: scale(1.2, 0.8);
    }

    100% {
        transform: scale(0.9, 1.1);
    }
}

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

    100% {
        background-position: 100% 50%;
    }
}

/* [NÂNG CẤP] Animation pulse cho shadow 100x */
@keyframes rainbow-pulse {
    0% {
        box-shadow: 0 0 20px 7px #ffffff, 0 0 30px 10px #ff0000;
    }

    50% {
        box-shadow: 0 0 25px 10px #ffffff, 0 0 35px 15px #0000ff;
    }

    100% {
        box-shadow: 0 0 20px 7px #ffffff, 0 0 30px 10px #00ff00;
    }
}

/* [XÓA] Xóa #plane-prismatic-core */

/* [XÓA] Xóa hiệu ứng CSS, thay bằng JS */
#explosion-effect {
    display: none;
}

@keyframes screen-shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translate(-5px, 5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translate(5px, -5px);
    }
}

.controls-column::-webkit-scrollbar,
#bet-panels-container::-webkit-scrollbar {
    display: none;
}

.controls-column,
#bet-panels-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#history-bar::-webkit-scrollbar,
#history-bar-mobile::-webkit-scrollbar {
    display: none;
}

#history-bar,
#history-bar-mobile {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (min-width: 1024px) {

    .mod-btn,
    .quick-bet-btn {
        padding: 0.25rem;
    }
}