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

:root {
    --bg-dark: #0f0f1a;
    --bg-gradient-1: #1a1a2e;
    --bg-gradient-2: #16213e;
    --neon-pink: #ff006e;
    --neon-cyan: #00f5d4;
    --gold: #d4af37;
    --chrome: #c0c0c0;
    --dark-chrome: #888;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-dark) 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    position: relative;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    z-index: 1000;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
    z-index: 1;
}

.neon-sign {
    position: relative;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 4px solid var(--gold);
    border-radius: 10px;
    box-shadow: 
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-cyan),
        inset 0 0 20px rgba(255, 0, 110, 0.1);
    animation: signGlow 2s ease-in-out infinite alternate;
}

@keyframes signGlow {
    from { box-shadow: 0 0 20px var(--neon-pink), 0 0 40px var(--neon-cyan), inset 0 0 20px rgba(255, 0, 110, 0.1); }
    to { box-shadow: 0 0 30px var(--neon-pink), 0 0 60px var(--neon-cyan), inset 0 0 30px rgba(255, 0, 110, 0.2); }
}

.title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 8vw, 4rem);
    letter-spacing: 0.1em;
    background: linear-gradient(180deg, #fff 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--neon-pink);
    animation: titlePulse 1.5s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.title-icons {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-top: 0.5rem;
    animation: iconBounce 1s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.subtitle {
    font-family: 'VT323', monospace;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: var(--neon-cyan);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1;
    width: 100%;
    max-width: 800px;
}

.slot-machine {
    background: linear-gradient(180deg, #3a3a4e 0%, #2a2a3e 50%, #1a1a2e 100%);
    border: 6px solid var(--chrome);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 
        inset 0 2px 10px rgba(255, 255, 255, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 0, 110, 0.2);
    position: relative;
    width: 100%;
    max-width: 500px;
}

.slot-machine.shake {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-1deg); }
    75% { transform: translateX(10px) rotate(1deg); }
}

.machine-top {
    margin-bottom: 1rem;
}

.result-display {
    background: #0a0a14;
    border: 4px solid var(--dark-chrome);
    border-radius: 10px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.result-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--neon-cyan);
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    animation: placeholderPulse 2s ease-in-out infinite;
}

.placeholder span:first-child {
    font-size: 3rem;
}

@keyframes placeholderPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--neon-pink);
}

.tire-spin {
    font-size: 4rem;
    animation: tireSpin 0.5s linear infinite;
}

@keyframes tireSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    animation: blink 0.5s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.result-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: revealImage 0.5s ease-out;
}

@keyframes revealImage {
    from { 
        opacity: 0;
        transform: scale(1.1);
        filter: brightness(2);
    }
    to { 
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

.special-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.5rem 1rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1rem, 4vw, 1.5rem);
    text-align: center;
    border-radius: 5px;
    animation: bannerPop 0.5s ease-out;
    white-space: nowrap;
}

