/* ============================================
   CORE — Terminal Noir Theme
   ============================================ */

body {
    background-color: #08080c !important;
    color: #b0b8c8 !important;
    font-family: "Open Sans", "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    background-attachment: fixed;
}

/* Monospace accent font */
.mono {
    font-family: "IBM Plex Mono", "Courier New", monospace !important;
    font-weight: 600;
}

/* Global Button Style */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
    height: 48px;
    padding: 0 28px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    font-family: "IBM Plex Mono", monospace;
}

.button:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: none;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/*Margin-Top 120px*/
.mt-120 {
    margin-top: 120px;
}

/* Russo One font */
.russo {
    font-family: "Russo One", sans-serif !important;
    font-weight: 400;
    font-style: normal;
}

/* Accent color */
.accent {
    color: #3b82f6 !important;
    -webkit-text-fill-color: #3b82f6 !important;
    text-shadow: 2px 0 1px rgba(255, 0, 0, 0.25), -2px 0 1px rgba(0, 255, 255, 0.25);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #1a1a24;
    border-radius: 0;
}

::-webkit-scrollbar-track {
    background-color: #08080c;
}

/* Navbar */

.navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: transparent !important;
}

.nav-link {
    color: #8a90a0 !important;
    font-family: "IBM Plex Mono", monospace !important;
    font-size: 0.82rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    transition: color 0.25s ease !important;
    padding: 8px 12px !important;
}

.hero .nav-link {
    color: #e0e0e0 !important;
}

.nav-link:hover,
.nav-link.nav-underline {
    color: #e0e0e0 !important;
}

.nav-underline {
    color: #e0e0e0 !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.5) !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background-color: transparent;
        padding: 1rem;
        border-radius: 2px;
        margin-top: 1rem;
        border: none;
        backdrop-filter: none;
    }

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background-color: transparent;
    }
}

/* HOME PAGE */

/* Hero Section */

.hero {
    background-color: #08080c;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;

    .hero-screen {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        border-radius: 0;
        background:
            linear-gradient(180deg, rgba(12, 12, 18, 0.98), rgba(8, 8, 12, 0.98)),
            #08080c;
        box-shadow:
            inset 0 0 120px rgba(0, 0, 0, 0.3);
    }

    .hero-screen::before {
        content: "";
        position: absolute;
        inset: 12px;
        background:
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) top left / 34px 1px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) top left / 1px 34px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) top right / 34px 1px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) top right / 1px 34px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) bottom left / 34px 1px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) bottom left / 1px 34px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) bottom right / 34px 1px no-repeat,
            linear-gradient(rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.38)) bottom right / 1px 34px no-repeat;
        border-radius: 2px;
        pointer-events: none;
        z-index: 4;
    }

    /* CRT Mode Base Settings */
    .crt-container {
        /* Tunable CRT constants */
        --crt-scanline-opacity: 0.35;
        --crt-flicker-strength: 0.03;
        --crt-phosphor-opacity: 0.06;
        --crt-roll-speed: 8s;
    }

    .hero-screen-glow {
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background:
            radial-gradient(circle at 50% 56%, rgba(59, 130, 246, 0.08), transparent 48%);
    }

    .hero-screen-overlay {
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        background:
            linear-gradient(180deg, rgba(6, 8, 12, 0.58), rgba(6, 8, 12, 0.24) 22%, rgba(6, 8, 12, 0.22) 75%, rgba(6, 8, 12, 0.52)),
            linear-gradient(90deg, rgba(6, 8, 12, 0.18), transparent 16%, transparent 84%, rgba(6, 8, 12, 0.18));
    }

    /* CRT Texture & Filter Layers */
    .hero-screen-vignette {
        position: absolute;
        inset: 0;
        z-index: 25;
        /* Sits above all UI to act as a physical border */
        pointer-events: none;

        /* The physical screen bezel shadow spilling inwards - WEAKENED so navbar is readable */
        box-shadow:
            inset 0 0 60px rgba(0, 0, 0, 0.9),
            inset 0 0 30px rgba(0, 0, 0, 1),
            inset 0 0 10px rgba(0, 0, 0, 1);

        /* Ellipse gradient creates the deep internal corner blackness */
        background:
            radial-gradient(ellipse at center, transparent 75%, rgba(0, 0, 0, 0.4) 92%, rgba(0, 0, 0, 0.9) 100%);
    }

    .crt-scanlines {
        position: absolute;
        inset: 0;
        z-index: 10;
        /* Below UI */
        pointer-events: none;
        background: linear-gradient(to bottom,
                rgba(255, 255, 255, 0),
                rgba(255, 255, 255, 0) 50%,
                rgba(0, 0, 0, var(--crt-scanline-opacity)) 50%,
                rgba(0, 0, 0, var(--crt-scanline-opacity)));
        background-size: 100% 4px;
        opacity: 0.9;
    }

    .crt-phosphor {
        position: absolute;
        inset: 0;
        z-index: 11;
        /* Below UI */
        pointer-events: none;
        background: linear-gradient(90deg,
                rgba(255, 0, 0, var(--crt-phosphor-opacity)),
                rgba(0, 255, 0, var(--crt-phosphor-opacity)),
                rgba(0, 0, 255, var(--crt-phosphor-opacity)));
        background-size: 3px 100%;
        mix-blend-mode: screen;
        opacity: 0.8;
    }

    .crt-roll {
        position: absolute;
        inset: 0;
        z-index: 12;
        /* Below UI */
        pointer-events: none;
        background: linear-gradient(to bottom,
                transparent 0%,
                rgba(255, 255, 255, 0.01) 10%,
                rgba(255, 255, 255, 0.035) 50%,
                rgba(255, 255, 255, 0.01) 90%,
                transparent 100%);
        background-size: 100% 15vh;
        background-repeat: no-repeat;
        animation: crt-roll-animation var(--crt-roll-speed) linear infinite;
        mix-blend-mode: screen;
        will-change: background-position;
    }

    .crt-glass-reflection {
        position: absolute;
        inset: 0;
        z-index: 24;
        pointer-events: none;
        /* Advanced faux-curvature via highlight shading */
        background:
            /* Top heavy "glass arch" glaring reflection */
            radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 55%),
            /* Bottom subtle bounce light */
            radial-gradient(ellipse at 50% 120%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
            /* Spherical bulge center light pushing content 'forward' */
            radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 65%);
        animation: crt-flicker-animation 0.5s infinite;
        box-shadow: inset 0 0 60px rgba(59, 130, 246, 0.04);
        will-change: opacity;
    }

    .crt-text-glow .header,
    .crt-text-glow .sub-text {
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.3), 0 0 25px rgba(59, 130, 246, 0.15);
        /* Subtle scale brings text 'closer' to glass apex */
        transform: scale(1.02);
    }

    .crt-interactive {
        position: relative;
        z-index: 30;
        /* Keep UI fully accessible above layers */
    }

    .hero-line-waves {
        position: absolute;
        inset: 0;
        z-index: 1;
        opacity: 0.94;
        pointer-events: none;
        background:
            radial-gradient(circle at center, rgba(59, 130, 246, 0.08), transparent 58%),
            linear-gradient(180deg, rgba(8, 12, 18, 0.1), rgba(8, 12, 18, 0.22));
    }

    .hero-line-waves canvas,
    .hero-line-waves .line-waves-canvas {
        mix-blend-mode: screen;
        filter: brightness(1.05) contrast(1.18);
    }

    .navbar {
        position: relative;
        z-index: 20;
        transform: perspective(600px) rotateX(4.5deg) scale(0.97);
        transform-origin: top center;
    }

    /* Opt the dropdown menu out of the parent 3D transform so click targets
       align with visuals and Popper positioning stays correct. */
    .navbar .dropdown-menu {
        transform: none !important;
        perspective: none;
    }

    .navbar .btn {
        background:
            repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 2px),
            linear-gradient(180deg, #1e3a8a 0%, #172554 100%) !important;
        border: 1px solid #3b82f6 !important;
        border-radius: 2px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
        font-family: "IBM Plex Mono", monospace !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        letter-spacing: 1px !important;
        text-transform: uppercase !important;
        text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
        transition: filter 0.1s ease-out, box-shadow 0.1s ease-out;
    }

    .navbar .btn:hover {
        filter: brightness(1.3) contrast(1.1);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.25),
            0 0 12px rgba(59, 130, 246, 0.5) !important;
    }

    .content,
    .logos {
        position: relative;
        z-index: 20;
    }

    .content {
        flex: 1;
        line-height: 1.2;
        padding-top: clamp(2.5rem, 6vh, 4.5rem);
        padding-bottom: 1rem;
    }

    .header {
        font-size: 5rem;
        color: #e8e8e8 !important;
        -webkit-text-fill-color: #e8e8e8 !important;
        background: none !important;
        letter-spacing: -2px;
        text-transform: lowercase;
        animation: hero-fade-in 0.6s ease-out 0.1s both;
    }

    .header .accent {
        -webkit-text-fill-color: white !important;
        font-size: inherit;
        transition: opacity 0.1s;
    }

    @media (max-width: 575px) {
        .header {
            font-size: 3rem;
            letter-spacing: -1px;
        }
    }

    .sub-text {
        font-family: "IBM Plex Mono", monospace;
        font-size: 1.15rem;
        color: #f8fafc;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.2) !important;
        font-weight: 400;
        letter-spacing: 0.3px;
        animation: hero-fade-in 0.6s ease-out 0.3s both;
    }

    @media (max-width: 575px) {
        .sub-text {
            font-size: 1rem;
            line-height: 28px;
        }
    }

    .button {
        animation: hero-fade-in 0.6s ease-out 0.5s both;
        background:
            radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px) 0 0 / 3px 3px,
            linear-gradient(180deg, #1e3a8a 0%, #172554 100%) !important;
        border: 1px solid #3b82f6 !important;
        border-radius: 2px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 5px rgba(59, 130, 246, 0.2) !important;
        color: #f8fafc !important;
        font-family: "IBM Plex Mono", monospace !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        letter-spacing: 1px !important;
        text-transform: uppercase !important;
        /* Chromatic Aberration */
        text-shadow: 2px 0 1px rgba(255, 0, 0, 0.5), -2px 0 1px rgba(0, 255, 255, 0.5), 0 0 4px rgba(255, 255, 255, 0.4) !important;
        /* Slow decay when turning off */
        transition: filter 0.5s ease-out, box-shadow 0.5s ease-out;
    }

    .button:hover {
        /* Instant activation when "turned on" */
        transition: filter 0.05s ease-out, box-shadow 0.05s ease-out;
        filter: brightness(1.35) contrast(1.15);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 18px rgba(59, 130, 246, 0.6) !important;
    }

    .logos {
        padding: 1.6rem 0 2rem;
        animation: hero-fade-in 0.6s ease-out 0.7s both;
        background: linear-gradient(180deg, rgba(8, 8, 12, 0), rgba(8, 8, 12, 0.28));
    }

    .logos img {
        opacity: 0.72;
        filter: grayscale(0.15) brightness(0.92);
    }
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes crt-roll-animation {
    0% {
        background-position: 0 -15vh;
    }

    100% {
        background-position: 0 115vh;
    }
}

