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

body {
    font-family: 'Impact', 'Arial Black', sans-serif;
    background: radial-gradient(circle at center, #1a0033, #000000);
    min-height: 100vh;
    padding: 10px;
    overflow: auto;
}

.background-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.light {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 4s infinite ease-in-out;
}

.light1 { background: rgba(255, 0, 255, 0.3); top: 10%; left: 10%; animation-delay: 0s; }
.light2 { background: rgba(0, 255, 255, 0.3); top: 60%; right: 10%; animation-delay: 1s; }
.light3 { background: rgba(255, 255, 0, 0.3); bottom: 10%; left: 50%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

.game-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    gap: 15px;
    flex-wrap: wrap;
}

.back-btn {
    padding: 10px 20px;
    background: linear-gradient(145deg, #444, #666);
    color: #FFF;
    border: 3px solid #FFD700;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(145deg, #555, #777);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

.user-name {
    color: #FFD700;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    letter-spacing: 2px;
    flex: 1;
    text-align: center;
}

.display-name-container {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.display-name {
    color: #FFD700;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    letter-spacing: 3px;
    animation: nameGlow 2s infinite alternate;
}

@keyframes nameGlow {
    0% { text-shadow: 0 0 15px rgba(255, 215, 0, 0.9); }
    100% { text-shadow: 0 0 25px rgba(255, 215, 0, 1), 0 0 35px rgba(255, 215, 0, 0.7); }
}

.display-image-container {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.display-image {
    max-height: 150px;
    max-width: 500px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    animation: imageGlow 2s infinite alternate;
}

@keyframes imageGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.6)); }
}

.logout-btn {
    background: linear-gradient(145deg, #FF4444, #CC0000) !important;
}

.machine-container {
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, #8B0000, #FF1744, #8B0000);
    border-radius: 30px;
    padding: 12px;
    box-shadow: 
        0 0 50px rgba(255, 0, 100, 0.8),
        0 0 100px rgba(255, 0, 100, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    border: 8px solid #FFD700;
    animation: machineGlow 2s infinite alternate;
    max-width: 900px;
    margin: auto;
}

@keyframes machineGlow {
    0% { box-shadow: 0 0 50px rgba(255, 0, 100, 0.8), 0 0 100px rgba(255, 0, 100, 0.5); }
    100% { box-shadow: 0 0 80px rgba(255, 0, 100, 1), 0 0 150px rgba(255, 0, 100, 0.7); }
}

.neon-border {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 35px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF1744, #FFD700);
    background-size: 300% 300%;
    animation: borderFlow 3s linear infinite;
    z-index: -1;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.inner-box {
    background: linear-gradient(180deg, #1a1a1a, #000000);
    border-radius: 20px;
    padding: 20px;
    border: 5px solid #333;
    box-shadow: inset 0 5px 30px rgba(255, 215, 0, 0.3);
}

h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #FFD700, #FFF, #FFD700, #FFF);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 2s linear infinite;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 5px;
}

@keyframes textShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.subtitle {
    text-align: center;
    color: #FF1744;
    font-size: 1em;
    margin-bottom: 15px;
    animation: pulse 1.5s infinite;
    text-shadow: 0 0 10px #FF1744;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.led-lights {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.led {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    animation: ledBlink 1s infinite;
}

.led:nth-child(1) { background: #FF0000; animation-delay: 0s; }
.led:nth-child(2) { background: #00FF00; animation-delay: 0.2s; }
.led:nth-child(3) { background: #0000FF; animation-delay: 0.4s; }
.led:nth-child(4) { background: #FFFF00; animation-delay: 0.6s; }
.led:nth-child(5) { background: #FF00FF; animation-delay: 0.8s; }

@keyframes ledBlink {
    0%, 100% { box-shadow: 0 0 5px currentColor; opacity: 1; }
    50% { box-shadow: 0 0 20px currentColor; opacity: 0.5; }
}

.info-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.lives-container {
    display: flex;
    gap: 15px;
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    padding: 15px 25px;
    border-radius: 15px;
    border: 3px solid #FFD700;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.heart {
    font-size: 2.5em;
    transition: all 0.3s ease;
    animation: heartBeat 1.5s infinite;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

.heart.full {
    color: #FF1744;
    text-shadow: 0 0 15px #FF1744, 0 0 25px #FF1744;
}

.heart.empty {
    color: #444;
    opacity: 0.3;
    animation: none;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.2));
}

.heart.lost {
    animation: heartLost 0.5s ease-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

@keyframes heartLost {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 0.5; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.slot-display {
    background: linear-gradient(180deg, #000, #1a1a1a, #000);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    border: 5px solid #FFD700;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        inset 0 5px 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

.slot-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1), transparent);
    border-radius: 20px 20px 0 0;
}

.slots-container {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.slot-wrapper {
    position: relative;
}

.slot {
    width: 100px;
    height: 130px;
    background: linear-gradient(180deg, #FFF, #F0F0F0, #FFF);
    border: 6px solid #000;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 65px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 5px 15px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.slot-symbol-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    image-rendering: auto;
}

.slot-placeholder {
    font-size: 3em;
    color: #999;
    font-weight: bold;
}

.slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: slotShine 3s infinite;
}

@keyframes slotShine {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

.slot.spinning {
    animation: spinSlot 0.08s linear infinite;
}

@keyframes spinSlot {
    0% { transform: translateY(0); filter: blur(2px); }
    50% { transform: translateY(-10px); filter: blur(3px); }
    100% { transform: translateY(0); filter: blur(2px); }
}

.slot.winner {
    animation: slotWin 0.5s ease-in-out 3;
    box-shadow: 0 0 50px #FFD700, 0 0 80px #FFD700;
}

@keyframes slotWin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.spin-button {
    display: block;
    margin: 0 auto;
    width: 250px;
    height: 80px;
    background: linear-gradient(145deg, #FF0000, #FF4444, #FF0000);
    color: #FFF;
    border: 6px solid #FFD700;
    border-radius: 50px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 10px 40px rgba(255, 0, 0, 0.6),
        inset 0 3px 10px rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
    animation: buttonPulse 2s infinite;
    letter-spacing: 3px;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 10px 40px rgba(255, 0, 0, 0.6); }
    50% { box-shadow: 0 10px 60px rgba(255, 0, 0, 1), 0 0 40px rgba(255, 0, 0, 0.8); }
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 60px rgba(255, 0, 0, 1);
}

.spin-button:active:not(:disabled) {
    transform: translateY(0) scale(1);
}

.spin-button:disabled {
    background: linear-gradient(145deg, #555, #666, #555);
    cursor: not-allowed;
    animation: none;
}

.message-display {
    text-align: center;
    margin-top: 25px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message {
    font-size: 2.5em;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 15px;
    animation: messageAppear 0.5s;
}

@keyframes messageAppear {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.message.jackpot {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    animation: jackpotWin 0.6s infinite;
    box-shadow: 0 0 50px #FFD700;
}

@keyframes jackpotWin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-3deg); }
    75% { transform: scale(1.2) rotate(3deg); }
}

.message.win {
    background: linear-gradient(45deg, #00FF00, #00CC00);
    color: #000;
    animation: winPulse 0.5s infinite;
    box-shadow: 0 0 30px #00FF00;
}

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

.message.lose {
    color: #FF4444;
    text-shadow: 0 0 20px #FF4444;
}

.fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: explode 1s ease-out forwards;
}

@keyframes explode {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; }
}