.special-banner.jackpot {
    background: linear-gradient(90deg, var(--gold), #fff, var(--gold));
    color: #000;
    box-shadow: 0 0 30px var(--gold);
}

.special-banner.original {
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
    color: #fff;
    box-shadow: 0 0 30px var(--neon-cyan);
}

@keyframes bannerPop {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.machine-body {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.reels-container {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.reel {
    flex: 1;
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a14 100%);
    border: 3px solid var(--dark-chrome);
    border-radius: 8px;
    padding: 1rem 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
    z-index: 1;
}

.reel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(0deg, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
    z-index: 1;
}

.reel.spinning .reel-inner {
    animation: reelSpin 0.1s linear infinite;
    filter: blur(2px);
}

@keyframes reelSpin {
    from { transform: translateY(-10px); }
    to { transform: translateY(10px); }
}

.reel-inner {
    position: relative;
    z-index: 2;
}

.car-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.car-name {
    font-family: 'VT323', monospace;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: var(--neon-cyan);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.half-label {
    font-size: 0.6rem;
    color: var(--neon-pink);
    letter-spacing: 0.1em;
}

.reel-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scissors {
    font-size: 1.5rem;
    animation: scissorSnip 1s ease-in-out infinite;
}

@keyframes scissorSnip {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.lever-container {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    position: relative;
}

.lever-track {
    width: 8px;
    height: 100px;
    background: linear-gradient(90deg, #444, #666, #444);
    border-radius: 4px;
    position: absolute;
    bottom: 20px;
}

.lever-arm {
    width: 6px;
    height: 60px;
    background: linear-gradient(90deg, #888, #ccc, #888);
    border-radius: 3px;
    position: absolute;
    bottom: 50px;
    transition: transform 0.2s ease-out;
    transform-origin: bottom center;
}

.lever-container.pulled .lever-arm {
    transform: translateY(30px);
}

.lever-ball {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ff4444, #aa0000);
    border-radius: 50%;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 
        inset -2px -2px 5px rgba(0,0,0,0.3),
        2px 2px 10px rgba(0,0,0,0.5);
}

.lever-container:hover .lever-ball {
    box-shadow: 
        inset -2px -2px 5px rgba(0,0,0,0.3),
        2px 2px 10px rgba(0,0,0,0.5),
        0 0 15px var(--neon-pink);
}

.result-info {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.hybrid-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
    animation: nameGlow 1s ease-in-out infinite alternate;
}

@keyframes nameGlow {
    from { text-shadow: 0 0 10px var(--gold); }
    to { text-shadow: 0 0 20px var(--gold), 0 0 30px var(--neon-pink); }
}

.hybrid-price {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: var(--neon-cyan);
    margin-top: 0.3rem;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.spin-button {
    flex: 1;
    padding: 1rem 2rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    background: linear-gradient(180deg, #ff3366 0%, #cc0044 100%);
    color: white;
    border: 4px solid var(--gold);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 0 #880022,
        0 6px 20px rgba(255, 0, 110, 0.3);
}

.spin-button:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #880022,
        0 8px 30px rgba(255, 0, 110, 0.5);
}

.spin-button:active:not(.disabled) {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #880022,
        0 4px 10px rgba(255, 0, 110, 0.3);
}

.spin-button.disabled {
    background: linear-gradient(180deg, #555 0%, #333 100%);
    cursor: not-allowed;
    box-shadow: 0 4px 0 #222;
}

.coin-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(180deg, #2a2a2e 0%, #1a1a1e 100%);
    border: 2px solid var(--gold);
    border-radius: 8px;
}

.coin-icon {
    font-size: 1.5rem;
    animation: coinSpin 3s linear infinite;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

.coin-count {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--gold);
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: var(--chrome);
    z-index: 1;
}

.gallery-button {
    padding: 0.5rem 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    background: linear-gradient(180deg, var(--neon-cyan) 0%, #00a896 100%);
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.gallery-content {
    background: var(--bg-gradient-1);
    border: 4px solid var(--gold);
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 2px solid var(--dark-chrome);
}

.gallery-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--gold);
}

.close-gallery {
    width: 40px;
    height: 40px;
    background: var(--neon-pink);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-gallery:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--neon-pink);
}

.gallery-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.empty-gallery {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--chrome);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
}

.gallery-item {
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--dark-chrome);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.gallery-item:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1.5;
    object-fit: cover;
}

.gallery-item-name {
    padding: 0.3rem;
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: var(--gold);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-combo {
    padding: 0 0.3rem 0.3rem;
    font-size: 0.6rem;
    color: var(--chrome);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: var(--chrome);
    z-index: 1;
}

.footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer a:hover {
    text-shadow: 0 0 10px var(--neon-cyan);
}

.disclaimer {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3000;
    overflow: hidden;
}

.confetti-particle {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 500px) {
    .slot-machine {
        padding: 1rem;
    }
    
    .lever-container {
        display: none;
    }
    
    .result-display {
        min-height: 150px;
    }
    
    .reel {
        padding: 0.5rem;
    }
    
    .car-icon {
        font-size: 1.5rem;
    }
}