@keyframes crt-flicker-animation {
    0% {
        opacity: 1;
    }

    10% {
        opacity: calc(1 - var(--crt-flicker-strength));
    }

    20% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    40% {
        opacity: calc(1 - var(--crt-flicker-strength));
    }

    50% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    70% {
        opacity: calc(1 - var(--crt-flicker-strength));
    }

    80% {
        opacity: 1;
    }

    90% {
        opacity: calc(1 - (var(--crt-flicker-strength) * 2));
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero .hero-line-waves {
        display: none !important;
    }

    .hero {
        padding: 0;
        background-image: url("../images/hero.png") !important;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }

    .hero .hero-screen {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .hero .hero-screen::before,
    .hero .hero-screen-glow,
    .hero .hero-screen-overlay,
    .hero .hero-screen-vignette,
    .hero .crt-scanlines,
    .hero .crt-phosphor,
    .hero .crt-roll,
    .hero .crt-glass-reflection {
        display: none;
    }
}

/* Slider — Terminal Ticker */
.slider {
    height: 56px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
    background: #0c0c12;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.slider::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    z-index: 1;
}

.slide-track {
    animation: scroll 30s linear infinite;
    display: flex;
    width: calc(280px * 10);
}

.slide {
    height: 56px;
    width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    gap: 12px;
}

.slide img {
    display: none;
}

.slide-separator {
    color: #3b82f6;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    opacity: 0.5;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.2), -1px 0 1px rgba(0, 255, 255, 0.2);
}

.slide-text {
    -webkit-text-stroke-width: 0;
    -webkit-text-stroke-color: transparent;
    color: #5a6070 !important;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    white-space: nowrap;
    font-weight: 500;
    text-align: center;
    text-shadow: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-280px * 4));
    }
}

.slide:hover {
    transform: none;
    transition: none;
}

.slide:hover .slide-text {
    color: #3b82f6 !important;
    transition: color 0.3s ease;
}

.slide:hover img {
    filter: none;
}

/* Elements Section */
.element-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    padding: 40px 28px;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.4s ease;
    height: 100%;
}

.element-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.06), 0 0 60px rgba(59, 130, 246, 0.03);
}

.element-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    background: rgba(59, 130, 246, 0.03);
}

.element-icon img {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
    filter: grayscale(0.3);
}

.element-title {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.12), -1px 0 1px rgba(0, 255, 255, 0.12);
}

.element-desc {
    font-size: 0.9rem;
    color: #5a6070;
    line-height: 1.6;
    margin: 0;
}

/* Legacy ellipse — hide if still present */
.ellipse-container {
    display: none !important;
}

.ellipse-bg {
    display: none !important;
}

/* Mission */
.mission {
    .mission-outline {
        color: transparent;
        -webkit-text-stroke-width: 1px;
        -webkit-text-stroke-color: #5a6070;
    }

    .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(59, 130, 246, 0.4);
        color: #3b82f6;
        font-weight: 500;
        height: 48px;
        padding: 0 24px;
        transition: all 0.25s ease;
        border-radius: 2px;
        background: transparent;
        font-family: "IBM Plex Mono", monospace;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .button:hover {
        background: rgba(59, 130, 246, 0.08);
        border-color: #3b82f6;
        color: #3b82f6;
        transform: none;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
    }
}

.course-cards {
    .course-card {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 2px;
        overflow: hidden;
        transition: border-color 0.3s ease;
        height: 100%;
    }

    .course-card:hover {
        border-color: rgba(59, 130, 246, 0.2);
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.06), 0 0 60px rgba(59, 130, 246, 0.03);
    }

    .course-card-img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
        filter: saturate(0.8);
        transition: filter 0.3s ease;
    }

    .course-card {
        position: relative;
    }

    .course-card::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 200px;
        box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
        pointer-events: none;
        z-index: 1;
    }

    .course-card:hover .course-card-img {
        filter: saturate(1);
    }

    .course-card-body {
        padding: 24px;
    }

    .course-tag {
        display: inline-block;
        font-family: "IBM Plex Mono", monospace;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: #3b82f6;
        border: 1px solid rgba(59, 130, 246, 0.2);
        padding: 4px 10px;
        margin-bottom: 14px;
        border-radius: 1px;
    }

    .course-card-title {
        font-size: 1.05rem;
        font-weight: 600;
        color: #d0d4dc;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .course-card-desc {
        font-size: 0.88rem;
        color: #5a6070;
        line-height: 1.6;
        margin: 0;
    }

    /* Responsive */
    @media (max-width: 992px) {
        .course-card {
            margin-top: 1.5rem;
        }
    }

    @media (max-width: 767px) {
        .course-card {
            margin-bottom: 1.5rem;
        }

        .course-card-title {
            font-size: 1rem;
        }
    }

    @media (max-width: 575px) {
        .course-card {
            margin-top: 20px;
        }
    }
}

