/* ============================================
   opensource.bid - Cyberpunk Auction House
   Dark-Neon Horizontal Scroll Interface
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-deep: #0A0A0F;
    --bg-panel: #0D0E18;
    --neon-cyan: #00F0FF;
    --neon-magenta: #FF0080;
    --neon-lime: #39FF14;
    --text-primary: #E0E0F0;
    --text-muted: #6A6A8A;
    --hud-glow: rgba(0, 240, 255, 0.15);
    --amber: #FFB300;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* --- Font Classes --- */
.fira {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.exo {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.65;
}

/* --- Glow Utilities --- */
.glow-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px #00F0FF, 0 0 16px rgba(0, 240, 255, 0.25);
}

.glow-magenta {
    color: var(--neon-magenta);
    text-shadow: 0 0 8px #FF0080, 0 0 16px rgba(255, 0, 128, 0.25);
}

.glow-lime {
    color: var(--neon-lime);
    text-shadow: 0 0 8px #39FF14, 0 0 16px rgba(57, 255, 20, 0.25);
}

.glow-amber {
    color: var(--amber);
    text-shadow: 0 0 8px #FFB300, 0 0 16px rgba(255, 179, 0, 0.25);
}

/* --- Progress Bar --- */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    z-index: 1000;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 8px var(--neon-cyan), 0 0 16px rgba(0, 240, 255, 0.3);
}

/* --- Panel Indicators --- */
#panel-indicators {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.indicator {
    display: block;
    width: 2px;
    height: 20px;
    background: var(--text-muted);
    opacity: 0.4;
    transition: all 0.4s ease;
}

.indicator.active {
    background: var(--neon-magenta);
    opacity: 1;
    box-shadow: 0 0 6px var(--neon-magenta), 0 0 12px rgba(255, 0, 128, 0.4);
    height: 28px;
}

/* --- Scroll Container --- */
#scroll-container {
    display: flex;
    width: 700vw;
    height: 100vh;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* --- Panel Base --- */
.panel {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--bg-panel);
    overflow: hidden;
}

/* --- Background Grid Substrate --- */
.panel-bg-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.05;
    background:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 39px,
            var(--neon-cyan) 39px,
            var(--neon-cyan) 40px
        ),
        repeating-linear-gradient(
            -60deg,
            transparent,
            transparent 39px,
            var(--neon-cyan) 39px,
            var(--neon-cyan) 40px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 39px,
            var(--neon-cyan) 39px,
            var(--neon-cyan) 40px
        );
}

/* --- Scan Lines --- */
.scan-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 240, 255, 0.03) 3px,
        rgba(0, 240, 255, 0.03) 4px
    );
}

/* --- Particles Container --- */
.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid var(--neon-cyan);
    opacity: 0.2;
    animation: particleDrift linear infinite;
}

@keyframes particleDrift {
    0% {
        transform: translateX(-20px) translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateX(calc(100vw + 20px)) translateY(-30px);
        opacity: 0;
    }
}

/* --- HUD Frame --- */
.hud-frame {
    position: absolute;
    inset: 20px;
    z-index: 3;
    pointer-events: none;
}

.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
}

.hud-corner::before,
.hud-corner::after {
    content: '';
    position: absolute;
    background: var(--neon-cyan);
}

.hud-tl { top: 0; left: 0; }
.hud-tl::before { top: 0; left: 0; width: 40px; height: 2px; }
.hud-tl::after { top: 0; left: 0; width: 2px; height: 40px; }

.hud-tr { top: 0; right: 0; }
.hud-tr::before { top: 0; right: 0; width: 40px; height: 2px; }
.hud-tr::after { top: 0; right: 0; width: 2px; height: 40px; }

.hud-bl { bottom: 0; left: 0; }
.hud-bl::before { bottom: 0; left: 0; width: 40px; height: 2px; }
.hud-bl::after { bottom: 0; left: 0; width: 2px; height: 40px; }

.hud-br { bottom: 0; right: 0; }
.hud-br::before { bottom: 0; right: 0; width: 40px; height: 2px; }
.hud-br::after { bottom: 0; right: 0; width: 2px; height: 40px; }

/* HUD corner animation */
.hud-corner::before,
.hud-corner::after {
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel.in-view .hud-corner::before,
.panel.in-view .hud-corner::after {
    transform: scaleX(1);
}

.hud-tl::before, .hud-tl::after { transform-origin: left; }
.hud-tr::before, .hud-tr::after { transform-origin: right; }
.hud-bl::before, .hud-bl::after { transform-origin: left; }
.hud-br::before, .hud-br::after { transform-origin: right; }

/* --- Compass Rose --- */
.compass-rose {
    position: absolute;
    z-index: 4;
    animation: compassSpin 60s linear infinite;
}

.cr-tl { top: 30px; left: 30px; }
.cr-br { bottom: 30px; right: 30px; }

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

/* --- Registration Marks --- */
.panel::before,
.panel::after {
    content: '+';
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.3;
    z-index: 4;
}

.panel::before { top: 8px; left: 8px; }
.panel::after { bottom: 8px; right: 8px; }

/* --- Data Strips --- */
.data-strip {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    gap: 32px;
    padding: 4px 60px;
    color: var(--text-muted);
    opacity: 0.5;
    z-index: 4;
    white-space: nowrap;
    overflow: hidden;
}

.data-strip-top {
    top: 22px;
    animation: dataScroll 30s linear infinite;
}

.data-strip-bottom {
    bottom: 22px;
    animation: dataScroll 25s linear infinite reverse;
}

@keyframes dataScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.data-strip span {
    flex-shrink: 0;
}

/* --- Panel Content --- */
.panel-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Panel 0: Entry Gate
   ============================================ */
.entry-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
}

.reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: reticlePulse 4s ease-in-out infinite;
}

@keyframes reticlePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; }
}

.entry-label {
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    letter-spacing: 0.15em;
    opacity: 0.8;
}

.entry-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(3rem, 7vw, 7rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3), 0 0 60px rgba(0, 240, 255, 0.1);
    line-height: 1.1;
}

.entry-title em {
    font-style: italic;
}

.entry-subtitle {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 2rem);
    letter-spacing: 0.1em;
}

.scroll-hint {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

.arrow-container {
    display: flex;
    gap: 4px;
}

.scroll-arrow {
    opacity: 0.6;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

.scroll-arrow.delay-1 {
    animation-delay: 0.2s;
}

.scroll-arrow.delay-2 {
    animation-delay: 0.4s;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 0.8; transform: translateX(5px); }
}

/* ============================================
   Panels 1-5: Bid Showcase
   ============================================ */
.bid-content {
    padding: 60px 40px;
}

.bid-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    align-items: center;
}

/* Bid Meta (Left Column) */
.bid-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
}

.meta-label {
    color: var(--text-muted);
    font-size: clamp(0.6rem, 0.7vw, 0.7rem);
    margin-top: 8px;
}

.meta-value {
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    color: var(--text-primary);
}

.hash-divider {
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        var(--text-muted) 3px,
        var(--text-muted) 4px
    );
    opacity: 0.3;
    margin: 4px 0;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-lime);
    animation: pulseDot 2s ease-in-out infinite;
    box-shadow: 0 0 6px var(--neon-lime);
    margin-top: 8px;
}

.pulse-dot.pulse-fast {
    animation-duration: 1s;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* Bid Crystal (Center Column) */
.bid-crystal {
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.6);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
}

.panel.in-view .bid-crystal {
    transform: scale(1);
    opacity: 1;
}

.crystal-svg {
    animation: crystalRotate 60s linear infinite;
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.3));
}

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

/* Bid Info (Right Column) */
.bid-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.bid-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 3rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.bid-title em {
    font-style: italic;
}

.bid-desc {
    color: var(--text-muted);
    max-width: 360px;
}

.bid-indicator {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.bid-label {
    font-size: clamp(0.6rem, 0.7vw, 0.7rem);
    color: var(--text-muted);
}

.bid-amount {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 400;
}

.bid-timer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.timer-label {
    font-size: clamp(0.6rem, 0.7vw, 0.7rem);
}

.timer-value {
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

/* ============================================
   Panel 6: Terminal
   ============================================ */
.terminal-content {
    flex-direction: column;
    padding: 80px;
}

.terminal-window {
    width: 100%;
    max-width: 700px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1), inset 0 0 30px rgba(0, 240, 255, 0.03);
    padding: 0;
}

.terminal-header {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    min-height: 400px;
}

.terminal-line {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    color: var(--neon-cyan);
    line-height: 2;
    opacity: 0;
    transform: translateX(-10px);
    white-space: nowrap;
}

.terminal-line.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.terminal-cursor {
    animation: cursorBlink 0.8s step-end infinite;
    color: var(--neon-cyan);
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor-line {
    opacity: 0;
}

.cursor-line.visible {
    opacity: 1;
}

/* ============================================
   Panel transition animations
   ============================================ */
.panel .scan-lines {
    opacity: 0;
    transition: opacity 0.6s ease 0.2s;
}

.panel.in-view .scan-lines {
    opacity: 1;
}

.data-strip {
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.panel.in-view .data-strip {
    opacity: 0.5;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 900px) {
    .bid-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        gap: 12px;
        padding: 20px;
    }

    .bid-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px;
    }

    .hash-divider {
        display: none;
    }

    .bid-crystal {
        max-height: 200px;
    }

    .crystal-svg {
        width: 200px;
        height: 200px;
    }

    .bid-info {
        padding: 10px;
    }

    .hud-frame {
        inset: 10px;
    }

    .entry-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }
}

@media (max-width: 600px) {
    .bid-grid {
        padding: 10px;
    }

    .terminal-content {
        padding: 40px 20px;
    }

    .terminal-window {
        max-width: 100%;
    }
}
