@import url('theme.css');

/* Spinner */
.spinner-container {
    margin: var(--spacing-xl) 0;
    position: relative;
    padding: 20px 0;
}

.spinner-bar {
    height: 40px;
    background: #333;
    border: 4px solid #fff;
    display: flex;
    position: relative;
    overflow: hidden;
}

.spinner-zone {
    height: 100%;
}

.zone-loss {
    background: repeating-linear-gradient(45deg, #500, #500 10px, #300 10px, #300 20px);
    width: 35%;
}

.zone-win {
    background: var(--neon-green);
    width: 30%;
    box-shadow: 0 0 15px var(--neon-green);
    z-index: 1;
}

.spinner-cursor {
    position: absolute;
    top: -10px;
    left: 0%;
    font-size: 24px;
    color: var(--neon-yellow);
    text-shadow: 0 0 5px #000;
    transform: translateX(-50%);
    transition: left 0.05s linear;
}

.minigame-controls {
    margin-top: var(--spacing-lg);
}

.minigame-result {
    margin-top: var(--spacing-md);
    min-height: 20px;
    font-size: 14px;
}

.result-win {
    color: var(--neon-green);
}

.result-loss {
    color: #ff0000;
}

/* Trigger button embedded in upgrade card */
.minigame-btn-container {
    margin-left: auto;
    padding-left: var(--spacing-sm);
    flex-shrink: 0;
}

.minigame-trigger-btn {
    background: #000;
    border: 2px solid var(--neon-yellow);
    color: var(--neon-yellow);
    font-family: var(--font-pixel);
    font-size: 8px;
    padding: 4px 8px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
    cursor: var(--cursor-pointer);
}

.minigame-trigger-btn:hover {
    background: var(--neon-yellow);
    color: #000;
}

.minigame-trigger-btn:disabled {
    border-color: #555;
    color: #555;
    animation: none;
    cursor: var(--cursor-disabled);
    background: #000;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 0, 0);
    }
}

/* Lootbox reel */
.reel-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    border: 4px solid var(--neon-pink);
    background: #000;
    box-shadow: 0 0 10px var(--neon-pink);
}

.reel-container {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: relative;
    background: #111;
}

.reel-track {
    display: flex;
    height: 100%;
    align-items: center;
    will-change: transform;
}

.reel-item {
    width: 80px;
    height: 80px;
    margin: 0 5px;
    flex-shrink: 0;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #222;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.reel-item.item-common {
    border-color: #555;
    color: #888;
}

.reel-item.item-rare {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.reel-item.item-legendary {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    box-shadow: inset 0 0 10px rgba(255, 255, 0, 0.2);
    animation: glow 1s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: inset 0 0 5px var(--neon-yellow);
    }

    to {
        box-shadow: inset 0 0 15px var(--neon-yellow);
    }
}

.reel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--neon-green);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 5px var(--neon-green);
}

.reel-pointer::before {
    content: '?';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--neon-green);
    font-size: 20px;
}

.reel-pointer::after {
    content: '?';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--neon-green);
    font-size: 20px;
}

/* Flavor mixer */
.flavormixer-container {
    padding: var(--spacing-lg) 0;
}

.mixer-visual {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.flavor-sequence,
.player-input {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: #000;
    border: 2px solid var(--neon-cyan);
}

.sequence-label,
.input-label {
    font-size: 10px;
    color: var(--neon-cyan);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.sequence-display {
    min-height: 30px;
    font-size: 24px;
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.flavor-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.flavor-btn {
    background: #000;
    border: 4px solid;
    padding: var(--spacing-md);
    font-family: var(--font-pixel);
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.1s;
    box-shadow: 4px 4px 0 #000;
    cursor: var(--cursor-pointer);
}

.flavor-btn.cherry {
    border-color: #ff0066;
    color: #ff0066;
}

.flavor-btn.cherry:hover:not(:disabled) {
    background: #ff0066;
    color: #000;
    box-shadow: 6px 6px 0 #000;
    transform: translate(-2px, -2px);
}

.flavor-btn.vanilla {
    border-color: #ffe4b5;
    color: #ffe4b5;
}

.flavor-btn.vanilla:hover:not(:disabled) {
    background: #ffe4b5;
    color: #000;
    box-shadow: 6px 6px 0 #000;
    transform: translate(-2px, -2px);
}

.flavor-btn.cola {
    border-color: #8b4513;
    color: #8b4513;
}

.flavor-btn.cola:hover:not(:disabled) {
    background: #8b4513;
    color: #fff;
    box-shadow: 6px 6px 0 #000;
    transform: translate(-2px, -2px);
}

.flavor-btn.lime {
    border-color: #00ff00;
    color: #00ff00;
}

.flavor-btn.lime:hover:not(:disabled) {
    background: #00ff00;
    color: #000;
    box-shadow: 6px 6px 0 #000;
    transform: translate(-2px, -2px);
}

.flavor-btn:disabled {
    opacity: 0.5;
    cursor: var(--cursor-disabled);
    transform: none;
    box-shadow: none;
}

.flavor-btn:active:not(:disabled) {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 #000;
}

.mixer-timer {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: #000;
    border: 2px solid var(--neon-yellow);
}

.timer-label {
    font-size: 10px;
    color: var(--neon-yellow);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.countdown-display {
    font-size: 32px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.countdown-display.warning {
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
    animation: timerPulse 0.5s infinite;
}

/* Delivery dispatch */
.traffic-light-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.traffic-light {
    background: #000;
    padding: 15px;
    border: 4px solid #555;
    display: flex;
    gap: 15px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.light {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #222;
    transition: all 0.1s;
}

.light.red.active {
    background: #ff0000;
    box-shadow: 0 0 20px #ff0000;
}

.light.yellow.active {
    background: #ffff00;
    box-shadow: 0 0 20px #ffff00;
}

.light.green.active {
    background: #00ff00;
    box-shadow: 0 0 20px #00ff00;
}

.delivery-status {
    font-size: 18px;
    margin: 20px 0;
}

.delivery-controls {
    margin-top: 20px;
}

/* Shared cursor consistency for minigame actions */
#minigame-action-btn,
#delivery-action-btn,
.lootbox-controls button,
.delivery-controls button {
    cursor: var(--cursor-pointer);
}