.infographics {
    .infographic-item {
        cursor: pointer;
        position: relative;
        overflow: hidden;
        border-radius: 2px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        transition: border-color 0.3s ease;
    }

    .infographic-item:hover {
        border-color: rgba(59, 130, 246, 0.2);
    }

    .infographic-item:hover .pdf-thumb {
        filter: brightness(0.6);
    }

    .infographic-item:hover .infographic-label {
        opacity: 1;
    }

    .pdf-thumb {
        cursor: pointer;
        width: 100%;
        height: 380px !important;
        object-fit: cover;
        object-position: top;
        border-radius: 2px;
        box-shadow: none;
        border: none;
        transition: filter 0.3s ease;
        display: block;
    }

    .infographic-label {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px 20px;
        background: linear-gradient(to top, rgba(8, 8, 12, 0.95) 0%, transparent 100%);
        color: #3b82f6;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    /* Modal styling */
    .modal-body {
        height: 80vh !important;
        padding: 0 !important;
    }

    #pdfViewer {
        width: 100%;
        height: 100%;
        border: none;
    }

    .modal-content {
        background-color: rgba(12, 12, 18, 0.98) !important;
        color: #b0b8c8 !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 2px;
        backdrop-filter: blur(20px);
    }

    .modal-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .pdf-frame {
        width: 100% !important;
        height: 80vh !important;
        border: none !important;
        background-color: white !important;
    }
}

/* COURSES PAGE*/

.courses {
    padding-bottom: 120px;

    .courses-shell {
        margin-top: 96px;
    }

    .courses-intro {
        position: relative;
        overflow: hidden;
        padding: 40px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 2px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
            linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent 28%);
    }

    .courses-intro::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 2px;
        background: rgba(59, 130, 246, 0.6);
    }

    .courses-kicker {
        margin-bottom: 18px;
        color: #3b82f6;
        font-size: 0.78rem;
        letter-spacing: 1.8px;
        text-transform: uppercase;
    }

    .header {
        font-size: 3.5rem;
        color: #e0e0e0;
        margin-bottom: 12px;
        text-transform: lowercase;
        letter-spacing: -1.5px;
    }

    .courses-lead {
        max-width: 640px;
        margin: 0;
        color: #7a8090;
        line-height: 1.8;
        font-size: 0.96rem;
    }

    .courses-status {
        padding-left: 24px;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }

    .courses-status-label {
        display: block;
        margin-bottom: 10px;
        color: #3b82f6;
        font-size: 0.72rem;
        letter-spacing: 1.6px;
        text-transform: uppercase;
        opacity: 0.78;
    }

    .courses-status-text {
        margin: 0;
        color: #5a6070;
        line-height: 1.7;
        font-size: 0.88rem;
    }

    .course-search-block {
        margin-top: 32px;
    }

    .course-search-label {
        display: inline-block;
        margin-bottom: 12px;
        color: #8a90a0;
        font-size: 0.72rem;
        letter-spacing: 1.6px;
        text-transform: uppercase;
    }

    .course-search-shell {
        align-items: stretch;
    }

    .course-search-icon {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-right: none !important;
        border-radius: 2px 0 0 2px !important;
        color: #3b82f6 !important;
        padding: 0 16px !important;
    }

    @media (max-width: 575px) {
        .header {
            font-size: 2.5rem;
        }

        .courses-intro {
            padding: 28px 24px;
        }

        .courses-status {
            padding-left: 0;
            padding-top: 16px;
            border-left: none;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }
    }

    .form-control {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 2px !important;
        color: #b0b8c8 !important;
        padding: 12px 16px !important;
    }

    .form-control:focus {
        border-color: rgba(59, 130, 246, 0.4) !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    .form-control::placeholder {
        color: #3a4050 !important;
    }

    .search-btn {
        background-color: transparent !important;
        color: #3b82f6;
        border: 1px solid rgba(59, 130, 246, 0.4) !important;
        border-radius: 2px;
        font-weight: 500;
        font-size: 0.85rem !important;
        font-family: "IBM Plex Mono", monospace;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 12px 24px;
        transition: 0.25s;
    }

    .search-btn:hover {
        background-color: rgba(59, 130, 246, 0.08) !important;
        border-color: #3b82f6 !important;
        transition: 0.25s;
    }
}

.attacks-grid-section .course-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 220px;
}

.attacks-grid-section .course-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attacks-grid-section .course-card-index {
    color: #3a4050;
    font-size: 0.78rem;
    letter-spacing: 1.2px;
}

.course-content {
    .header {
        font-size: 2.5rem;
        color: #e0e0e0;
    }

    h3.russo {
        color: #e0e0e0;
        font-size: 1.3rem;
    }

    p,
    li {
        color: #7a8090;
        line-height: 1.8;
    }

    .video-wrapper {
        position: relative;
        width: 100%;
        height: 40rem;
        border-radius: 2px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .video-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 2px;
    }

    .go-to-quiz {
        color: #3b82f6;
        transition: color 0.25s ease;
    }

    .go-to-quiz:hover {
        color: #60a5fa;
        animation: none;
    }

}


.quizlet {
    .quiz-container {
        background-color: rgba(12, 12, 18, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 2px;
        box-shadow: none;
        padding: 30px;
        max-width: 600px;
        width: 100%;
        margin: auto;
    }

    .quiz-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .quiz-header h2 {
        color: #e0e0e0;
    }

    .question {
        color: #b0b8c8;
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .progress-bar {
        background-color: #3b82f6 !important;
    }

    .progress {
        height: 4px;
        margin-bottom: 20px;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 0;
    }

    .options {
        display: grid;
        gap: 10px;
    }

    .option {
        background-color: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.06);
        color: #b0b8c8;
        border-radius: 2px;
        padding: 15px;
        cursor: pointer;
        transition: all 0.25s ease;
    }

    .option:hover {
        background-color: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .option.selected {
        background-color: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.4);
        color: #e0e0e0;
    }

    .option.correct {
        color: #4ade80;
        background-color: rgba(74, 222, 128, 0.08);
        border-color: rgba(74, 222, 128, 0.3);
    }

    .option.incorrect {
        color: #f87171;
        background-color: rgba(248, 113, 113, 0.08);
        border-color: rgba(248, 113, 113, 0.3);
    }

    .quiz-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 30px;
    }

    .timer {
        font-size: 1rem;
        font-weight: 600;
        color: #3b82f6;
        font-family: "IBM Plex Mono", monospace;
    }

    .results {
        text-align: center;
    }

    .result-icon {
        color: #3b82f6;
        font-size: 4rem;
        margin-bottom: 20px;
    }

    .score {
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 20px;
        color: #e0e0e0;
    }

    .quiz-btn {
        border: 1px solid rgba(59, 130, 246, 0.4);
        color: #3b82f6;
        font-weight: 500;
        height: 48px;
        width: 120px;
        transition: 0.25s;
        border-radius: 2px;
        background: transparent;
        font-family: "IBM Plex Mono", monospace;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .quiz-btn:hover {
        background: rgba(59, 130, 246, 0.08);
        border-color: #3b82f6;
        transition: 0.25s;
    }
}

/*Story shit*/
.stories {
    .scroll-container {
        width: 100%;
        max-width: 1200px;
        height: 80vh;
        overflow: hidden;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        background: rgba(255, 255, 255, 0.02);
        backdrop-filter: blur(1px);
        border: 1px solid rgba(255, 255, 255, 0.06);

    }

    .scroll-content {
        display: flex;
        width: fit-content;
        height: 100%;
        padding: 40px;
        gap: 20px;
        align-items: center;
        position: relative;
        transition: transform 0.1s ease-out;
    }

    .image-wrapper {
        flex-shrink: 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        background: white;
        transition: box-shadow 0.3s ease;
        cursor: pointer;
    }

    .image-wrapper:hover {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }

    /* Vary sizes */

    .image-wrapper.size-small {
        width: 150px;
        height: 150px;
    }

    .image-wrapper.size-medium {
        width: 200px;
        height: 300px;
    }

    .image-wrapper.size-large {
        width: 280px;
        height: 350px;
    }

    .image-wrapper.size-wide {
        width: 350px;
        height: 200px;
    }

    .image-wrapper.size-tall {
        width: 180px;
        height: 380px;
    }

    /* Rotation variations */

    .image-wrapper.rotate-left {
        transform: rotate(-3deg);
    }

    .image-wrapper.rotate-left:hover {
        transform: rotate(-3deg);
    }

    .image-wrapper.rotate-right {
        transform: rotate(3deg);
    }

    .image-wrapper.rotate-right:hover {
        transform: rotate(3deg);
    }

    .image-wrapper.rotate-left-more {
        transform: rotate(-6deg);
    }

    .image-wrapper.rotate-left-more:hover {
        transform: rotate(-6deg);
    }

    .image-wrapper.rotate-right-more {
        transform: rotate(6deg);
    }

    .image-wrapper.rotate-right-more:hover {
        transform: rotate(6deg);
    }

    /* Y-axis offset for scattered look */

    .image-wrapper.offset-up {
        align-self: flex-start;
        margin-top: -30px;
    }

    .image-wrapper.offset-down {
        align-self: flex-end;
        margin-bottom: -30px;
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .image-number {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: bold;
        z-index: 10;
    }

    /* Lightbox customization */

    .lb-loader,
    .lightbox {
        z-index: 9999 !important;
    }

    @media (max-width: 768px) {
        body {
            padding: 10px;
        }

        .scroll-container {
            height: 60vh;
        }

        .scroll-content {
            padding: 20px;
            gap: 8px;
        }

        .image-wrapper.size-small {
            width: 160px;
            height: 160px;
        }

        .image-wrapper.size-medium {
            width: 180px;
            height: 240px;
        }

        .image-wrapper.size-large {
            width: 220px;
            height: 270px;
        }

        .image-wrapper.size-wide {
            width: 260px;
            height: 160px;
        }

        .image-wrapper.size-tall {
            width: 150px;
            height: 300px;
        }

        .image-wrapper.offset-up {
            margin-top: -10px;
        }

        .image-wrapper.offset-down {
            margin-bottom: -10px;
        }
    }
}

/* ============================
   CHALLENGES PAGE
   ============================ */
.challenges {
    padding: 40px 0 80px;
    min-height: 100vh;
}

.challenges-header {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 20px;
}

.challenges-header h1 {
    color: #e0e0e0;
    font-size: 3rem;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.challenges-header p {
    color: #5a6070;
    font-size: 0.9rem;
    font-family: "IBM Plex Mono", monospace;
}

/* ===== Start Challenges Card ===== */
.start-challenges-card {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.start-challenges-inner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.start-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 1.25rem;
}

.start-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.25);
    animation: start-pulse 2.5s ease-in-out infinite;
}

.start-icon {
    font-size: 2rem;
    color: #3b82f6;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

@keyframes start-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.start-title {
    color: #e0e0e0;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.start-subtitle {
    color: #5a6070;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.start-features {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.start-feature {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 2px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono", monospace;
    color: #6a7080;
    white-space: nowrap;
}

.start-feature i {
    color: #3b82f6;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .challenges-header h1 { font-size: 2.2rem; }
    .start-challenges-inner { padding: 2rem 1.25rem; }
    .start-features { gap: 0.6rem; }
    .start-feature { font-size: 0.75rem; padding: 0.35rem 0.7rem; }
}

/* ===== Challenge Cards ===== */
.challenges .card-wrapper {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 2px;
}

.challenge-card {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 2px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.challenge-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.08), 0 0 60px rgba(59, 130, 246, 0.04);
    transform: translateY(-4px);
}

/* Scanline overlay on hover */
.challenge-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom, transparent, transparent 2px, rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.challenge-card:hover::before {
    opacity: 1;
}

.challenge-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.55);
}

