:root {
    --glow-color: rgba(255, 255, 255, 0.8);
    --grid-color: rgba(255, 255, 255, 0.05);
}

body {
    background-color: #000000;
    color: #FFFFFF;
    font-family: 'IBM Plex Mono', monospace;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    cursor: crosshair;
}

.blueprint-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.circuit-trace {
    position: absolute;
    background: white;
    opacity: 0.1;
    box-shadow: 0 0 8px white;
}

.module-border {
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.module-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid white;
    border-left: 2px solid white;
}

.module-border::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
}

.glow-text {
    text-shadow: 0 0 10px var(--glow-color);
}

.active-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 5px white;
    }

    50% {
        opacity: .7;
        box-shadow: 0 0 20px white;
    }
}

.scanline {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(255, 255, 255, 0.02) 50%);
    background-size: 100% 4px;
    position: fixed;
    pointer-events: none;
    z-index: 50;
}

/* ===== NEON BULB / SPARK ANIMATION ===== */
@keyframes neon-flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.6));
    }

    20%,
    22%,
    24%,
    55% {
        opacity: 0.8;
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
    }
}

.neon-anim-svg {
    animation: neon-flicker 5s infinite alternate;
}

/* ===== SUCCESSES VIDEO CARDS (Dynamic from JS) ===== */
.success-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.success-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.success-video-wrap {
    aspect-ratio: 9/16;
    background: #111;
    position: relative;
    overflow: hidden;
}

.success-video-wrap iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border: none;
}

.success-card-content {
    padding: 1rem 0.5rem;
    text-align: center;
}

.success-card-title {
    font-size: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* Local video controls */
.local-video-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    padding: 8px 12px;
}

.local-video-controls button {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.local-video-controls button:hover {
    color: #fff;
}

.lv-progress-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    cursor: pointer;
    border-radius: 2px;
}

.lv-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.lv-time {
    font-size: 9px;
    font-family: 'IBM Plex Mono', monospace;
    color: rgba(255, 255, 255, 0.4);
    min-width: 32px;
    text-align: right;
}

#successesLoadMoreWrapper {
    display: none;
}

#successesLoadMoreWrapper.visible {
    display: flex;
}

/* ===== SPARKS / PARTICLES (JS Generated) ===== */
.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 8px #fff, 0 0 12px #fff;
    animation: particleSpark ease-in-out infinite;
    z-index: 10;
}

@keyframes particleSpark {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    50% {
        transform: translateY(-50px) scale(0.5);
        opacity: 0;
    }

    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}