/* ==========================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================== */
:root {
    /* Color Palette - Premium Dark Theme */
    --bg-base: #0a0a0c;
    --bg-surface: #13141a;
    --bg-glass: rgba(19, 20, 26, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);

    --text-main: #f8f8f8;
    --text-muted: #a0a0a5;

    /* Vibrant Gradients & Accents */
    --accent-1: #6366f1;
    /* Indigo */
    --accent-2: #a855f7;
    /* Purple */
    --accent-3: #ec4899;
    /* Pink */

    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --gradient-text: linear-gradient(to right, var(--accent-1), var(--accent-3));

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Shadows */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-bounce: 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);

    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   GAME THEME OVERRIDES (Space Renegades)
   ========================================== */
html.theme-game,
.theme-game body {
    /* Muted Red / Rusted Cyborg Aesthetics */
    --accent-1: #c53030 !important;
    /* Rusted Crimson */
    --accent-2: #9b2c2c !important;
    /* Deep Blood Red */
    --accent-3: #dd6b20 !important;
    /* Burnt Orange */

    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2)) !important;
    --gradient-text: linear-gradient(to right, var(--accent-1), var(--accent-3)) !important;
    --shadow-glow: 0 0 20px rgba(197, 48, 48, 0.2) !important;
    /* Muted glow */

    --bg-base: #070303 !important;
    /* Slightly warmer dark background */
    --bg-surface: #0f0505 !important;
    --bg-glass: rgba(15, 5, 5, 0.6) !important;
    /* More transparent */
    --border-glass: rgba(197, 48, 48, 0.15) !important;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    line-height: 1.1;
    margin-bottom: 0.5em;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ==========================================
   CUSTOM CURSOR
   ========================================== */
@media (pointer: fine) {
    body {
        cursor: none;
        /* Hide default cursor */
    }

    .cursor-dot {
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background-color: var(--accent-1);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9999;
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }

    .cursor-outline {
        position: fixed;
        top: 0;
        left: 0;
        width: 32px;
        height: 32px;
        border: 1px solid var(--accent-2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9998;
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }

    /* Interactive state triggered via JS */
    .cursor-dot.hovering {
        width: 12px;
        height: 12px;
        background-color: var(--accent-3);
    }

    .cursor-outline.hovering {
        width: 60px;
        height: 60px;
        background-color: rgba(236, 72, 153, 0.1);
        border-color: var(--accent-3);
    }
}

/* ==========================================
   LAYOUT & UTILITIES
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.wrapper {
    padding: 8rem 0;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: var(--accent-1);
}

.orb-2 {
    bottom: -10%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: var(--accent-3);
    animation-delay: -5s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border-glass) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-glass) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
}

/* ==========================================
   COMPONENTS
   ========================================== */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    z-index: -1;
    opacity: 0;
    transition: var(--transition-fast);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-surface);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* ==========================================
   SECTIONS
   ========================================== */
/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.875rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-main);
    border-radius: 2px;
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

/* Projects Section */
.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    perspective: 1000px;
    /* Required for 3D flip */
}

/* 3D Flip Card Implementation */
.project-card {
    height: 480px;
    background: transparent;
    cursor: pointer;
    border-radius: 24px;
    outline: none;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: 24px;
}

/* Trigger flip on hover or focus */
.project-card:hover .card-inner,
.project-card:focus .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Front Styling */
.card-front {
    background: var(--bg-surface);
}

.card-visual {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: #1a1b23;
    position: relative;
    overflow: hidden;
}

.auto-dash-visual {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), transparent);
    color: var(--accent-1);
}

.space-renegades-visual {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), transparent);
    color: var(--accent-3);
}

.future-visual {
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-2);
    font-weight: 600;
}

.card-body {
    padding: 2rem;
    flex-grow: 1;
}

.card-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-glass);
}

.interaction-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Back Styling */
.card-back {
    background: linear-gradient(145deg, var(--bg-surface), #1a1b24);
    transform: rotateY(180deg);
    padding: 3rem 2rem;
    justify-content: center;
    align-items: flex-start;
}

.card-back ul {
    margin: 1.5rem 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-back li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
}

.card-back li i {
    width: 24px;
    text-align: center;
    color: var(--text-main);
}

/* About Section & Skills */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 900px) {
    .about-content {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
    }
}

.about-text p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.skills-showcase {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-track {
    width: 100%;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-main);
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-surface);
    border-radius: 99px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 99px;
    transform-origin: left;
    /* Animation handled by reveal-up classes generally, but we'll add inline widths for now */
}