.challenge-card:hover img {
    transform: scale(1.05);
    filter: brightness(0.35);
}

.challenge-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 12, 0.95) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.challenge-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    z-index: 2;
}

.challenge-card-info h2 {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin: 0 0 8px;
}

.challenge-card-meta {
    display: flex;
    gap: 8px;
}

.challenge-difficulty {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
}

.challenge-difficulty.easy {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.challenge-difficulty.medium {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.challenge-difficulty.hard {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.solved-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 2px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.9rem;
    margin-left: 8px;
    vertical-align: middle;
}

.challenge-card.solved {
    border-color: rgba(16, 185, 129, 0.2);
}

.challenge-card.solved:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.08);
}

@media (max-width: 768px) {
    .challenges .card-wrapper { height: 240px; }
    .challenge-card-info h2 { font-size: 1.1rem; }
}

@media (max-width: 576px) {
    .challenges .card-wrapper { height: 200px; }
}

/* ===== Challenge Modal ===== */
.challenge-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1040;
    cursor: pointer;
}

.challenge-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 90%;
    max-width: 520px;
    background: #0c0c12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.challenge-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.challenge-modal-header h5 {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin: 0;
}

.challenge-modal-close {
    color: #5a6070;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.challenge-modal-close:hover {
    color: #e0e0e0;
}

.challenge-modal-body {
    padding: 1.5rem;
    color: #7a8090;
    line-height: 1.7;
}

.challenge-modal-body p {
    margin-bottom: 0.75rem;
}

.challenge-modal-body strong {
    color: #b0b8c8;
}

.challenge-difficulty-badge {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 2px;
}

.challenge-difficulty-badge.easy {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.challenge-difficulty-badge.medium {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.challenge-difficulty-badge.hard {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.challenge-alert {
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 0.9rem;
    margin: 16px 0;
    font-family: "IBM Plex Mono", monospace;
}

.challenge-alert.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.challenge-modal-body .form-label {
    color: #7a8090;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.3px;
}

.challenge-modal-body .form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: #e0e0e0;
    padding: 12px 14px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.challenge-modal-body .form-control:focus {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
    color: #e0e0e0;
}

.challenge-modal-body .form-control::placeholder {
    color: #3a4050;
}

.form-hint {
    display: block;
    color: #3a4050;
    font-size: 0.75rem;
    margin-top: 6px;
}

/* Alert styles for flag success/error */
.challenge-modal-body .alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-radius: 2px;
}

.challenge-modal-body .alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-radius: 2px;
}

.challenge-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.challenge-modal-actions .button {
    height: 40px;
    padding: 0 20px;
    font-size: 0.8rem;
}

.submit-flag-btn {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}

.submit-flag-btn:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3b82f6 !important;
}

/* ===== Scoreboard ===== */
.scoreboard-section {
    margin-top: 80px;
    margin-bottom: 60px;
}

.scoreboard-header {
    text-align: center;
    margin-bottom: 32px;
}

.scoreboard-header h2 {
    color: #e0e0e0;
    font-size: 2.2rem;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.scoreboard-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: rgba(255, 255, 255, 0.02);
}

.scoreboard-table thead tr {
    background: rgba(59, 130, 246, 0.06);
}

.scoreboard-table thead th {
    color: #8a90a0;
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scoreboard-table tbody td {
    color: #7a8090;
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.scoreboard-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.scoreboard-table tbody tr:last-child td {
    border-bottom: none;
}

.scoreboard-table tbody td strong {
    color: #b0b8c8;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: "IBM Plex Mono", monospace;
    background: rgba(255, 255, 255, 0.04);
    color: #5a6070;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-badge.gold {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.1);
}

.rank-badge.silver {
    background: rgba(192, 192, 192, 0.1);
    color: #c0c0c0;
    border-color: rgba(192, 192, 192, 0.25);
}

.rank-badge.bronze {
    background: rgba(205, 127, 50, 0.1);
    color: #cd7f32;
    border-color: rgba(205, 127, 50, 0.25);
}

.rank-disclaimer {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 2px;
    color: #7a8090;
    font-size: 0.85rem;
    font-family: "IBM Plex Mono", monospace;
    text-align: center;
}

.rank-disclaimer .fw-bold {
    color: #b0b8c8;
}

@media (max-width: 768px) {
    .scoreboard-header h2 { font-size: 1.8rem; }
}

.about {
    .header {
        font-size: 3.5rem;
        color: #e0e0e0;
    }

    @media (max-width: 575px) {
        .header {
            font-size: 2.5rem;
        }
    }
}

/* Animations */
@-webkit-keyframes tracking-in-expand-fwd-bottom {
    0% {
        letter-spacing: -0.5em;
        -webkit-transform: translateZ(-700px) translateY(500px);
        transform: translateZ(-700px) translateY(500px);
        opacity: 0;
    }

    40% {
        opacity: 0.6;
    }

    100% {
        -webkit-transform: translateZ(0) translateY(0);
        transform: translateZ(0) translateY(0);
        opacity: 1;
    }
}

@-webkit-keyframes shake-vertical {

    0%,
    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }

    10%,
    30%,
    50%,
    70% {
        -webkit-transform: translateY(-5px);
        transform: translateY(-5px);
    }

    20%,
    40%,
    60% {
        -webkit-transform: translateY(5px);
        transform: translateY(5px);
    }

    80% {
        -webkit-transform: translateY(3.4px);
        transform: translateY(3.4px);
    }

    90% {
        -webkit-transform: translateY(-3.4px);
        transform: translateY(-3.4px);
    }
}

@keyframes shake-vertical {

    0%,
    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }

    10%,
    30%,
    50%,
    70% {
        -webkit-transform: translateY(-5px);
        transform: translateY(-5px);
    }

    20%,
    40%,
    60% {
        -webkit-transform: translateY(5px);
        transform: translateY(5px);
    }

    80% {
        -webkit-transform: translateY(3.4px);
        transform: translateY(3.4px);
    }

    90% {
        -webkit-transform: translateY(-3.4px);
        transform: translateY(-3.4px);
    }
}


