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

body {
    font-family: 'Orbitron', sans-serif;
    background: #08080c;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(180deg, #0d0d12 0%, #08080c 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 32px;
    animation: pulse 2s ease-in-out infinite;
}

.logo-text {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #00ff88 0%, #00aaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

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

/* Balance Display */
.balance-display {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 170, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.balance-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.balance-value {
    font-size: 26px;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transition: all 0.3s ease;
}

.balance-value.flash {
    animation: balanceFlash 0.3s ease;
}

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

/* Control Groups */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* Bet Input */
.bet-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.bet-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 12px 12px 28px;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    transition: all 0.3s ease;
}

.bet-input:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
}

.quick-bet-buttons {
    display: flex;
    gap: 8px;
}

.quick-bet {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-bet:hover {
    background: rgba(0, 170, 255, 0.2);
    border-color: #00aaff;
    color: #00aaff;
}

/* Risk Buttons */
.risk-buttons {
    display: flex;
    gap: 8px;
}

.risk-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 8px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.risk-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.risk-btn[data-risk="low"].active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.risk-btn[data-risk="medium"].active {
    background: rgba(255, 200, 0, 0.2);
    border-color: #ffc800;
    color: #ffc800;
    box-shadow: 0 0 20px rgba(255, 200, 0, 0.3);
}

.risk-btn[data-risk="high"].active {
    background: rgba(255, 0, 68, 0.2);
    border-color: #ff0044;
    color: #ff0044;
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.3);
}

/* Row Slider */
.row-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
}

.row-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00aaff 0%, #0066ff 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
    transition: transform 0.2s ease;
}

.row-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Drop Button */
.drop-button {
    position: relative;
    background: linear-gradient(135deg, #00cc66 0%, #00ff88 100%);
    border: none;
    border-radius: 12px;
    padding: 18px 24px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.drop-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.6);
}

.drop-button:active {
    transform: translateY(0);
}

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

.drop-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Last Win */
.last-win {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.last-win.show {
    opacity: 1;
    animation: winPop 0.4s ease;
}

@keyframes winPop {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.last-win-label {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.last-win-multiplier {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #ffcc00;
}

.last-win-amount {
    display: block;
    font-size: 14px;
    color: #00ff88;
    margin-top: 4px;
}

/* Reset Button */
.reset-button {
    margin-top: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-button:hover {
    border-color: #ff4444;
    color: #ff4444;
}

/* Game Area */
#gameArea {
    flex: 1;
    position: relative;
    background: radial-gradient(ellipse at center top, #12121a 0%, #08080c 100%);
    overflow: hidden;
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Footer */
footer {
    position: fixed;
    bottom: 10px;
    right: 20px;
    z-index: 100;
}

footer a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #ff6b9d;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        min-width: auto;
        padding: 15px;
        gap: 12px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .logo {
        justify-content: center;
    }
    
    .balance-display {
        padding: 12px;
    }
    
    .balance-value {
        font-size: 22px;
    }
    
    .risk-buttons, .quick-bet-buttons {
        gap: 6px;
    }
    
    .drop-button {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    #gameArea {
        min-height: 60vh;
    }
    
    footer {
        position: relative;
        text-align: center;
        padding: 15px;
        bottom: auto;
        right: auto;
    }
}

@media (max-width: 400px) {
    #sidebar {
        padding: 12px;
    }
    
    .logo-text {
        font-size: 22px;
    }
    
    .balance-value {
        font-size: 20px;
    }
}