:root {
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --bg-body: #050505;
    --bg-card: rgba(20, 20, 28, 0.85);
    --bg-sidebar: rgba(10, 10, 15, 0.98);
    --bg-input: rgba(255, 255, 255, 0.08);
    --bg-modal: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border-color: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.8);
    --nexus-glitch-1: #00f3ff;
    --nexus-glitch-2: #ff0055;
    --spark-blend: screen;
}

html.light-mode body {
    --neon-blue: #0055ff;
    --neon-purple: #aa00ff;
    --bg-body: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-sidebar: rgba(255, 255, 255, 0.98);
    --bg-input: #ffffff;
    --bg-modal: #ffffff;
    --text-primary: #111;
    --text-secondary: #555;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --nexus-glitch-1: #0055ff;
    --nexus-glitch-2: #ff0055;
    --spark-blend: multiply;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.4s ease;
}

#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- SHARED MODAL STYLES --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-modal);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #333;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal:not(.hidden) .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: #fff;
    transform: scale(1.1);
}

.modal-title {
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 26px;
    margin-bottom: 25px;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
}

/* AUTH SPECIFIC */
.auth-box {
    width: 380px;
}

.auth-forms input {
    width: 100%;
    height: 50px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    padding: 0 15px;
    color: #eee;
    font-family: 'Inter', sans-serif;
    transition: 0.2s;
    text-align: left;
}

.auth-forms input:focus {
    border-color: var(--neon-blue);
    background: #2a2a2a;
    outline: none;
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-right: 60px;
}

.toggle-pass {
    position: absolute;
    right: 15px;
    top: 25px;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--neon-blue);
    cursor: pointer;
    font-weight: 800;
    font-family: 'Rajdhani';
    letter-spacing: 1px;
    user-select: none;
    z-index: 5;
}

.primary {
    width: 100%;
    height: 50px;
    background: var(--neon-blue);
    border: none;
    font-weight: 800;
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 5px;
    color: #000;
    font-family: 'Rajdhani';
    transition: 0.2s;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.4);
}

.secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-family: 'Rajdhani';
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}

.secondary:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

#auth-error {
    color: #ff0055;
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    font-weight: bold;
    font-family: 'Rajdhani';
}

/* ABOUT SPECIFIC */
.about-box {
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h3 {
    font-family: 'Rajdhani';
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.model-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-family: 'Rajdhani';
    font-weight: 800;
    font-size: 18px;
}

.badge {
    font-size: 10px;
    background: var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.about-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.about-content strong {
    color: var(--text-primary);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 15px;
    position: relative;
}

.feature-list li:before {
    content: "•";
    color: var(--neon-blue);
    position: absolute;
    left: 0;
}

/* Light Mode Overrides for Modals */
html.light-mode .modal-box {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html.light-mode .modal-title {
    color: #111;
}

html.light-mode .auth-close,
html.light-mode .modal-close {
    color: #555;
}

html.light-mode .auth-forms input {
    background: #f0f0f0;
    border-color: #ccc;
    color: #111;
}

html.light-mode .secondary {
    border-color: #ddd;
    color: #555;
}

html.light-mode .model-card {
    background: #f5f5f5;
    border-color: #ddd;
}

/* --- SIDEBAR --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -360px;
    width: 350px;
    height: 100%;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 100px 40px;
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(20px);
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.5);
}

.sidebar.open {
    left: 0;
}

.menu-btn {
    position: fixed;
    top: 25px;
    left: 25px;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.menu-btn:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--neon-blue);
    transition: 0.3s;
}

body.menu-open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

body.menu-open .bar:nth-child(2) {
    opacity: 0;
}

body.menu-open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

.hud-header {
    font-family: 'Rajdhani';
    color: var(--neon-blue);
    font-size: 28px;
    font-weight: 800;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.nav-item {
    padding: 18px 15px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Rajdhani';
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: 0.2s;
    margin-bottom: 10px;
}

.nav-item:hover {
    color: var(--text-primary);
    padding-left: 25px;
    background: linear-gradient(90deg, var(--bg-input), transparent);
    border-left: 4px solid var(--neon-blue);
}

.nav-item.active {
    color: var(--neon-blue);
    border-left: 4px solid var(--neon-blue);
    padding-left: 25px;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-family: 'Rajdhani';
    font-size: 15px;
    color: var(--text-secondary);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff0055;
    box-shadow: 0 0 10px #ff0055;
    transition: 0.3s;
}

.hud-footer {
    position: absolute;
    bottom: 40px;
    font-family: 'Rajdhani';
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* --- LAYOUT --- */
.main-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

body.menu-open .main-container {
    filter: blur(5px) brightness(0.5);
    pointer-events: auto;
    cursor: pointer;
}

/* --- SEARCH --- */
.hero {
    margin: 60px 0 50px 0;
    text-align: center;
    width: 100%;
}

.cyber-glitch {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 90px;
    letter-spacing: 10px;
    color: var(--text-primary);
    text-shadow: 3px 3px 0 var(--nexus-glitch-1), -3px -3px 0 var(--nexus-glitch-2);
    animation: glitch 4s infinite linear alternate-reverse;
}

.subtitle {
    font-family: 'Rajdhani';
    color: var(--text-secondary);
    letter-spacing: 6px;
    font-size: 16px;
    margin-top: 10px;
    text-transform: uppercase;
}

@keyframes glitch {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(-1deg);
    }

    40% {
        transform: skew(1deg);
    }

    100% {
        transform: skew(0deg);
    }
}

.search-container {
    width: 100%;
    max-width: 750px;
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

input#search-input {
    width: 100%;
    height: 70px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 40px;
    color: var(--text-primary);
    font-family: 'Rajdhani';
    font-size: 22px;
    padding: 0 120px 0 40px;
    outline: none;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

input#search-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    background: var(--bg-card);
}

.icon-btn {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-secondary);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.icon-btn:hover {
    color: var(--neon-blue);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.dice-btn {
    right: 70px;
}

.search-btn {
    right: 10px;
    color: var(--neon-blue);
}

/* --- FILTERS & CARDS --- */
#filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Rajdhani';
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    letter-spacing: 1px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--neon-blue);
    color: #000;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns */
    gap: 24px;
    padding: 20px 40px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 243, 255, 0.15);
    border-color: var(--neon-blue);
    z-index: 2;
}