/* ============================
   FOOTER
   ============================ */

.custom-footer {
    position: relative;
    background: #0a0a10;
    padding: 0;
    margin-top: 80px;
    overflow: hidden;
}

.custom-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 2px,
        rgba(0, 0, 0, 0.06) 4px
    );
    z-index: 0;
}

.custom-footer::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    z-index: 0;
}

.footer-glow {
    display: none;
}

.footer-border-top {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.custom-footer .container {
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding: 50px 0 40px;
    flex-wrap: wrap;
}

/* Brand Column */
.footer-brand {
    flex: 1 1 280px;
    max-width: 320px;
}

.footer-logo img {
    width: 160px;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
}

.footer-logo:hover img {
    opacity: 0.8;
}

.footer-tagline {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0;
}

/* Links Column */
.footer-links {
    flex: 0 1 180px;
}

.footer-links-title {
    font-family: 'Russo One', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e2e8f0;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #3b82f6;
    border-radius: 0;
    opacity: 0.5;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

a.footer-menu-link,
.footer-menu-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-menu-link i {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateX(-5px);
}

a.footer-menu-link:hover,
.footer-menu-link:hover {
    color: #3b82f6;
}

.footer-menu-link:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* Connect Column */
.footer-connect {
    flex: 0 1 180px;
}

.footer-connect .footer-links-title::after {
    content: '';
}

.footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

a.footer-social-link,
.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.35s ease;
}

a.footer-social-link:hover,
.footer-social-link:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: none;
}

/* Bottom Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 8px;
}

.footer-copyright {
    color: #475569;
    font-size: 0.82rem;
    margin: 0;
}

.footer-credit {
    color: #475569;
    font-size: 0.82rem;
    margin: 0;
}

.footer-credit i {
    color: #3b82f6;
    margin: 0 2px;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-brand {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-menu-link i {
        display: none;
    }

    .footer-links,
    .footer-connect {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================
   AUTHENTICATION PAGES
   ============================ */

.auth-section {
    padding-top: 60px !important;
}

.auth-card {
    position: relative !important;
    width: 100% !important;
    max-width: 460px !important;
}

.auth-glow {
    display: none !important;
}

.auth-card .auth-card-inner,
.auth-card-inner {
    position: relative !important;
    z-index: 1 !important;
    background: rgba(12, 12, 18, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 2px !important;
    padding: 2.5rem 2rem !important;
    box-shadow: none !important;
}

.auth-title {
    font-size: 1.8rem !important;
    margin-bottom: 0.25rem !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    background-clip: unset !important;
    color: #e0e0e0 !important;
}

.auth-subtitle {
    color: #5a6070 !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

/* Google Button */
a.google-btn,
.google-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 2px !important;
    color: #b0b8c8 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

a.google-btn:hover,
.google-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #e0e0e0 !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* GitHub Button */
a.github-btn,
.github-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 2px !important;
    color: #b0b8c8 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    margin-top: 10px !important;
}

a.github-btn:hover,
.github-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #e0e0e0 !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Divider */
.auth-divider {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 1.5rem 0 !important;
}

.auth-divider::before,
.auth-divider::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.auth-divider span {
    color: #4a5060 !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-family: "IBM Plex Mono", monospace !important;
}

/* Form Fields */
.auth-field {
    margin-bottom: 1.1rem !important;
}

.auth-label,
label.auth-label {
    display: block !important;
    font-size: 0.75rem !important;
    color: #5a6070 !important;
    margin-bottom: 6px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-family: "IBM Plex Mono", monospace !important;
}

.auth-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.auth-input-wrapper>i {
    position: absolute !important;
    left: 14px !important;
    color: #3a4050 !important;
    font-size: 1rem !important;
    z-index: 1 !important;
}

input.auth-input,
.auth-input {
    width: 100% !important;
    padding: 12px 14px 12px 42px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 2px !important;
    color: #b0b8c8 !important;
    font-size: 0.95rem !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
}

input.auth-input:focus,
.auth-input:focus {
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #e0e0e0 !important;
    outline: none !important;
}

input.auth-input::placeholder,
.auth-input::placeholder {
    color: #3a4050 !important;
    opacity: 1 !important;
}

button.password-toggle,
.password-toggle {
    position: absolute !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    color: #3a4050 !important;
    cursor: pointer !important;
    padding: 4px !important;
    z-index: 1 !important;
    transition: color 0.2s !important;
    box-shadow: none !important;
}

button.password-toggle:hover,
.password-toggle:hover {
    color: #8a90a0 !important;
    background: none !important;
}

button.password-toggle:focus,
.password-toggle:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Submit Button */
button.auth-submit-btn,
a.auth-submit-btn,
.auth-submit-btn {
    width: 100% !important;
    padding: 13px 20px !important;
    background: transparent !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 2px !important;
    color: #3b82f6 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    font-family: "IBM Plex Mono", monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.25s ease !important;
    margin-top: 0.5rem !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

button.auth-submit-btn:hover,
a.auth-submit-btn:hover,
.auth-submit-btn:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: #3b82f6 !important;
    transform: none !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
}

button.auth-submit-btn:active,
.auth-submit-btn:active {
    transform: none !important;
}

button.auth-submit-btn:focus,
a.auth-submit-btn:focus,
.auth-submit-btn:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Footer text */
.auth-footer-text {
    text-align: center !important;
    color: #5a6070 !important;
    font-size: 0.88rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
}

a.auth-link,
.auth-link {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}

a.auth-link:hover,
.auth-link:hover {
    color: #60a5fa !important;
    text-decoration: underline !important;
}

/* Auth alert overrides */
.auth-card-inner .alert {
    background: rgba(220, 53, 69, 0.08) !important;
    border: 1px solid rgba(220, 53, 69, 0.2) !important;
    color: #f87171 !important;
    border-radius: 2px !important;
}

.auth-card-inner .alert .btn-close {
    filter: invert(1) !important;
    opacity: 0.6 !important;
}

/* ============================
   NAVBAR AUTH BUTTONS
   ============================ */

a.nav-login-btn,
.btn.nav-login-btn,
.nav-login-btn {
    color: #8a90a0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 2px !important;
    padding: 6px 18px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    font-family: "IBM Plex Mono", monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    background: transparent !important;
}

a.nav-login-btn:hover,
.btn.nav-login-btn:hover,
.nav-login-btn:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #e0e0e0 !important;
}

a.nav-signup-btn,
.btn.nav-signup-btn,
.nav-signup-btn {
    background: transparent !important;
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 2px !important;
    padding: 6px 18px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    font-family: "IBM Plex Mono", monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
}

a.nav-signup-btn:hover,
.btn.nav-signup-btn:hover,
.nav-signup-btn:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: #3b82f6 !important;
    transform: none !important;
    box-shadow: none !important;
    color: #3b82f6 !important;
}

/* Profile button */
.nav-profile-btn,
.btn.nav-profile-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 2px !important;
    padding: 5px 14px 5px 5px !important;
    color: #b0b8c8 !important;
    transition: all 0.25s ease !important;
}

.nav-profile-btn:hover,
.btn.nav-profile-btn:hover {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 2px),
        linear-gradient(180deg, #1e3a8a 0%, #172554 100%) !important;
    border: 1px solid #3b82f6 !important;
    color: #ffffff !important;
    filter: brightness(1.3) contrast(1.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 0 12px rgba(59, 130, 246, 0.5) !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.nav-profile-btn.is-active,
.btn.nav-profile-btn.is-active,
.nav-profile-btn[aria-expanded="true"],
.btn.nav-profile-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(59, 130, 246, 0.28) !important;
    color: #e0e0e0 !important;
}

.nav-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 2px !important;
    object-fit: cover !important;
}

