/**
 * TrekTerest.com - Main Stylesheet
 * Star Trek Gallery - Modern Sci-Fi Design
 * Inspired by Discovery & Strange New Worlds aesthetics
 */

/* =====================================================
   CSS VARIABLES - Color Palette
   ===================================================== */
:root {
    /* Primary Colors */
    --color-space-black: #0a0a1a;
    --color-space-deep: #050510;
    --color-nebula: #0d1025;
    
    /* Star Trek Blues */
    --color-starfleet: #00a8ff;
    --color-starfleet-dark: #0077b3;
    --color-starfleet-light: #66ccff;
    --color-starfleet-glow: rgba(0, 168, 255, 0.5);
    
    /* LCARS Colors */
    --color-lcars-orange: #ff9500;
    --color-lcars-gold: #ffcc00;
    --color-lcars-red: #cc0000;
    --color-lcars-purple: #9977aa;
    --color-lcars-blue: #6688cc;
    
    /* Series Badge Colors */
    --color-tos: #cc9900;
    --color-tng: #9999cc;
    --color-ds9: #996633;
    --color-voy: #669999;
    --color-ent: #336699;
    --color-dsc: #0099cc;
    --color-pic: #663399;
    --color-snw: #cc6633;
    --color-ld: #9933cc;
    --color-pro: #66cc99;
    --color-sfa: #cc3366;
    
    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0c0;
    --color-text-muted: #606080;
    
    /* Glow Effects */
    --glow-blue: 0 0 20px rgba(0, 168, 255, 0.5), 0 0 40px rgba(0, 168, 255, 0.3);
    --glow-orange: 0 0 20px rgba(255, 149, 0, 0.5), 0 0 40px rgba(255, 149, 0, 0.3);
    
    /* Fonts */
    --font-display: 'Orbitron', sans-serif;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --navbar-height: 70px;
}

/* Light Theme Variables */
[data-bs-theme="light"] {
    --color-space-black: #f0f2f5;
    --color-space-deep: #e5e8ed;
    --color-nebula: #dde1e7;
    --color-text-primary: #1a1a2e;
    --color-text-secondary: #4a4a6a;
    --color-text-muted: #8a8aa0;
}

/* =====================================================
   BASE STYLES
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-space-black);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Selection */
::selection {
    background: var(--color-starfleet);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-space-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--color-starfleet-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-starfleet);
}

/* =====================================================
   ANIMATED BACKGROUND - Stars
   ===================================================== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: 
        radial-gradient(ellipse at center, var(--color-nebula) 0%, var(--color-space-black) 70%),
        linear-gradient(180deg, var(--color-space-deep) 0%, var(--color-space-black) 100%);
}

.stars-container::before,
.stars-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, #fff, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 370px 200px, #fff, transparent),
        radial-gradient(2px 2px at 450px 50px, rgba(255,255,255,0.8), transparent);
    background-size: 500px 500px;
    animation: twinkle 8s ease-in-out infinite;
}

.stars-container::after {
    background-size: 700px 700px;
    animation: twinkle 12s ease-in-out infinite reverse;
    opacity: 0.5;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Warp Speed Effect */
.warp-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(ellipse at center, transparent 0%, var(--color-space-black) 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.warp-effect.active {
    opacity: 1;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.navbar {
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
    padding: 0.5rem 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(5, 5, 16, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

/* Brand */
.navbar-brand {
    font-family: var(--font-display);
    text-decoration: none;
}

.brand-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 168, 255, 0.5));
    transition: transform var(--transition-normal), filter var(--transition-normal);
}

.navbar-brand:hover .brand-logo {
    transform: rotate(360deg);
    filter: drop-shadow(0 0 12px rgba(0, 168, 255, 0.8));
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--color-starfleet) 0%, var(--color-starfleet-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: var(--glow-blue);
    transition: transform var(--transition-normal);
}

.navbar-brand:hover .brand-icon {
    transform: rotate(360deg);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.brand-tagline {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-starfleet);
}

/* Nav Links */
.navbar-nav .nav-link {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--color-starfleet-light);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-starfleet);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* LCARS Bar */
.lcars-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-lcars-orange) 0%, 
        var(--color-lcars-orange) 20%, 
        transparent 20%, 
        transparent 25%, 
        var(--color-starfleet) 25%, 
        var(--color-starfleet) 75%,
        transparent 75%,
        transparent 80%,
        var(--color-lcars-purple) 80%,
        var(--color-lcars-purple) 100%
    );
    opacity: 0.8;
}

