:root {
    --red: #ff0008;
    --black: #0a0a0a;
    --gold: #eb9423;
    --white: #f2f2f2;
    --gray: #3c3c3c;
    --grid-gap: 2.5rem;
}

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

body {
    background: var(--black);
    color: var(--white);
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none;
}

/* --- SYSTEM HUD OVERLAY --- */
.system-hud {
    position: fixed;
    inset: 2rem;
    pointer-events: none;
    z-index: 100;
}

.system-hud .corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--gray);
    opacity: 0.5;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

body:hover .system-hud .corner {
    border-color: var(--red);
    box-shadow: inset 0 0 10px rgba(235, 148, 35, 0.2);
}

.system-hud .top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.system-hud .top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.system-hud .bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.system-hud .bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

/* --- AMBIENT GRADIENT BACKGROUND --- */
.ambient-gradient {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    /* Expanded the gradient stops so the transition feels richer and darker */
    background: linear-gradient(
        -45deg, 
        var(--black) 0%, 
        rgba(255, 0, 8, 0.25) 20%,   /* Crimson Red */
        var(--black) 40%, 
        rgba(235, 148, 35, 0.15) 60%, /* Ember Orange */
        var(--black) 80%,
        rgba(255, 0, 8, 0.2) 100%    /* Subtle Red tie-in */
    );
    background-size: 500% 500%; /* Increased size for a wider panning area */
    filter: blur(80px);
    z-index: -2;
    pointer-events: none;
    
    /* Changed to ease-in-out for a smooth breathing effect */
    animation: fireDrift 25s ease-in-out infinite;
}

/* By oscillating between 0% and 100%, the gradient reverses direction 
  smoothly at its peak, completely preventing the snapping bug. 
*/
@keyframes fireDrift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- FIREBALL CURSOR & PARTICLES --- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle, var(--gold) 10%, var(--red) 60%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--red), inset 0 0 8px var(--gold);
    transition: width 0.2s ease, height 0.2s ease;
    mix-blend-mode: screen;
}

.custom-cursor.hovering {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, var(--white) 0%, var(--gold) 40%, var(--red) 80%, transparent 100%);
    box-shadow: 0 0 30px var(--red), inset 0 0 15px var(--gold);
}

#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.cursor-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--red);
    pointer-events: none;
    border-radius: 0;
    animation: particleFade 0.6s cubic-bezier(0.5, 1, 0.5, 1) forwards;
    mix-blend-mode: screen;
}

@keyframes particleFade {
    0% { opacity: 1; transform: scale(1) translate(0, 0); }
    100% { opacity: 0; transform: scale(0) translate(var(--dx), var(--dy)); }
}

/* --- UI CONTROLS --- */
.nav-toggle {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 101;
    background: var(--red);
    border: none;
    color: var(--black); 
    padding: 0.75rem 1.25rem;
    font-family: "Orbitron", sans-serif;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-toggle:hover {
    background: var(--gold); 
    color: var(--black);
    transform: scale(1.05);
}

/* --- SLIDABLE SIDEBAR --- */
.sidebar-slidable {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: var(--black);
    border-right: 4px solid var(--red);
    padding: 7rem 2rem 2rem 2rem;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 99;
    box-shadow: 15px 0 30px rgba(0, 0, 0, 0.8);
}

.sidebar-slidable.open {
    transform: translateX(320px);
}

.logo {
    font-family: "Orbitron", sans-serif;
    margin-bottom: 1rem;
    color: var(--white);
}

.logo h1:last-child { 
    color: var(--red); 
    text-shadow: 0 0 15px rgba(255, 0, 8, 0.3);
}

.descriptor {
    color: var(--white);
    margin-bottom: 3rem;
    line-height: 1.6;
    font-size: 0.9rem;
    padding-left: 1rem;
    border-left: 2px solid var(--gold); 
}

nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--gray);
    text-align: left;
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding-left: 0;
    border-left: 0px solid var(--red);
    cursor: pointer;
}

.nav-btn:hover {
    color: var(--gold) !important; 
    padding-left: 15px;
}

.nav-btn.active {
    color: var(--red);
    padding-left: 15px;
    border-left: 4px solid var(--red);
}

/* --- MAIN LAYOUT --- */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem 2rem;
}