.nav-avatar-placeholder {
    width: 32px !important;
    height: 32px !important;
    border-radius: 2px !important;
    background: rgba(59, 130, 246, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: #3b82f6 !important;
    font-family: "IBM Plex Mono", monospace !important;
}

.nav-username {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
}
.nav-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 2px !important;
    object-fit: cover !important;
}

.nav-avatar-placeholder {
    width: 32px !important;
    height: 32px !important;
    border-radius: 2px !important;
    background: rgba(59, 130, 246, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: #3b82f6 !important;
    font-family: "IBM Plex Mono", monospace !important;
}

.nav-username {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    max-width: 120px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-family: "IBM Plex Mono", monospace !important;
}

/* Dropdown styling */
.dropdown-menu-dark {
    background: rgba(8, 8, 12, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 2px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8) !important;
    padding: 0 !important;
    overflow: hidden;
}

.nav-profile-menu {
    min-width: 290px !important;
    margin-top: 10px !important;
}

.nav-profile-menu-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-profile-menu-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #3b82f6;
    font-family: "IBM Plex Mono", monospace;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.1);
}

.nav-profile-menu-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-profile-menu-label {
    color: #3b82f6;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.nav-profile-menu-name {
    color: #e0e0e0;
    font-size: 1.05rem;
    font-family: "Russo One", sans-serif;
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.nav-profile-menu-email {
    color: #7a8090;
    font-size: 0.75rem;
    font-family: "IBM Plex Mono", monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile-divider {
    display: none !important;
}

.dropdown-menu-dark .dropdown-item {
    padding: 14px 20px !important;
    color: #8a90a0 !important;
    transition: all 0.2s ease !important;
}

.dropdown-menu-dark .dropdown-item.nav-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "IBM Plex Mono", monospace !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-left: 2px solid transparent;
}

.dropdown-menu-dark .dropdown-item.nav-profile-link i {
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #e0e0e0 !important;
}

.dropdown-menu-dark .dropdown-item.nav-profile-link:hover,
.dropdown-menu-dark .dropdown-item.nav-profile-link:focus,
.dropdown-menu-dark .dropdown-item.nav-profile-link.active {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 2px),
        linear-gradient(180deg, #1e3a8a 0%, #172554 100%) !important;
    color: #ffffff !important;
    border: 1px solid #3b82f6;
    border-left: 2px solid #3b82f6;
    border-radius: 2px;
    filter: brightness(1.3) contrast(1.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 0 12px rgba(59, 130, 246, 0.5);
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.dropdown-menu-dark .dropdown-item.nav-profile-link:hover i,
.dropdown-menu-dark .dropdown-item.nav-profile-link:focus i,
.dropdown-menu-dark .dropdown-item.nav-profile-link.active i {
    opacity: 1;
    color: #3b82f6;
}

/* SETTINGS PAGE */

.settings-page {
    padding: 48px 0 110px;
    min-height: 100vh;
}

.settings-shell {
    max-width: 980px;
    margin: 0 auto;
}

.settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-kicker {
    margin-bottom: 8px;
    color: #5a6070;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-header h1 {
    margin: 0;
    color: #e0e0e0;
    font-size: clamp(2.1rem, 4vw, 3rem);
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.settings-hero-text {
    max-width: 520px;
    margin: 10px 0 0;
    color: #7a8090;
    font-size: 0.96rem;
}

.settings-text-link {
    color: #7a8090;
    font-size: 0.76rem;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    text-decoration: none;
}

.settings-text-link:hover {
    color: #e0e0e0;
}

.settings-summary,
.settings-panel {
    background: rgba(12, 12, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.settings-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 24px;
    margin-bottom: 20px;
    align-items: center;
}

.settings-summary-main {
    display: flex;
    align-items: center;
    gap: 18px;
}

.settings-avatar-badge {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #60a5fa;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.settings-mini-label {
    margin-bottom: 8px;
    color: #5a6070;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.settings-display-name {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.4rem;
}

.settings-handle {
    margin: 6px 0 4px;
    color: #60a5fa;
    font-size: 0.8rem;
    letter-spacing: 0.6px;
}

.settings-email {
    margin: 0;
    color: #7a8090;
    line-height: 1.5;
    word-break: break-word;
    font-size: 0.92rem;
}

.settings-summary-meta {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(88px, 1fr));
    gap: 16px;
}

.settings-summary-meta div {
    min-width: 0;
}

.settings-summary-meta dt {
    margin-bottom: 4px;
    color: #5a6070;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.settings-summary-meta dd {
    margin: 0;
    color: #e0e0e0;
    font-size: 0.92rem;
}

.settings-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.settings-panel {
    padding: 24px;
}

.settings-panel-header {
    margin-bottom: 20px;
}

.settings-panel-header h2 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.25rem;
}

.settings-panel-header p:last-child {
    margin: 8px 0 0;
    color: #7a8090;
    font-size: 0.92rem;
}

.settings-readout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.settings-readout {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.settings-readout-label {
    display: block;
    margin-bottom: 8px;
    color: #5a6070;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.settings-readout strong {
    color: #e0e0e0;
    font-size: 0.98rem;
    font-weight: 600;
}

.settings-field,
.settings-inline-form {
    width: 100%;
}

.settings-field-label {
    display: block;
    margin-bottom: 8px;
    color: #5a6070;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.settings-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
    color: #e0e0e0;
    font-size: 0.92rem;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.settings-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.34);
    background: rgba(255, 255, 255, 0.045);
}

.settings-input::placeholder {
    color: #3a4050;
    opacity: 1;
}

.settings-primary-button {
    min-width: 172px;
}

.settings-helper {
    margin: 10px 0 0;
    color: #5a6070;
    font-size: 0.76rem;
    letter-spacing: 0.3px;
}

.settings-status {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.2px;
}

.settings-status.is-visible {
    display: block;
}

.settings-status.is-loading {
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.06);
}

.settings-status.is-success {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.24);
    background: rgba(16, 185, 129, 0.08);
}

.settings-status.is-error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(248, 113, 113, 0.08);
}

.settings-note {
    margin-bottom: 16px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: #7a8090;
    border-radius: 2px;
    font-size: 0.78rem;
    line-height: 1.5;
}

.settings-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-field-wide {
    grid-column: 1 / -1;
}

.settings-password-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.settings-password-actions .settings-helper {
    margin: 0;
}

@media (max-width: 991px) {
    .nav-profile-menu {
        min-width: 280px !important;
    }

    .settings-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-summary {
        grid-template-columns: 1fr;
    }

    .settings-summary-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settings-panels {
        grid-template-columns: 1fr;
    }

    .auth-card-inner {
        padding: 2rem 1.5rem !important;
    }

    .d-flex.align-items-center.gap-2 {
        margin-top: 1rem !important;
        justify-content: center !important;
    }
}

@media (max-width: 767px) {
    .settings-hero-action,
    .settings-primary-button {
        width: 100%;
    }

    .settings-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .settings-summary,
    .settings-panel {
        padding: 18px;
    }

    .settings-summary-main {
        align-items: flex-start;
    }

    .settings-summary-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-readout-grid,
    .settings-password-grid,
    .settings-inline-form {
        grid-template-columns: 1fr;
    }

    .settings-password-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-text-link {
        text-align: center;
    }
}

/* COMICS PAGE */

/* ============================================
   COMICS GALLERY
   ============================================ */

.comic-section {
    padding: 60px 0 100px;
}

.comic-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.comic-section-header h2 {
    color: #e0e0e0;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.comic-section-header p {
    color: #5a6070;
    font-size: 0.9rem;
    font-family: "IBM Plex Mono", monospace;
    margin-top: 8px;
}

.comic-card {
    display: block;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    height: 100%;
}

.comic-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.08), 0 0 60px rgba(59, 130, 246, 0.04);
    transform: translateY(-4px);
    color: inherit;
    text-decoration: none;
}

/* Scanline overlay on hover */
.comic-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 2px,
        rgba(0, 0, 0, 0.06) 4px
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.comic-card:hover::before {
    opacity: 1;
}

