/* ========================================
   Techpedya 2026 - BIO-DIGITAL DARK SCIENCE
   Neon Turquoise + Scanlines
   ======================================== */

/* === NEWS TICKER === */
.ticker-scroll {
    animation: tickerScroll 210s linear infinite;
    display: flex;
    align-items: center;
    height: 100%;
}

.ticker-scroll:hover {
    animation-play-state: paused;
}

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

/* Mobile: 2x faster ticker */
@media (max-width: 768px) {
    .ticker-scroll {
        animation-duration: 210s;
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #000;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.ticker-item:hover {
    opacity: 0.7;
}

.ticker-item .ticker-cat {
    color: #000;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ticker-item .ticker-sep {
    color: #000;
    font-size: 6px;
}

/* === VARIABLES === */
:root {
    /* Pure Void Backgrounds */
    --dark-950: #000000;
    --dark-900: #050505;
    --dark-800: #0A0A0A;
    --dark-700: #111111;
    --dark-600: #1A1A1A;

    /* THE NEW COLOR: Bio-Digital Cyan */
    --neon-cyan: #00FFC8;
    --neon-cyan-dim: #00cc9f;

    /* Glows */
    --neon-glow: rgba(0, 255, 200, 0.3);
    --neon-glow-strong: rgba(0, 255, 200, 0.5);
    --neon-glow-text: 0 0 10px rgba(0, 255, 200, 0.5);
}


/* === BASE & TYPOGRAPHY === */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* === ANALOG SCREEN EFFECTS === */
body {
    background-color: var(--dark-950);
    color: #e2e8f0;
    overflow-x: hidden;
    position: relative;
    /* Removed Grid Background */
}

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    /* Clean horizontal scanlines only */
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.18;
    }

    50% {
        opacity: 0.22;
    }

    100% {
        opacity: 0.18;
    }
}

/* === ACCESSIBILITY: Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::after {
        animation: none;
    }
}

::selection {
    background: var(--neon-cyan);
    color: var(--dark-950);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-800);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-600);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* === NETFLIX CARD === */
.netflix-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--dark-700);
}

.netflix-card:hover {
    transform: scale(1.05);
    z-index: 10;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-glow);
}

.netflix-card .aspect-video {
    position: relative;
}

/* Glitch effect on hover for images could be cool later */

/* === HERO LOADING BAR === */
.loading-bar {
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    width: 60%;
    animation: load 2s ease-in-out infinite;
}

@keyframes load {
    0% {
        width: 0%;
        opacity: 1;
    }

    50% {
        width: 100%;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 0;
    }
}

/* === NEON UTILITIES === */
.text-neon {
    color: var(--neon-cyan);
    text-shadow: var(--neon-glow-text);
}

.bg-neon {
    background-color: var(--neon-cyan);
    color: var(--dark-950);
    box-shadow: 0 0 15px var(--neon-glow);
}

.bg-neon:hover {
    background-color: var(--neon-cyan-dim);
    box-shadow: 0 0 25px var(--neon-glow-strong);
}

.border-neon {
    border-color: var(--neon-cyan);
}

.hover\:text-neon:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-glow);
}

/* === SECTION REVEAL === */
section {
    opacity: 1;
    transform: none;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === CARD UPDATES === */
.netflix-card img {
    filter: grayscale(80%) brightness(0.9) contrast(1.2);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.netflix-card:hover img {
    filter: grayscale(0%) brightness(1) contrast(1.1);
}

/* Technical Corner Brackets */
.netflix-card>div,
.specimen-card>div:first-child {
    position: relative;
}

.netflix-card>div::before,
.netflix-card>div::after,
.specimen-card>div:first-child::before,
.specimen-card>div:first-child::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--neon-cyan);
    opacity: 0.4;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.netflix-card>div::before,
.specimen-card>div:first-child::before {
    top: 6px;
    left: 6px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.netflix-card>div::after,
.specimen-card>div:first-child::after {
    bottom: 6px;
    right: 6px;
    border-bottom: 1px solid;
    border-right: 1px solid;
}

.netflix-card:hover>div::before,
.netflix-card:hover>div::after,
.specimen-card:hover>div:first-child::before,
.specimen-card:hover>div:first-child::after {
    opacity: 1;
}

/* Specimen Card Dark Overlay */
.specimen-card>div:first-child::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    pointer-events: none;
    z-index: 5;
    border: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    bottom: auto;
    right: auto;
    opacity: 1;
}

/* Bottom Accent Line */
.specimen-card {
    border-bottom: 1px solid rgba(0, 255, 200, 0.1);
}

.specimen-card:hover {
    border-bottom-color: rgba(0, 255, 200, 0.4);
}

/* Reference Number Styling */
.ref-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(0, 255, 200, 0.6);
    letter-spacing: 0.1em;
}

/* === GLITCH TEXT EFFECT (Optional for Logo) === */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === FOCUS === */
:focus-visible {
    outline: 1px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* === SHAKE ANIMATION (for wrong answers) === */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* === GLITCH TEXT EFFECT === */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text::before {
    color: #ff0040;
    animation: glitch-flash 4s infinite;
}

.glitch-text::after {
    color: #00ffff;
    animation: glitch-flash 4s infinite 0.1s;
}

@keyframes glitch-flash {

    0%,
    92%,
    94%,
    96%,
    98%,
    100% {
        opacity: 0;
        transform: translate(0);
    }

    93% {
        opacity: 0.8;
        transform: translate(-2px, 0);
        clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    }

    95% {
        opacity: 0.8;
        transform: translate(2px, 0);
        clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    }

    97% {
        opacity: 0.6;
        transform: translate(-1px, 1px);
        clip-path: polygon(0 0, 100% 0, 100% 30%, 0 30%);
    }
}

/* === RANDOM FACT TRANSITION === */
#randomFact {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* === KEN BURNS ANIMATION === */
@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.15) translate(-2%, -1%);
    }
}

/* === FIELD REPORT CARDS === */
.field-report-card {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--dark-700);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--dark-900);
}

.field-report-card:hover {
    transform: scale(1.03);
    z-index: 10;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px var(--neon-glow), 0 0 50px rgba(0, 255, 200, 0.1);
}

/* Image */
.field-report-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(70%) brightness(0.7) contrast(1.1);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.field-report-card:hover img {
    filter: grayscale(0%) brightness(0.8) contrast(1.05);
    transform: scale(1.05);
}

/* Scanline overlay */
.field-report-card .card-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 255, 200, 0.02) 2px,
            rgba(0, 255, 200, 0.02) 4px);
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.field-report-card:hover .card-scanlines {
    opacity: 1;
}

/* Bottom accent line */
.field-report-card .card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--neon-cyan) 50%,
            transparent 100%);
    opacity: 0;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.field-report-card:hover .card-accent {
    opacity: 0.6;
}

/* KAYNAK source link in article modals */
.source-link {
    color: var(--neon-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.source-link:hover {
    opacity: 0.7;
}