/* ═══════════════════════════════════════════════════════════════
   Portal Tunnel 97 – Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Widget wrapper ─────────────────────────────────────────── */
.portal-tunnel-97-widget {
    position: relative;
    width: 100%;
    display: block;
    line-height: 0;
}

/* ── Canvas container ───────────────────────────────────────── */
.pt97-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #000510;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}

.pt97-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Scan-line overlay */
.pt97-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.04) 3px,
        rgba(0,0,0,0.04) 4px
    );
    pointer-events: none;
    z-index: 6;
}

/* Vignette */
.pt97-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 38%,
        rgba(0, 5, 16, 0.78) 100%
    );
    pointer-events: none;
    z-index: 5;
}

/* ── UI Overlay (HUD) ───────────────────────────────────────── */
.pt97-ui-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    font-family: 'Courier New', Courier, monospace;
}

/* Crosshair reticle */
.pt97-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
}
.pt97-reticle::before,
.pt97-reticle::after {
    content: '';
    position: absolute;
    background: rgba(0, 255, 255, 0.55);
}
.pt97-reticle::before {
    width: 100%; height: 1px;
    top: 50%; left: 0;
    transform: translateY(-50%);
}
.pt97-reticle::after {
    width: 1px; height: 100%;
    left: 50%; top: 0;
    transform: translateX(-50%);
}

/* Corner brackets on reticle */
.pt97-reticle span {
    display: none; /* purely decorative, keep it simple */
}

/* ── HUD top-left: velocity bar ─────────────────────────────── */
.pt97-hud-tl {
    position: absolute;
    top: 18px;
    left: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pt97-hud-label {
    color: rgba(0, 255, 255, 0.55);
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.pt97-speed-bar {
    width: 4px;
    height: 80px;
    background: rgba(0, 255, 255, 0.12);
    border: 1px solid rgba(0, 255, 255, 0.28);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.pt97-speed-fill {
    width: 100%;
    height: 20%;
    background: linear-gradient(to top, #00ffff, #0088ff);
    box-shadow: 0 0 8px #00ffff;
    transition: height 0.2s linear;
    border-radius: 2px;
}

/* ── HUD top-right: ring counter ────────────────────────────── */
.pt97-hud-tr {
    position: absolute;
    top: 18px;
    right: 18px;
}

.pt97-ring-counter {
    color: rgba(0, 255, 255, 0.5);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.pt97-ring-num {
    color: #00ffff;
    font-size: 14px;
    display: block;
    text-align: right;
    margin-top: 2px;
    text-shadow: 0 0 8px #00ffff;
}

/* ── Scroll hint ────────────────────────────────────────────── */
.pt97-scroll-hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 255, 255, 0.5);
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: pt97-pulse 2.4s ease-in-out infinite;
    white-space: nowrap;
}

/* ── Music toggle button ────────────────────────────────────── */
.pt97-music-toggle {
    position: absolute;
    bottom: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 5, 16, 0.72);
    color: rgba(0, 255, 255, 0.8);
    font-size: 16px;
    cursor: pointer;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
    outline: none;
    line-height: 1;
}

.pt97-music-toggle:hover,
.pt97-music-toggle.pt97-music-on {
    background: rgba(0, 255, 255, 0.18);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.55);
    color: #00ffff;
}

.pt97-music-icon {
    display: block;
    font-style: normal;
    pointer-events: none;
}

/* ── Lightbox overlay ───────────────────────────────────────── */
.pt97-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 5, 16, 0);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.42s ease;
    cursor: pointer;
}

.pt97-lightbox-overlay.pt97-active {
    background: rgba(0, 5, 16, 0.93);
}

.pt97-lightbox {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    transform: scale(0.2) rotate(-4deg);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity   0.32s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pt97-lightbox-overlay.pt97-active .pt97-lightbox {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

/* Close button */
.pt97-lb-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #00ffff;
    background: #000a1a;
    color: #00ffff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 0 12px rgba(0,255,255,0.5);
    z-index: 1;
    outline: none;
    font-family: monospace;
}
.pt97-lb-close:hover {
    background: #00ffff;
    color: #000510;
    box-shadow: 0 0 24px #00ffff;
}

/* Badge */
.pt97-lb-badge {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    color: rgba(0,255,255,0.6);
    text-transform: uppercase;
    text-align: center;
}

/* Content area */
.pt97-lb-content {
    border: 1px solid rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 50px rgba(0,255,255,0.18),
                inset 0 0 40px rgba(0,5,16,0.6);
    overflow: hidden;
    background: #000510;
}

.pt97-lb-content img,
.pt97-lb-content video {
    display: block;
    max-width: 85vw;
    max-height: 72vh;
    width: auto;
    height: auto;
    border: none;
    outline: none;
}

/* Placeholder (no media) */
.pt97-lb-placeholder {
    width: 360px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 22px;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #001133, #000510);
    text-shadow: 0 0 20px #00ffff;
}

/* Hint */
.pt97-lb-hint {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(0,255,255,0.3);
    text-transform: uppercase;
    text-align: center;
}

/* ── Elementor editor placeholder ───────────────────────────── */
.pt97-editor-preview {
    min-height: 600px;
    background: #000510 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt97-editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
}

.pt97-ep-ring {
    color: #00ffff;
    font-size: 64px;
    text-shadow: 0 0 30px #00ffff, 0 0 60px #00ffff;
    animation: pt97-spin 6s linear infinite;
    line-height: 1;
}

.pt97-ep-title {
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 0 0 12px #00ffff;
}

.pt97-ep-sub {
    color: rgba(0, 255, 255, 0.4);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes pt97-pulse {
    0%, 100% { opacity: 0.25; }
    50%       { opacity: 0.85; }
}

@keyframes pt97-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pt97-container {
        min-height: 420px;
        height: 420px;
    }

    .pt97-scroll-hint {
        font-size: 8px;
        letter-spacing: 2px;
        bottom: 60px;
    }

    .pt97-hud-label,
    .pt97-ring-counter {
        font-size: 8px;
        letter-spacing: 2px;
    }

    .pt97-ring-num {
        font-size: 11px;
    }

    .pt97-lb-content img,
    .pt97-lb-content video {
        max-width: 95vw;
        max-height: 65vh;
    }

    .pt97-lb-placeholder {
        width: 280px;
        height: 200px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pt97-container {
        height: 360px;
        min-height: 360px;
    }

    .pt97-speed-bar {
        height: 55px;
    }
}