/* Mega Menu */
.mega-menu {
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 0 0 10px 10px;
    padding: 2rem;
    min-width: 800px;
}

.mega-menu .dropdown-header {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-starfleet);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
}

.dropdown-menu {
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 168, 255, 0.3);
}

.dropdown-item {
    color: var(--color-text-secondary);
    padding: 0.6rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 168, 255, 0.1);
    color: var(--color-starfleet-light);
}

/* Series Badges */
.series-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    margin-right: 10px;
    text-transform: uppercase;
}

.series-badge.tos { background: var(--color-tos); color: #000; }
.series-badge.tng { background: var(--color-tng); color: #000; }
.series-badge.ds9 { background: var(--color-ds9); color: #fff; }
.series-badge.voy { background: var(--color-voy); color: #000; }
.series-badge.ent { background: var(--color-ent); color: #fff; }
.series-badge.dsc { background: var(--color-dsc); color: #000; }
.series-badge.pic { background: var(--color-pic); color: #fff; }
.series-badge.snw { background: var(--color-snw); color: #fff; }
.series-badge.ld { background: var(--color-ld); color: #fff; }
.series-badge.pro { background: var(--color-pro); color: #000; }
.series-badge.sfa { background: var(--color-sfa); color: #fff; }

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    padding-top: calc(var(--navbar-height) + 20px);
    min-height: 100vh;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(10, 10, 26, 0.3) 0%, 
        rgba(10, 10, 26, 0.8) 50%,
        var(--color-space-black) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Hero Title Wrapper - Antimatter Reaction Effect */
.hero-title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    background: linear-gradient(
        135deg,
        #00d4ff 0%,
        #00a8ff 10%,
        #ffffff 25%,
        #fff8e0 40%,
        #ffcc00 55%,
        #ff8800 70%,
        #ff4400 85%,
        #ff0000 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: antimatterShift 5s ease infinite;
    position: relative;
    z-index: 2;
}

.hero-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(
        135deg,
        #00d4ff 0%,
        #00a8ff 10%,
        #ffffff 25%,
        #fff8e0 40%,
        #ffcc00 55%,
        #ff8800 70%,
        #ff4400 85%,
        #ff0000 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(8px);
    opacity: 0.7;
    z-index: -1;
    animation: antimatterShift 5s ease infinite;
}

@keyframes antimatterShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-blue);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-starfleet);
}

.stat-label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =====================================================
   SECTION TITLES
   ===================================================== */
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-starfleet), transparent);
}

.section-subtitle {
    font-family: var(--font-heading);
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* =====================================================
   SERIES CARDS
   ===================================================== */
.series-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(0, 168, 255, 0.2);
    transition: all var(--transition-normal);
    height: 100%;
}

/* Single spark with integrated trail that travels along the border */
.series-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ffffff 0%, #ff6666 40%, #ff3333 70%, transparent 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 6px 2px #ff4444,
        0 0 12px 4px #ff3333,
        0 0 20px 6px rgba(255, 50, 50, 0.6),
        /* Trail effect using multiple shadows */
        -6px 0 5px 1px rgba(255, 100, 50, 0.5),
        -12px 0 4px 1px rgba(255, 80, 50, 0.4),
        -18px 0 3px 1px rgba(255, 60, 50, 0.3),
        -24px 0 2px 1px rgba(255, 50, 50, 0.2);
    opacity: 0;
    z-index: 20;
    pointer-events: none;
}

.series-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 168, 255, 0.3);
    border-color: var(--color-starfleet);
}

.series-card:hover::after {
    opacity: 1;
    animation: sparkPath 4s linear infinite;
}

/* Spark travels along rectangular border with trail rotation */
@keyframes sparkPath {
    /* Start top-left corner, move right along top edge */
    0% {
        top: -6px;
        left: -6px;
        transform: rotate(0deg);
    }
    /* Top-right corner */
    24% {
        top: -6px;
        left: calc(100% - 6px);
        transform: rotate(0deg);
    }
    /* Turn corner - going down */
    25% {
        top: -6px;
        left: calc(100% - 6px);
        transform: rotate(90deg);
    }
    /* Bottom-right corner */
    49% {
        top: calc(100% - 6px);
        left: calc(100% - 6px);
        transform: rotate(90deg);
    }
    /* Turn corner - going left */
    50% {
        top: calc(100% - 6px);
        left: calc(100% - 6px);
        transform: rotate(180deg);
    }
    /* Bottom-left corner */
    74% {
        top: calc(100% - 6px);
        left: -6px;
        transform: rotate(180deg);
    }
    /* Turn corner - going up */
    75% {
        top: calc(100% - 6px);
        left: -6px;
        transform: rotate(270deg);
    }
    /* Back to top-left */
    100% {
        top: -6px;
        left: -6px;
        transform: rotate(270deg);
    }
}

.series-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

/* Holographic scanline effect */
.series-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 168, 255, 0.03) 2px,
        rgba(0, 168, 255, 0.03) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.series-card:hover .series-card-image::after {
    opacity: 1;
}

.series-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter 0.3s ease;
}

