* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 3rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 10px #ffd700; }
    to { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 20px #ffd700, 0 0 30px #ffd700; }
}

.balance-display {
    font-size: 1.5rem;
    color: #00ff00;
    font-weight: bold;
}

.game-area {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.slot-machine {
    flex: 2;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="20" fill="%23ffd700" opacity="0.1">❄️</text></svg>') repeat;
    pointer-events: none;
}

.reels-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.reel {
    flex: 1;
    height: 300px;
    background: linear-gradient(180deg, #34495e, #2c3e50);
    border-radius: 15px;
    border: 3px solid #ffd700;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.symbol {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.symbol.winning {
    animation: winPulse 0.5s ease-in-out;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    font-weight: bold;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.paylines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.payline {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #ffff00, #ff0000);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px #ff0000;
}

.payline.active {
    opacity: 1;
    animation: paylineGlow 1s ease-in-out;
}

@keyframes paylineGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#payline1 {
    top: 50px;
    left: 0;
    right: 0;
}

#payline2 {
    top: 150px;
    left: 0;
    right: 0;
}

#payline3 {
    top: 250px;
    left: 0;
    right: 0;
}

.controls {
    flex: 1;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.bet-controls {
    margin-bottom: 30px;
}

.bet-controls label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.bet-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.bet-btn {
    padding: 12px 8px;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.bet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.bet-btn.active {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    transform: scale(1.05);
}

.current-bet {
    text-align: center;
    font-size: 1.1rem;
    color: #00ff00;
    font-weight: bold;
}

.spin-controls {
    margin-bottom: 30px;
}

.spin-button {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.spin-button:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

.max-bet-button {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background: linear-gradient(145deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.max-bet-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.win-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(145deg, #27ae60, #2ecc71);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.win-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.win-message {
    font-size: 1.2rem;
    color: #fff;
    font-weight: bold;
}

.game-info {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.paytable h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffd700;
    font-size: 1.5rem;
}

.paytable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.paytable-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.symbol-icon {
    font-size: 1.5rem;
}

/* Анимации для вращения барабанов */
.reel.spinning .symbol {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .reels-container {
        gap: 5px;
    }
    
    .reel {
        height: 200px;
    }
    
    .symbol {
        height: 66px;
        font-size: 2rem;
    }
    
    .bet-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Эффекты частиц для выигрыша */
.win-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    animation: particleFall 2s linear forwards;
}

@keyframes particleFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(360deg);
        opacity: 0;
    }
}