/* --- HERO --- */
.hero {
    margin-bottom: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-label {
    background: var(--red);
    color: var(--black); 
    padding: 0.25rem 1rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.75rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
}

.hero h1 {
    max-width: 900px;
    line-height: 1.2;
    font-size: clamp(2rem, 5vw, 4rem);
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    color: var(--white);
}

.hero h1 span { 
    color: var(--red); 
}

/* --- PROJECT GRID CONTAINER --- */
.project-grid {
    transition: opacity 0.4s ease;
    perspective: 1500px;
}

/* --- STANDARD GRID (For Subpages) --- */
.project-grid.is-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    justify-content: center;
}

/* --- ROW LAYOUT (For ALL Homepage) --- */
.project-grid.is-rows {
    display: block;
}

.row-container {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    margin-bottom: var(--grid-gap);
    cursor: grab;
}

.row-container:active {
    cursor: grabbing;
}

.row-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.row-set {
    display: flex;
    gap: var(--grid-gap);
    padding-right: var(--grid-gap); /* Ensures seamless spacing between duplicates */
}

/* --- PROJECT CARD STYLING --- */
.project-card {
    background: var(--black); 
    border: 1px solid rgba(255, 0, 8, 0.15); 
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.5s ease;
    display: flex;
    flex-direction: column;
}

/* Width control depending on layout */
.is-grid .project-card {
    width: 100%;
}

.is-rows .project-card {
    width: 420px; /* Fixed width to keep shapes consistent while dragging */
    flex-shrink: 0;
}

.project-card:hover {
    border-color: var(--red);
    box-shadow: 0 15px 35px rgba(255, 0, 8, 0.2), 0 0 20px rgba(235, 148, 35, 0.1);
}

.project-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
    background: var(--black);
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--red);

    mix-blend-mode: color;
    opacity: 0.9;
    
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.project-card:hover .project-image::after {
    opacity: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    filter: grayscale(100%);
    transform: scale(1.05);
}

.project-card:hover img {
    transform: scale(1.15) translateZ(20px);
    filter: grayscale(0%);
}

.project-info {
    padding: 1.5rem;
    background: var(--black);
    border-top: 1px solid rgba(255, 0, 8, 0.2); 
    transform: translateZ(30px);
    transition: background 0.4s ease;
}