.series-card:hover .series-card-image img {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.2);
}

.series-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 26, 0.9) 100%);
}

.series-card-body {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
}

.series-card-footer {
    position: relative;
    z-index: 1;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 168, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.series-card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.series-card-title a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.series-card-title a:hover {
    color: var(--color-starfleet);
}

.series-card-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-card-count {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-starfleet);
}

.series-card-btn {
    background: transparent;
    border: 1px solid var(--color-starfleet);
    color: var(--color-starfleet);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.series-card-btn:hover {
    background: var(--color-starfleet);
    color: #fff;
    text-decoration: none;
}

/* =====================================================
   GALLERY GRID (Masonry)
   ===================================================== */
.gallery-container {
    padding: 2rem 0;
}

.gallery-container .container {
    max-width: 1400px;
}

.gallery-filters {
    margin-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(0, 168, 255, 0.3);
    color: var(--color-text-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    margin: 0.25rem;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-starfleet);
    border-color: var(--color-starfleet);
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* For Masonry layout */
.gallery-masonry {
    column-count: 4;
    column-gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1400px) {
    .gallery-masonry { column-count: 3; }
}

@media (max-width: 992px) {
    .gallery-masonry { column-count: 2; }
}

@media (max-width: 576px) {
    .gallery-masonry { column-count: 2; column-gap: 0.75rem; }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(20, 20, 40, 0.5);
    border: 1px solid rgba(0, 168, 255, 0.1);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 168, 255, 0.2);
    border-color: var(--color-starfleet);
}

/* Clickable link covers entire item */
.gallery-item .gallery-item-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
    vertical-align: bottom;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none; /* Always none - let clicks pass through to the link */
    z-index: 10;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    /* Keep pointer-events: none on the overlay itself */
}

.gallery-item-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: #fff;
    margin: 0;
}

.gallery-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.gallery-item-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    pointer-events: auto; /* Buttons are clickable even though overlay is not */
    position: relative;
    z-index: 15;
}