.comic-card-cover {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    margin-bottom: -2px;
}

.comic-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.comic-card:hover .comic-card-cover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Vignette over cover image */
.comic-card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(8, 8, 12, 1) 92%
    );
    pointer-events: none;
    z-index: 1;
}

.comic-card-body {
    position: relative;
    padding: 0 20px 20px;
    margin-top: -40px;
    z-index: 2;
    background: #08080c;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.comic-card-title {
    font-size: 1.05rem;
    color: #d0d4dc;
    margin-bottom: 6px;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.12), -1px 0 1px rgba(0, 255, 255, 0.12);
}

.comic-card-desc {
    font-size: 0.8rem;
    color: #5a6070;
    margin: 0;
    line-height: 1.5;
    font-family: "IBM Plex Mono", monospace;
}

.comic-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comic-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #5a6070;
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.02em;
}

.comic-card-badge i {
    font-size: 0.75rem;
    color: rgba(59, 130, 246, 0.5);
}

@media (max-width: 767px) {
    .comic-card-cover {
        height: 260px;
    }
}

@media (max-width: 575px) {
    .comic-card-cover {
        height: 220px;
    }

    .comic-card-title {
        font-size: 0.95rem;
    }

    .comic-card-desc {
        font-size: 0.75rem;
    }
}


/* ============================================
   COMIC READER PAGE
   ============================================ */

.comic-reader {
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #08080c;
}

.comic-reader-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comic-reader-header .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5a6070;
    text-decoration: none;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono", monospace;
    transition: color 0.2s;
    white-space: nowrap;
}

.comic-reader-header .back-btn:hover {
    color: #3b82f6;
}

.comic-reader-header h1 {
    font-size: 1.25rem;
    margin: 0;
    color: #e0e0e0;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.comic-reader-header .reader-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.comic-reader-header .reader-actions .btn-reader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: #5a6070;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.comic-reader-header .reader-actions .btn-reader:hover {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.comic-reader-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
    min-height: 500px;
    overflow: hidden;
}

/* Vignette around the reader */
.comic-reader-area::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.flip-book {
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6), 0 0 80px rgba(0, 0, 0, 0.3);
    display: none;
    touch-action: none;
    position: relative;
    z-index: 2;
}

.page {
    padding: 0;
    background-color: #fff;
    color: #000;
    overflow: hidden;
}

.page-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controls bar */
.comic-reader-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 14px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comic-reader-controls .btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono", monospace;
    cursor: pointer;
    transition: all 0.2s;
}

.comic-reader-controls .btn-nav:hover {
    color: #e0e0e0;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
}

.comic-reader-controls .btn-nav i {
    font-size: 0.85rem;
}

/* Progress bar */
.comic-reader-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.comic-reader-progress .progress-bar-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
    position: relative;
}

.comic-reader-progress .progress-bar-fill {
    height: 100%;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 1px;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.comic-reader-progress .page-info {
    font-size: 0.75rem;
    color: #5a6070;
    font-family: "IBM Plex Mono", monospace;
    white-space: nowrap;
}

/* Keyboard hint */
.comic-reader-hint {
    text-align: center;
    padding: 0 0 16px;
    font-size: 0.7rem;
    color: rgba(90, 96, 112, 0.5);
    font-family: "IBM Plex Mono", monospace;
}

.comic-reader-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    font-size: 0.65rem;
    color: #5a6070;
    font-family: "IBM Plex Mono", monospace;
}

/* Fullscreen mode */
.comic-reader.fullscreen-mode {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 0;
}

.comic-reader.fullscreen-mode .comic-reader-area {
    min-height: 0;
}