.project-info h3 {
    font-family: "Orbitron", sans-serif;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-info p {
    color: var(--gold); 
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- OVERLAY VIEWS (Project & About) --- */
.overlay-view {
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-bg {
    position: absolute;
    inset: 0;
    background: var(--black);
    transform: translateY(100%);
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

.overlay-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 6rem 2rem;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.4s ease 0.3s, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.3s;
}

.overlay-view.active {
    pointer-events: auto;
}

.overlay-view.active .overlay-bg {
    transform: translateY(0);
}

.overlay-view.active .overlay-inner {
    opacity: 1;
    transform: translateY(0);
}

.back-action {
    background: transparent;
    border: 2px solid var(--red);
    color: var(--red);
    padding: 12px 24px;
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    margin-bottom: 3rem;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    text-transform: uppercase;
    cursor: pointer;
}

.back-action:hover {
    background: var(--red);
    color: var(--black); 
    transform: translateX(-5px);
    box-shadow: 0 0 15px rgba(255, 0, 8, 0.4);
}

/* --- ABOUT PAGE STYLES --- */
.about-container {
    max-width: 900px;
    margin: 0 auto;
    color: var(--white);
}

.about-title {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 0.5rem;
}

.about-title span {
    color: var(--red);
}

.about-subtitle {
    font-family: "Orbitron", sans-serif;
    color: var(--gold);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.about-body {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 4rem;
    border-left: 2px solid var(--red);
    padding-left: 2rem;
}

.about-body p {
    margin-bottom: 1.5rem;
}

.about-links {
    display: flex;
    gap: 2rem;
}

.about-links a {
    color: var(--white);
    text-decoration: none;
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
    transition: all 0.3s ease;
}

.about-links a:hover {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
}


/* --- ANIMATIONS --- */
.fade-in-up {
    animation: fadeInUp 0.8s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

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

@media (max-width: 1100px) {
    .project-grid.is-grid { grid-template-columns: repeat(2, 1fr); }
    body { cursor: auto; }
    .custom-cursor, #particle-container { display: none; }
    .system-hud { display: none; } 
}

@media (max-width: 700px) {
    .project-grid.is-grid { grid-template-columns: 1fr; }
    .is-rows .project-card { width: 85vw; }
    main { padding-top: 5rem; }
    .about-links { flex-direction: column; gap: 1rem; }
}

/* --- ABOUT PAGE TIMELINE --- */
.about-timeline {
    position: relative;
    margin-top: 4rem;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* The Glowing Central Line */
.timeline-line {
    position: absolute;
    left: 7px; /* Adjust slightly based on dot size */
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), var(--gold), var(--red));
    box-shadow: 0 0 10px var(--red);
    opacity: 0.6;
}

/* Individual Timeline Items */
.timeline-item {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: timelineFadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: var(--delay);
}

/* The Glowing Nodes */
.timeline-dot {
    position: absolute;
    left: -2rem; /* Pull back to align with the line */
    top: 15px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #000;
    border: 3px solid var(--gold);
    box-shadow: 0 0 12px var(--gold);
    z-index: 2;
    transition: all 0.4s ease;
}

/* The Content Boxes */
.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid transparent;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: default;
}

.timeline-date {
    display: block;
    font-family: 'Orbitron', sans-serif;
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content p {
    margin: 0;
    color: #ccc;
    font-size: 1rem;
    line-height: 1.5;
}

/* Interactive Hover States */
.timeline-content:hover {
    background: rgba(233, 29, 37, 0.1); /* Subtle Red tint */
    border-left: 3px solid var(--red);
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.timeline-item:hover .timeline-dot {
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 20px var(--red), 0 0 40px var(--red);
    transform: scale(1.2);
}

/* Keyframes for cascading load effect */
@keyframes timelineFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- TYPEWRITER CURSOR --- */
#hero-headline::after {
    content: '|';
    color: var(--gold); /* Change to var(--red) if you prefer */
    animation: blink 1s step-end infinite;
    margin-left: 5px;
    font-weight: 300;
}

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

/* --- ENTRANCE ANIMATIONS --- */
@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUpHero {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUpRow {
    0% { opacity: 0; transform: translate(-50%, 50px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

/* Apply entrance to Menu Toggle */
.nav-toggle {
    /* (Keeps your existing transition properties intact) */
    animation: slideInLeft 3.0s cubic-bezier(0.5, 1, 0.5, 1) forwards;
}

/* Apply entrance to the Hero Section */
.hero {
    opacity: 0; /* Start hidden */
    animation: fadeInUpHero 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s; /* Loads slightly after the menu */
}

/* Utility class applied to rows via JavaScript */
.intro-fade-row {
    animation: fadeInUpRow 3.0s cubic-bezier(0.75, 1, 0.75, 1) forwards;
}

/* --- FEATURED PROJECT BANNERS --- */
.featured-banner {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: var(--black);
    border-top: 1px solid rgba(255, 0, 8, 0.2);
    border-bottom: 1px solid rgba(255, 0, 8, 0.2);
    margin: 4rem 0; /* Creates breathing room between the scrolling rows */
    cursor: none; /* Relies on your custom cursor */
    overflow: hidden;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.featured-banner:hover {
    background: rgba(255, 0, 8, 0.05);
    box-shadow: inset 0 0 50px rgba(255, 0, 8, 0.1);
}

.featured-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5rem 2rem;
    gap: 4rem;
}

.featured-text {
    flex: 1;
    max-width: 500px;
}

.featured-text h5 {
    color: var(--gold);
    font-family: "Orbitron", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.featured-text h2 {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    transition: color 0.4s ease;
}

.featured-banner:hover .featured-text h2 {
    color: var(--red);
}

.featured-text p {
    color: #a0a0a0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.view-case {
    color: var(--white);
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--red);
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.featured-banner:hover .view-case {
    color: var(--gold);
    border-color: var(--gold);
}

/* Banner Image & Hover Filter */
.featured-image {
    flex: 1.2;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 8, 0.2);
}

.featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--red);
    mix-blend-mode: multiply;
    opacity: 0.8;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.featured-banner:hover .featured-image::after {
    opacity: 0;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transform: scale(1.05);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), filter 0.8s ease;
}

.featured-banner:hover .featured-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Responsive Stacking */
@media (max-width: 900px) {
    .featured-content {
        flex-direction: column-reverse;
        text-align: left;
        padding: 3rem 2rem;
    }
    .featured-image {
        width: 100%;
    }
}

/* --- WEB CAPSULE BUTTON --- */
.web-capsule {
    display: inline-block;
    padding: 0.6rem 2rem;
    border: 2px solid var(--gold);
    border-radius: 50px;
    color: var(--gold);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.web-capsule:hover {
    background-color: var(--gold);
    color: #000;
}

/* --- SLIDESHOW & FULLSCREEN --- */
.slide {
    animation: fadeSlide 0.5s ease-in-out;
}

@keyframes fadeSlide {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

#fullscreen-view {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#fullscreen-view.active {
    opacity: 1;
}

/* --- UPDATED SLIDESHOW DOT TIMELINE --- */
.slide-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent; /* Empty inside */
    border: 2px solid var(--gold); /* Solid gold outline */
    box-shadow: none; /* No glow by default */
    cursor: pointer;
    transition: all 0.4s ease;
}

/* Active State (Filled and Glowing) */
.slide-dot.active {
    background: var(--gold); /* Fills with gold */
    box-shadow: 0 0 15px var(--gold), 0 0 30px var(--gold); /* Adds the glow */
    transform: scale(1.2); /* Slightly enlarges the active dot */
}

/* Hover State */
.slide-dot:hover {
    border-color: var(--red);
    box-shadow: 0 0 10px var(--red);
}

/* --- HERO GRADIENT DIVIDER --- */
.hero-divider {
    width: 100%;
    max-width: 2400px; /* Perfectly matches your headline width */
    height: 0.5px; /* Keeps it ultra-thin and sharp */
    margin-top: 4rem; /* Creates breathing room below the text */
    background: linear-gradient(
        to right, 
        transparent 0%, 
        var(--red) 20%, 
        var(--gold) 50%, 
        var(--red) 80%, 
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(235, 148, 35, 0.3); /* Gives it a slight ember glow */
    
    /* Animation Properties */
    transform: scaleX(0); 
    transform-origin: center; /* Forces expansion from the middle */
    animation: expandLine 1.6s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 2.5s; /* Delays slightly so it cuts across after the headline lands */
}

/* Expansion Keyframes */
@keyframes expandLine {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    30% {
        opacity: 1; /* Quick fade in so it doesn't just pop onto the screen */
    }
    100% {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* --- CUSTOM VIDEO PLAYER --- */
.video-wrapper {
    border: 1px solid rgba(255, 0, 8, 0.3);
    background: var(--black);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.video-wrapper:hover {
    border-color: var(--red);
    box-shadow: 0 10px 30px rgba(255, 0, 8, 0.15);
}

.video-wrapper video {
    width: 100%;
    max-height: 75vh;
    background: #000;
    cursor: pointer;
    outline: none;
}

/* Control Bar */
.video-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--black);
    border-top: 1px solid rgba(255, 0, 8, 0.2);
}

.vid-right-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Buttons */
.vid-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.vid-btn:hover, .vid-btn.active {
    background: var(--gold);
    color: var(--black);
    box-shadow: 0 0 15px rgba(235, 148, 35, 0.5);
    transform: scale(1.05);
}

/* Custom Range Slider */
.vid-slider {
    appearance: none;
    -webkit-appearance: none;
    width: 120px;
    background: transparent;
    cursor: pointer;
}

.vid-slider:focus {
    outline: none;
}

.vid-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgba(235, 148, 35, 0.2);
    border-radius: 2px;
}

.vid-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    background: var(--gold);
    border-radius: 50%;
    margin-top: -5px; /* Centers the thumb on the track */
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease;
}

.vid-slider:hover::-webkit-slider-thumb {
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--gold);
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .video-controls {
        flex-direction: column;
        gap: 1rem;
    }
    .vid-right-controls {
        width: 100%;
        justify-content: space-between;
    }
    .vid-slider {
        width: 80px;
    }
}

/* --- NEW: Central Play/Pause Button --- */
.vid-center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(10, 10, 10, 0.6);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 2.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; /* Perfect circle for the play button */
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(5px);
    padding-left: 5px; /* Optically centers the triangle */
}

/* If the innerHTML is the replay icon, center it normally without the play-triangle padding */
.vid-center-btn:has(:contains('↺')) {
    padding-left: 0;
}

.vid-center-btn:hover {
    background: var(--gold);
    color: var(--black);
    box-shadow: 0 0 30px rgba(235, 148, 35, 0.5);
    transform: translate(-50%, -50%) scale(1.1);
}

/* --- NEW: Timeline Bar --- */
.vid-timeline-container {
    width: 100%;
    height: 30px;
    background: var(--black);
    padding: 0.75rem 3.0rem 0 1.5rem;
    box-sizing: border-box;
    top: 60%;
}

.vid-progress {
    width: 100% !important; /* Forces it to stretch full width */
    display: block;
    margin: 0;
}

/* Specific Timeline Thumb Styling */
.vid-progress::-webkit-slider-thumb {
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease, background 0.2s ease;
}

/* Turn the timeline thumb red on hover to distinguish it from volume */
.vid-progress:hover::-webkit-slider-thumb {
    background: var(--red);
    box-shadow: 0 0 12px var(--red);
    transform: scale(1.4);
}