.gallery-item-title {
    pointer-events: none; /* Title doesn't need clicks */
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination .page-item .page-link {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid rgba(0, 168, 255, 0.3);
    color: var(--color-text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    transition: all var(--transition-fast);
}

.pagination .page-item .page-link:hover {
    background: rgba(0, 168, 255, 0.2);
    border-color: var(--color-starfleet);
    color: var(--color-starfleet);
}

.pagination .page-item.active .page-link {
    background: var(--color-starfleet);
    border-color: var(--color-starfleet);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: rgba(20, 20, 40, 0.3);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

/* =====================================================
   LIGHTBOX CUSTOMIZATION
   ===================================================== */
.glightbox-clean .gslide-description {
    background: rgba(10, 10, 26, 0.95);
}

.glightbox-clean .gdesc-inner {
    padding: 1rem;
}

.glightbox-clean .gslide-title {
    font-family: var(--font-heading);
    color: var(--color-starfleet);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: linear-gradient(180deg, var(--color-space-black) 0%, var(--color-space-deep) 100%);
    border-top: 1px solid rgba(0, 168, 255, 0.2);
    margin-top: 4rem;
    position: relative;
}

.footer-warp-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--color-starfleet) 20%,
        var(--color-lcars-orange) 50%,
        var(--color-starfleet) 80%,
        transparent 100%
    );
    animation: warpLine 3s linear infinite;
}

@keyframes warpLine {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.footer-brand {
    font-family: var(--font-display);
    color: var(--color-text-primary);
}

.footer-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 168, 255, 0.4));
}

.footer-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-starfleet);
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-starfleet);
    padding-left: 5px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 168, 255, 0.1);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--color-starfleet) 0%, var(--color-starfleet-dark) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-starfleet-light) 0%, var(--color-starfleet) 100%);
    transform: translateY(-2px);
    box-shadow: var(--glow-blue);
}

.btn-outline-primary {
    border: 2px solid var(--color-starfleet);
    color: var(--color-starfleet);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--color-starfleet);
    color: #fff;
}

.btn-lcars {
    background: var(--color-lcars-orange);
    color: #000;
    border: none;
    border-radius: 25px 5px 25px 5px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-lcars:hover {
    background: var(--color-lcars-gold);
}

/* =====================================================
   BACK TO TOP
   ===================================================== */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--glow-blue);
}

.btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =====================================================
   COOKIE CONSENT
   ===================================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 168, 255, 0.3);
    padding: 1rem 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.cookie-consent.show {
    transform: translateY(0);
}

/* =====================================================
   LOADING ANIMATION
   ===================================================== */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 168, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-starfleet);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Animation Classes */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   ACCORDION STYLES (Quotes & Video Chapters)
   ===================================================== */
.accordion-button {
    background: transparent !important;
    border: none;
    box-shadow: none !important;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    color: var(--color-starfleet) !important;
}

.accordion-button::after {
    filter: invert(1);
    opacity: 0.5;
}

.accordion-button:not(.collapsed)::after {
    filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(180deg) brightness(100%) contrast(100%);
    opacity: 1;
}

.accordion-body {
    background: rgba(13, 16, 37, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 168, 255, 0.1);
}

.quote-item {
    transition: all var(--transition-fast);
}

.quote-item:hover {
    transform: translateX(5px);
}

.quote-item p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

#videoChapters .accordion-body {
    background: rgba(10, 10, 26, 0.8);
}

#quotesAccordion .accordion-button,
#videoAccordion .accordion-button {
    border-bottom: 1px dashed rgba(0, 168, 255, 0.2);
    border-radius: 0;
}

/* =====================================================
   LEGAL PAGES (Disclaimer, Copyright, etc.)
   ===================================================== */
.page-header-section {
    min-height: 200px;
    display: flex;
    align-items: center;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section .section-title {
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 168, 255, 0.3);
    margin-bottom: 1.5rem;
}

.legal-content {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content h3,
.legal-content h4 {
    color: var(--color-text-primary);
    margin-top: 1.5rem;
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--color-starfleet);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.legal-content a:hover {
    color: var(--color-starfleet-light);
    text-decoration: underline;
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 992px) {
    .mega-menu {
        min-width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    
    .navbar-brand .brand-name {
        font-size: 1.2rem;
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .series-card-image {
        height: 150px;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .navbar,
    .btn-back-to-top,
    .cookie-consent,
    .stars-container,
    .warp-effect {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}

/* =====================================================
   STARDATE CALCULATOR STYLES
   ===================================================== */
.current-stardate-panel {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), rgba(255, 149, 0, 0.05));
    border: 2px solid var(--color-starfleet);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.current-stardate-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-lcars-orange), var(--color-starfleet), var(--color-lcars-purple));
}

.current-stardate {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-starfleet);
    text-shadow: var(--glow-blue);
    letter-spacing: 4px;
    animation: pulseSlow 3s ease-in-out infinite;
}