@media (max-width: 767px) {
    .comic-reader-header h1 {
        font-size: 1rem;
    }

    .comic-reader-controls .btn-nav {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .comic-reader-progress {
        min-width: 120px;
    }

    .comic-reader-hint {
        display: none;
    }
}


/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-up,
.fade-left,
.fade-right {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.fade-up {
    transform: translateY(20px);
}

.fade-left {
    transform: translateX(-20px);
}

.fade-right {
    transform: translateX(20px);
}

.fade-up.visible,
.fade-left.visible,
.fade-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger delays for grid children */
.fade-up.delay-1 {
    transition-delay: 0.1s;
}

.fade-up.delay-2 {
    transition-delay: 0.2s;
}

.fade-up.delay-3 {
    transition-delay: 0.3s;
}

.fade-up.delay-4 {
    transition-delay: 0.4s;
}

.fade-left.delay-1 {
    transition-delay: 0.15s;
}

.fade-right.delay-1 {
    transition-delay: 0.15s;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {

    .fade-up,
    .fade-left,
    .fade-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials {
    position: relative;
}

.testimonial-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 2px;
    padding: 32px 28px 24px;
    transition: border-color 0.3s ease;
    height: 100%;
}

.testimonial-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(59, 130, 246, 0.5);
    transform: none;
    box-shadow: none;
}

.testimonial-quote-icon {
    font-family: "Georgia", serif;
    font-size: 3rem;
    color: rgba(59, 130, 246, 0.2);
    margin-bottom: 8px;
    line-height: 1;
    user-select: none;
}

.testimonial-text {
    font-size: 0.92rem;
    color: #7a8090;
    line-height: 1.75;
    font-style: normal;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 18px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    filter: grayscale(0.3);
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #c0c4cc;
    margin-bottom: 2px;
}

.testimonial-role {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: #3b82f6;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

@media (max-width: 767px) {
    .testimonial-card {
        padding: 24px 20px 20px;
    }

    .testimonial-text {
        font-size: 0.88rem;
    }
}


/* ============================================
   MISSION
   ============================================ */

.mission .mission-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mission .mission-img-wrapper img {
    transition: filter 0.4s ease;
    filter: saturate(0.7);
}

.mission .mission-img-wrapper:hover img {
    filter: saturate(1);
}

.mission .mission-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2px;
    border: none;
    pointer-events: none;
}

.mission .mission-content {
    padding: 10px 0 10px 30px;
}

.mission .mission-accent {
    width: 40px;
    height: 2px;
    background: #3b82f6;
    border-radius: 0;
    margin-bottom: 20px;
    opacity: 0.6;
}

.mission .mission-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #e0e0e0;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.mission .mission-text {
    color: #5a6070;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 28px;
}

@media (max-width: 767px) {
    .mission .mission-content {
        padding: 24px 0 0 0;
    }

    .mission .mission-title {
        font-size: 1.6rem;
    }
}

/* ============================================
   404 PAGE STYLES
   ============================================ */

.error-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.error-code {
    font-size: 10rem !important;
    line-height: 1 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    background-clip: unset !important;
    color: #e0e0e0 !important;
    margin-bottom: 1rem !important;
    text-shadow: none !important;
    font-weight: 400 !important;
}

.error-message {
    font-size: 2rem !important;
    color: #5a6070 !important;
    margin-bottom: 2rem !important;
    font-weight: 400 !important;
}

.glitch-wrapper {
    position: relative;
}

@media (max-width: 575px) {
    .error-code {
        font-size: 6rem !important;
    }

    .error-message {
        font-size: 1.5rem !important;
    }
}

/* LINE WAVES */

.line-waves-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.line-waves-container canvas,
.line-waves-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* INTERACTIVE ANOMALY SCANNER */
.scanner-layer {
    position: absolute;
    inset: 0;
    z-index: 40; 
    pointer-events: none;
    opacity: var(--scanner-visibility, 0);
    
    /* Smooth transition for both visibility and movement */
    transition: opacity 0.4s ease-out, --mouse-x 0.1s ease-out, --mouse-y 0.1s ease-out;
    
    /* The Flashlight mechanic: Reveals ONLY within a circle around the mouse */
    --mask-shape: radial-gradient(circle 180px at var(--mouse-x) var(--mouse-y), rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: var(--mask-shape);
    -webkit-mask-image: var(--mask-shape);
}

.crt-anomaly {
    position: absolute;
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    pointer-events: auto; /* Enable clicks on the bug itself */
    cursor: pointer;
    
    /* Makes the bug look like an electric Matrix anomaly - shifted to blue #3b82f6 */
    filter: sepia(100%) hue-rotate(185deg) saturate(400%) brightness(120%) drop-shadow(0 0 15px rgba(59, 130, 246, 1));
    animation: anomaly-float 4s ease-in-out infinite alternate;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.crt-anomaly:hover {
    transform: scale(1.1);
    filter: sepia(100%) hue-rotate(185deg) saturate(600%) brightness(150%) drop-shadow(0 0 20px rgba(59, 130, 246, 1));
}

.pixel-fragment {
    position: absolute;
    width: 8px; /* Slightly larger for better visibility */
    height: 8px;
    background-color: #3b82f6;
    pointer-events: none;
    z-index: 45;
    box-shadow: 0 0 12px rgba(59, 130, 246, 1); /* Boosted bloom */
    opacity: 1;
}

@keyframes fragment-fade {
    to { 
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}

@keyframes anomaly-float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.05); }
}

/* Settings Page */
.settings-page {
    padding: 80px 0 120px;
    min-height: 70vh;
}

.settings-page .container {
    max-width: 880px;
}

.settings-header {
    margin-bottom: 40px;
}

.settings-header h1 {
    color: #e0e0e0;
    font-size: 2.4rem;
    margin: 0;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.settings-header p {
    color: #7a8090;
    font-size: 0.85rem;
    margin: 6px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-profile {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.settings-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 2px;
    color: #3b82f6;
    font-family: "Russo One", sans-serif;
    font-size: 1.6rem;
}

.settings-profile-info {
    min-width: 0;
    flex: 1;
}

.settings-profile-info h2 {
    color: #e0e0e0;
    font-size: 1.4rem;
    margin: 0 0 4px;
    word-break: break-word;
}

.settings-profile-info .mono {
    color: #3b82f6;
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.settings-email {
    color: #a0a6b3;
    font-size: 0.85rem;
    margin: 0 0 6px;
    word-break: break-word;
}

.settings-verified {
    color: #34d399;
    font-size: 0.75rem;
    margin-left: 6px;
}

.settings-unverified {
    color: #fbbf24;
    font-size: 0.75rem;
    margin-left: 6px;
}

.settings-provider {
    display: inline-block;
    color: #7a8090;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
}

.settings-card-wide {
    grid-column: 1 / -1;
}

.settings-card-danger {
    border-color: rgba(248, 113, 113, 0.22);
    background: rgba(248, 113, 113, 0.03);
}

.settings-card h3 {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin: 0 0 6px;
}

.settings-card-desc {
    color: #7a8090;
    font-size: 0.85rem;
    margin: 0 0 20px;
}

.settings-label {
    display: block;
    color: #5a6070;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 12px 0 6px;
}

.settings-label:first-of-type {
    margin-top: 0;
}

.settings-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: #e0e0e0;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.settings-hint {
    color: #5a6070;
    font-size: 0.72rem;
    margin: 6px 0 0;
}

.settings-status {
    min-height: 18px;
    font-size: 0.8rem;
    margin: 16px 0 12px;
    color: #7a8090;
}

.settings-status[data-tone="error"] { color: #f87171; }
.settings-status[data-tone="success"] { color: #34d399; }
.settings-status[data-tone="loading"] { color: #3b82f6; }

.settings-card .button {
    margin-top: auto;
    align-self: flex-start;
}

.settings-danger-button {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.35);
}

.settings-danger-button:hover {
    background: rgba(248, 113, 113, 0.08);
    border-color: #f87171;
    color: #f87171;
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.08);
}

/* ============================================
   CONTENT LIBRARY
   ============================================ */

.content-detail-page {
    min-height: 100vh;
}

.content-article-hero {
    padding: 80px 0 30px;
}

.content-detail-meta,
.content-back-link,
.content-article-audience {
    color: #3b82f6;
    font-size: 0.76rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.content-detail-title {
    color: #e0e0e0;
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    line-height: 1.12;
    margin: 0 0 16px;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.content-detail-summary {
    color: #8a90a0;
    font-size: 1.02rem;
    line-height: 1.8;
    max-width: 760px;
}

.content-library {
    padding: 70px 0 110px;
}

.content-library-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.content-library-header h2 {
    color: #e0e0e0;
    margin: 0;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.content-library-header p {
    margin: 10px 0 0;
    color: #5a6070;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.content-filter-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 30px auto 46px;
}

.content-filter {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: transparent;
    color: #7a8090;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    padding: 7px 14px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.content-filter:hover {
    color: #b0b8c8;
    border-color: rgba(255, 255, 255, 0.16);
}

.content-filter.is-active {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.06);
}

.content-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.content-card:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.08), 0 0 60px rgba(59, 130, 246, 0.04);
}

.content-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0c0c12;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.content-card-cover img {
    transition: transform 0.5s ease;
}

.content-card:hover .content-card-cover img {
    transform: scale(1.04);
}

.content-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.content-card-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #5a6070;
    font-size: 0.68rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.content-card-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.7);
}

.content-card-title {
    color: #d0d4dc;
    font-size: 1.02rem;
    line-height: 1.4;
    margin: 12px 0 10px;
    text-shadow: 1px 0 1px rgba(255, 0, 0, 0.1), -1px 0 1px rgba(0, 255, 255, 0.1);
}

.content-card-desc {
    color: #5a6070;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #5a6070;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
}

.content-card-foot span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.content-card-foot i {
    color: rgba(59, 130, 246, 0.65);
    font-size: 0.82rem;
}

.content-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    text-decoration: none;
}

.content-back-link:hover {
    color: #e0e0e0;
}

.content-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.content-detail-meta span {
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.06);
    padding: 5px 8px;
}

.content-video-section {
    padding: 8px 0 24px;
}

.content-related-section {
    padding: 24px 0;
}

.content-related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 14px 16px;
    color: #b0b8c8;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.content-related-card:hover {
    color: #e0e0e0;
    border-color: rgba(59, 130, 246, 0.32);
    background: rgba(59, 130, 246, 0.06);
}

.content-video-frame {
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    background: #050508;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-video-frame iframe,
.content-video-frame video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.content-rendered-video {
    max-width: 100%;
    max-height: 100%;
    background: #050508;
    object-fit: contain !important;
    object-position: center center !important;
    pointer-events: auto;
}

.content-article-shell {
    padding: 42px 0 70px;
}

.content-article-body {
    color: #a0a6b3;
    font-size: 1rem;
    line-height: 1.86;
}

.content-article-body h2 {
    color: #e0e0e0;
    font-family: "Russo One", sans-serif;
    font-size: 1.45rem;
    margin: 34px 0 12px;
}

.content-article-body p {
    margin: 0 0 18px;
}

.content-article-sidebar {
    position: sticky;
    top: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
}

.content-article-sidebar h3 {
    color: #d0d4dc;
    font-size: 1rem;
    margin: 0 0 14px;
}

.content-article-sidebar ul {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding-left: 18px;
}

.content-article-sidebar li {
    color: #9aa2b2;
    font-size: 0.86rem;
    line-height: 1.55;
}

.content-source-list {
    display: grid;
    gap: 9px;
}

.content-source-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #7a8090;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    text-decoration: none;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.content-source-list a:hover {
    color: #e0e0e0;
    border-color: rgba(59, 130, 246, 0.28);
}

.content-related-header {
    margin-bottom: 18px;
}

.content-related-header p {
    color: #3b82f6;
    font-size: 0.72rem;
    letter-spacing: 1.3px;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.content-related-header h2 {
    color: #e0e0e0;
    font-size: 1.6rem;
    margin: 0;
}

.content-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.content-related-card {
    display: grid;
    align-content: start;
}

.content-related-card span {
    color: #3b82f6;
    font-size: 0.68rem;
    text-transform: uppercase;
}

.content-related-card strong {
    color: #d0d4dc;
    font-size: 0.92rem;
    line-height: 1.45;
}

.content-not-found {
    max-width: 620px;
    margin: 70px auto;
    text-align: center;
}

.content-not-found p {
    color: #3b82f6;
}

.content-not-found h1 {
    color: #e0e0e0;
    margin-bottom: 22px;
}

@media (max-width: 991px) {
    .content-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-article-sidebar {
        position: static;
    }
}

@media (max-width: 575px) {
    .content-library-hero,
    .content-article-hero {
        padding-top: 54px;
    }

    .content-related-grid {
        grid-template-columns: 1fr;
    }
}
