@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Noto+Sans+JP:wght@900&display=swap');

:root {
    --neon-red: #ff1053;
    --neon-blue: #00f0ff;
    --neon-yellow: #ffdf00;
    --neon-green: #39ff14;
    --bg-dark: #0a0a0a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Noto Sans JP', sans-serif;
    overflow: hidden;
    color: white;
}

.machine-container {
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a, #000);
    border-radius: 30px;
    box-shadow: 
        0 0 50px rgba(0, 0, 0, 0.8),
        inset 0 0 20px #555;
    position: relative;
    z-index: 10;
}

.neon-border {
    border: 4px solid var(--neon-red);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 0 10px var(--neon-red),
        inset 0 0 10px var(--neon-red);
    animation: neon-pulse 1.5s infinite alternate;
    text-align: center;
    background: radial-gradient(circle, #222 0%, #000 100%);
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 10px var(--neon-red), inset 0 0 10px var(--neon-red), 0 0 20px var(--neon-red);
        border-color: var(--neon-red);
    }
    100% {
        box-shadow: 0 0 20px var(--neon-blue), inset 0 0 20px var(--neon-blue), 0 0 40px var(--neon-blue);
        border-color: var(--neon-blue);
    }
}

.title {
    font-family: 'Black Ops One', cursive;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px #ff8c00;
    letter-spacing: 5px;
    animation: title-flicker 3s infinite;
}

@keyframes title-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px #ff8c00, 0 0 40px #ff8c00;
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: 0.5;
    }
}

.slot-machine {
    display: flex;
    gap: 20px;
    justify-content: center;
    background: #000;
    padding: 25px;
    border-radius: 15px;
    border: 4px solid #333;
    box-shadow: inset 0 0 30px rgba(0,0,0,1), 0 10px 20px rgba(0,0,0,0.5);
}

.reel-container {
    width: 140px;
    height: 180px;
    background: linear-gradient(to bottom, #777 0%, #fff 20%, #fff 80%, #777 100%);
    border-radius: 10px;
    border: 3px solid #555;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 
        inset 0 15px 20px rgba(0,0,0,0.6),
        inset 0 -15px 20px rgba(0,0,0,0.6);
    position: relative;
    cursor: pointer;
}

.reel {
    font-family: 'Black Ops One', cursive;
    font-size: 7rem;
    color: #cc0000;
    text-shadow: 3px 3px 5px rgba(0,0,0,0.4);
    transition: transform 0s, filter 0s, color 0.3s;
}

.reel.spinning {
    filter: blur(6px);
    color: #444;
}

.status-display {
    margin-top: 30px;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
    height: 40px;
    letter-spacing: 2px;
}

/* Jackpot Overlay */
.jackpot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(8px);
    opacity: 1;
    transition: opacity 0.5s;
}

.jackpot-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.jackpot-text {
    font-size: 8rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 4px white;
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: rainbow-text 2s ease infinite, scale-up-wobble 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
    transform: scale(0);
    text-align: center;
    line-height: 1.2;
}

@keyframes rainbow-text {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes scale-up-wobble {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(-5deg); }
}

/* 背景フラッシュ */
.flash-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1;
    pointer-events: none;
}

body.jackpot-active .flash-bg {
    animation: hyper-flash 1s linear infinite;
}

@keyframes hyper-flash {
    0%, 100% { background-color: rgba(0,0,0,0); }
    10%, 30%, 50%, 70%, 90% { background-color: rgba(255, 255, 255, 0.3); }
    20%, 60% { background-color: rgba(255, 16, 83, 0.4); }
    40%, 80% { background-color: rgba(0, 240, 255, 0.4); }
}