@keyframes pulseSlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.calculator-panel {
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.calc-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 10px;
    transition: var(--transition-normal);
}

.calc-card:hover {
    border-color: var(--color-starfleet);
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.2);
}

.result-display {
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid var(--color-starfleet);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.result-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.result-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-lcars-gold);
}

.formula-box {
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--color-lcars-orange);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.formula-box code {
    display: block;
    background: rgba(0, 168, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--color-starfleet-light);
}

/* =====================================================
   LCARS PANEL STYLES
   ===================================================== */
.lcars-panel {
    background: rgba(15, 15, 35, 0.9);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.lcars-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--color-lcars-orange) 0%, 
        var(--color-lcars-orange) 30%, 
        var(--color-lcars-gold) 30%, 
        var(--color-lcars-gold) 50%,
        var(--color-lcars-purple) 50%,
        var(--color-lcars-purple) 70%,
        var(--color-lcars-blue) 70%,
        var(--color-lcars-blue) 100%
    );
    border-radius: 20px 0 0 20px;
}

.lcars-panel > * {
    position: relative;
    margin-left: 90px;
}

@media (max-width: 768px) {
    .lcars-panel::before {
        width: 15px;
    }
    .lcars-panel > * {
        margin-left: 25px;
    }
    .current-stardate {
        font-size: 2.5rem;
    }
}

/* =====================================================
   SERIES CARD STYLES FOR TV/MOVIES FAQ
   ===================================================== */
.series-card {
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition-normal);
}

.series-card:hover {
    border-color: var(--color-starfleet);
    box-shadow: 0 0 30px rgba(0, 168, 255, 0.15);
}

.series-logo {
    max-width: 200px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.episode-list {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.episode-numbers {
    font-size: 0.9rem;
    padding-left: 1.5rem;
}

.episode-numbers li {
    padding: 0.25rem 0;
    color: var(--color-text-secondary);
}

/* =====================================================
   TIMELINE STYLES FOR CHRONOLOGY
   ===================================================== */
.timeline-section {
    position: relative;
    padding-left: 30px;
}

.timeline-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-starfleet), var(--color-lcars-purple));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 1rem 0;
    padding-left: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--color-starfleet);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-starfleet);
}

.timeline-year {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-lcars-gold);
    display: inline-block;
    min-width: 60px;
}

/* =====================================================
   RULES OF ACQUISITION & PRIME DIRECTIVE
   ===================================================== */
.rule-card {
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition-normal);
}

.rule-card:hover {
    border-color: var(--color-lcars-gold);
    transform: translateX(5px);
}

.rule-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-lcars-gold);
    min-width: 80px;
    display: inline-block;
}

.rule-text {
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.directive-text {
    font-size: 1.2rem;
    line-height: 1.8;
    font-style: italic;
    padding: 2rem;
    background: rgba(0, 168, 255, 0.1);
    border-left: 4px solid var(--color-starfleet);
    border-radius: 0 10px 10px 0;
}

/* =====================================================
   FAQ ACCORDION STYLES
   ===================================================== */
.faq-accordion .accordion-item {
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(0, 168, 255, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 10px !important;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    background: transparent;
    color: var(--color-text-primary);
    font-weight: 600;
    padding: 1.25rem;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(0, 168, 255, 0.1);
    color: var(--color-starfleet-light);
}

.faq-accordion .accordion-button::after {
    filter: invert(1);
}

.faq-accordion .accordion-body {
    background: rgba(0, 0, 0, 0.2);
    color: var(--color-text-secondary);
}