.ui-fill {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

.game-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Emerald */
.front-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Amber */
.back-fill {
    background: linear-gradient(90deg, var(--accent-3), #f43f5e);
}

/* Rose */


/* Vision / About */
.vision-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .vision-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.v-col i {
    font-size: 2.5rem;
    color: var(--accent-1);
    margin-bottom: 1rem;
}

/* Footer & Contact Section */
footer {
    padding: 2rem 0 2rem;
    background: #08080a;
    position: relative;
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-top: -8rem;
    /* Pull up to overlap with the section above */
    margin-bottom: 4rem;
    background: var(--bg-surface);
    /* Force non-transparent background specifically here to block text behind */
    border: 1px solid var(--border-glass);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

@media (min-width: 900px) {
    .contact-section {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info p {
    margin-bottom: 2rem;
}

/* Contact Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
}

.input-group label {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
    background: #13141a;
    /* Match form background to cut through line */
    padding: 0 0.25rem;
}

/* Floating Label Logic */
.input-group input:focus,
.input-group textarea:focus,
.input-group input:not(:placeholder-shown),
.input-group textarea:not(:placeholder-shown) {
    border-color: var(--accent-1);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.input-group input:focus~label,
.input-group textarea:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:not(:placeholder-shown)~label {
    top: -0.65rem;
    left: 1rem;
    font-size: 0.8rem;
    color: var(--accent-1);
}

.footer-inner-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

@media (min-width: 768px) {
    .footer-inner-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}


/* ==========================================
   ANIMATIONS & REVEALS
   ========================================== */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, -50px);
    }
}

@keyframes scroll {
    0% {
        top: 4px;
        opacity: 1;
    }

    100% {
        top: 16px;
        opacity: 0;
    }
}

@keyframes dropDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

@keyframes fadeUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

@keyframes flipUp {
    from {
        transform: perspective(1000px) rotateX(-30deg) translateY(50px);
        opacity: 0;
    }

    to {
        transform: perspective(1000px) rotateX(0) translateY(0);
        opacity: 1;
    }
}

/* Initial Load Animations */
.animate-drop {
    animation: dropDown 0.8s var(--transition-bounce) forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeUp 0.8s var(--transition-smooth) forwards;
}

.stagger-1 {
    animation-delay: 0.2s;
}

.stagger-2 {
    animation-delay: 0.3s;
}

.stagger-3 {
    animation-delay: 0.4s;
}

.stagger-4 {
    animation-delay: 0.5s;
}

.stagger-5 {
    animation-delay: 0.8s;
}

/* Scroll Reveal Classes (applied by JS) */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal-flip {
    opacity: 0;
    transform: perspective(1000px) rotateX(-20deg) translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top;
}

.reveal-flip.in-view {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

/* ==========================================
   SPECIFIC PAGE STYLES: SPACE RENEGADES
   ========================================== */
.force-dark {
    opacity: 0.5;
}

.game-nav {
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.text-glow {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
}

.game-hero {
    background-image: url('assets/space_renegades_splash.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    border-bottom: 2px solid var(--accent-2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Heavy top gradient to read text over complex art, fade into true black at bottom */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.85) 60%, rgba(5, 5, 5, 1) 100%);
    z-index: 1;
}

.game-hero .hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4rem;
}

.badge-game {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.btn-game.btn-primary {
    box-shadow: 0 5px 20px rgba(225, 29, 72, 0.4);
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-game:hover {
    transform: scale(1.05);
}

.flex-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.text-center {
    text-align: center;
}

/* Glitch Effect on Title */
.glitch-title {
    position: relative;
    color: var(--text-main);
    font-size: clamp(3rem, 8vw + 1rem, 6rem);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(225, 29, 72, 0.8);
    font-weight: 900;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 3rem 2rem;
    border-top: 2px solid var(--accent-1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
}

.glass-game {
    background: linear-gradient(180deg, rgba(20, 5, 5, 0.8) 0%, rgba(10, 2, 2, 0.9) 100%);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.8);
}

.gradient-game {
    background: linear-gradient(to right, #fca5a5, var(--accent-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.quote-banner {
    padding: 8rem 0;
    background: #030102;
    border-top: 1px solid #1a0505;
    border-bottom: 1px solid #1a0505;
}

.quote-text {
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: italic;
    color: #a0a0a5;
    line-height: 1.4;
}

.alpha-form {
    max-width: 500px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pulse-border {
    animation: pulseBorder 4s infinite;
}

.large-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.glow-icon {
    color: var(--accent-1);
    filter: drop-shadow(0 0 10px var(--accent-2));
}

@keyframes pulseBorder {
    0% {
        border-color: rgba(225, 29, 72, 0.1);
    }

    50% {
        border-color: rgba(225, 29, 72, 0.4);
        box-shadow: 0 0 40px rgba(225, 29, 72, 0.1);
    }

    100% {
        border-color: rgba(225, 29, 72, 0.1);
    }
}

/* Media Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
    padding: 1rem 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    align-items: center;
}

.carousel-slide {
    min-width: 80%;
    margin: 0 10%;
    /* Center the 80% slide by providing 10% margins */
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.4;
    transform: scale(0.85);
    /* Shrink non-active slides */
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-glass);
    padding: 0;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: var(--shadow-glow);
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 5, 5, 0.9) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-slide.active:hover .media-overlay,
.carousel-slide.active:focus .media-overlay {
    opacity: 1;
}

.media-overlay span {
    font-weight: 600;
    color: var(--accent-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--accent-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-fast);
}

.carousel-btn:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: white;
    box-shadow: var(--shadow-glow);
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

@media (min-width: 768px) {
    .prev-btn {
        left: -3rem;
    }

    .next-btn {
        right: -3rem;
    }
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 2rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-glass);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background: var(--accent-1);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(197, 48, 48, 0.5);
}

.game-footer {
    padding: 4rem 0;
    background: #000;
    border-top: 2px solid #1a0505;
}

.game-footer .glitch-title {
    font-size: 2rem;
    letter-spacing: 0.2em;
    text-shadow: none;
    color: #444;
    margin-bottom: 1rem;
}

.disclaimer {
    font-size: 0.75rem;
    color: #444;
    margin-top: 2rem;
}

/* ==========================================
   APP THEME OVERRIDES (Auto Dash)
   ========================================== */
html.theme-app,
.theme-app body {
    /* Fast / Clean / Cyber Aesthetics */
    --accent-1: #06b6d4 !important;
    /* Cyan */
    --accent-2: #3b82f6 !important;
    /* Electric Blue */
    --accent-3: #10b981 !important;
    /* Mint Green */

    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2)) !important;
    --gradient-text: linear-gradient(to right, var(--accent-1), var(--accent-3)) !important;
    --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.25) !important;

    --bg-base: #03080e !important;
    /* Deep navy/black */
    --bg-surface: #060e18 !important;
    --bg-glass: rgba(10, 20, 35, 0.6) !important;
    --border-glass: rgba(6, 182, 212, 0.15) !important;
}

.badge-app {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.btn-app.btn-primary {
    box-shadow: 0 5px 20px rgba(6, 182, 212, 0.3);
    font-weight: 600;
}

.btn-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.glass-app {
    background: linear-gradient(180deg, rgba(15, 30, 50, 0.7) 0%, rgba(5, 15, 25, 0.85) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 15px 35px rgba(0, 0, 0, 0.4);
}

.text-app {
    color: var(--accent-1);
}

.gradient-app {
    background: linear-gradient(to right, #67e8f9, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Auto Dash Hero Specifics */
.app-hero {
    padding-top: 12rem;
    padding-bottom: 6rem;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.1), transparent 50%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.1), transparent 50%);
}

.app-hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.app-hero-layout .hero-content {
    flex: 1;
    max-width: 600px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-mockup-container {
    flex: 1;
    position: relative;
    perspective: 1000px;
}

.floating-mockup {
    border-radius: 12px;
    padding: 0.5rem;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform var(--transition-bounce);
    animation: floatingMockup 6s ease-in-out infinite;
    z-index: 2;
}

.floating-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
}

.mockup-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.mockup-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: var(--accent-1);
    filter: blur(80px);
    opacity: 0.3;
    z-index: 1;
    animation: pulseBorder 4s infinite;
}

@keyframes floatingMockup {

    0%,
    100% {
        transform: translateY(0) rotateY(-15deg) rotateX(5deg);
    }

    50% {
        transform: translateY(-20px) rotateY(-12deg) rotateX(3deg);
    }
}

.bg-alt {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.app-icon {
    font-size: 2.5rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.4));
}

@media (max-width: 968px) {
    .app-hero-layout {
        flex-direction: column;
        text-align: center;
    }

    .app-hero-layout .hero-content {
        align-items: center;
    }

    .download-banner {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

.back-to-top:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: white;
    box-shadow: var(--shadow-glow);
    transform: translateY(0) scale(1.1);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}