.card:hover .card-media-wrapper img {
    transform: scale(1.08);
}

.card-media-wrapper {
    width: 100%;
    aspect-ratio: 2 / 3;
    position: relative;
    background: #0b0b0f;
    overflow: hidden;
}

.card-media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 1;
}

.card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.card img.loaded {
    opacity: 1;
}

.match-bar-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 15px;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on smaller laptops */
        padding: 20px;
    }
}

@media (max-width: 900px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablets */
    }
}

@media (max-width: 500px) {
    .results-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
        padding: 15px;
        gap: 20px;
    }
}

.match-label-base {
    font-family: 'Rajdhani';
    font-weight: 800;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.label-cyan {
    background: rgba(0, 243, 255, 0.2);
    color: #00f3ff;
    border: 1px solid #00f3ff;
}

.label-pink {
    background: rgba(255, 0, 85, 0.2);
    color: #ff0055;
    border: 1px solid #ff0055;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    font-family: 'Rajdhani';
    font-size: 20px;
    margin: 10px 0;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.2;
}

.card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}

.badge-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
    height: 30px;
}

.type-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid transparent;
    letter-spacing: 0.5px;
}

.type-movie {
    border-color: #00f3ff;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
}

.type-tv {
    border-color: #00ff9d;
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.1);
}

.type-anime {
    border-color: #ff0055;
    color: #ff0055;
    background: rgba(255, 0, 85, 0.1);
}

.type-doc {
    border-color: #ffd700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

/* NEW RATING BADGE STYLE */
.rating-badge {
    font-size: 12px;
    color: #ffd700;
    /* Lighter yellow text */
    background-color: #a08c1d;
    /* Darker yellow/gold background */
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    /* Subtle golden glow */
}

.wishlist-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: #ff0055;
    font-size: 24px;
    cursor: pointer;
    transition: 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 50%;
}

.wishlist-btn:hover {
    color: #ffffff !important;
    text-shadow: 0 0 15px #ff0055;
    transform: scale(1.15);
    background: rgba(255, 0, 85, 0.15);
}

.similar-btn {
    width: 100%;
    padding: 12px;
    margin-top: auto;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: 'Rajdhani';
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 8px;
}

.similar-btn:hover {
    background: var(--neon-blue);
    color: #000;
    border-color: var(--neon-blue);
}

.back-btn {
    grid-column: 1 / -1;
    width: 220px;
    margin: 0 auto 30px auto;
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Rajdhani';
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 2px;
    transition: 0.3s;
    text-transform: uppercase;
}

.back-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px var(--neon-blue);
    transform: scale(1.05);
}

/* --- MODEL SELECTOR --- */
.model-selector {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2001;
    font-family: 'Inter';
}

.selected-model {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.selected-model:hover {
    border-color: var(--neon-blue);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.model-menu {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 300px;
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    transform: translateY(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.model-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.model-option {
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.model-option:hover {
    background: var(--bg-input);
}

.model-option.active {
    background: var(--bg-input);
    border-left: 3px solid var(--neon-blue);
}

.opt-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 4px;
}

.opt-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* --- THEME TOGGLE --- */
.theme-wrapper {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
}

.switch {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #222;
    border: 1px solid #444;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    z-index: 2;
}

/* NEW: Glowing Orange Sun for Light Mode */
input:checked+.slider:before {
    transform: translateX(32px);
    background: #ff5722;
    /* Orange background */
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.8);
    /* Orange glow */
}

html.light-mode .slider {
    background: #e0e0e0;
    border-color: #ccc;
}

/* No need to override slider:before background here, as the input:checked rule handles it */
.slider svg {
    width: 16px;
    height: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: 0.3s;
    z-index: 1;
}

.sun {
    color: #ffd700;
    opacity: 0;
    left: 8px;
}

.moon {
    color: #a6c0fe;
    opacity: 1;
    right: 8px;
}

input:checked+.slider .sun {
    opacity: 1;
}

input:checked+.slider .moon {
    opacity: 0;
}

.history-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}

.hist-time {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--neon-purple);
}

.hist-query {
    font-family: 'Rajdhani';
    font-size: 16px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hist-btn {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 10px;
    border-radius: 4px;
}

.hist-btn:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CUSTOM SCROLLBARS (WEBKIT) --- */
/* The Track */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* The Background */
::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-left: 1px solid var(--border-color);
}

/* The Moving Handle */
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Handle on Hover */
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
    border-color: #fff;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* Light Mode Scrollbar Overrides */
html.light-mode ::-webkit-scrollbar-track {
    background: #f0f0f0;
}

html.light-mode ::-webkit-scrollbar-thumb {
    background: #ccc;
    border-color: #bbb;
}

html.light-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .cyber-glitch {
        font-size: 50px;
        /* Smaller title on mobile */
        letter-spacing: 4px;
    }

    .sidebar {
        width: 100%;
        /* Full width sidebar on mobile */
        left: -100%;
    }

    .search-container {
        padding: 0 20px;
    }

    .input-wrapper input#search-input {
        font-size: 16px;
        /* Prevents iOS zooming on focus */
        padding-right: 90px;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .dice-btn {
        right: 50px;
    }

    .search-btn {
        right: 5px;
    }
}