:root {
    --bg-dark: #0a0a0a;
    --text-main: #f0f0f0;
    --text-muted: #ababab;
    --accent-red: #c51a1a;
    --accent-red-glow: rgba(197, 26, 26, 0.4);
    --border-glass: rgba(255, 255, 255, 0.1);

    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Nav */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

.glass-nav.scrolled {
    background: rgba(10, 10, 10, 0.85);
    padding: 0.5rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    height: 40px;
    width: auto;
    transition: var(--transition-smooth);
}

.glass-nav.scrolled .nav-logo {
    height: 35px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links li a {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-red);
    width: 100%;
}

.audio-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.audio-btn:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red-glow);
}

.pulse-ring {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    position: relative;
}

.pulse-ring.playing::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--accent-red);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}


/* Routes (Full Page Sections) */
.route-fullscreen {
    position: relative;
    /* Force 16:9 aspect ratio scaling to prevent cropping of baked-in logos */
    height: 56.25vw;
    /* On mobile, keep it sufficiently large */
    min-height: 85vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* Because the height perfectly matches the image ratio natively, 'cover' doesn't crop anything on desktop */
    background-size: cover;
    /* Anchor to top so logos don't get chopped off on mobile */
    background-position: top center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-glass);
}

.route-fullscreen .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Dark gradient purely at the bottom for readability of the synopsis */
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0) 50%, rgba(10, 10, 10, 0.8) 80%, rgba(10, 10, 10, 1) 100%);
    z-index: 1;
}

.route-fullscreen .content-box {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 900px;
    text-align: center;
    /* Tweak spacing from bottom edge */
    margin-bottom: 2rem;
}

/* First hero needs the logo independently */
#hero .content-box {
    align-items: center;
    margin-bottom: auto;
    /* center normal hero */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-logo {
    max-width: 100%;
    width: 600px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.8));
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.route-synopsis {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 300;
    background: rgba(10, 10, 10, 0.4);
    padding: 2rem 3rem;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}


/* Section Elements */
.content-section {
    padding: 8rem 2rem;
    background: rgba(15, 15, 15, 1);
    box-shadow: inset 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* CG Gallery */
.cg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.cg-item {
    overflow: hidden;
    position: relative;
}

.cg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.cg-item:hover img {
    transform: scale(1.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 3.5rem;
    color: #fff;
}

.center-line {
    margin: 1.5rem auto 5rem auto;
    height: 2px;
    width: 60px;
    background-color: var(--accent-red);
}

.char-scroll-row {
    display: flex;
    align-items: center;
    margin-bottom: 10rem;
    gap: 4rem;
}

.char-scroll-row:last-child {
    margin-bottom: 0;
}

.char-sprite-col {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    height: 80vh;
    overflow: hidden;
    /* Helps crop the image nicely */
}

.sprite-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* Cropped close-up */
    object-position: top center;
    /* Focus on the face/torso */
    border-radius: 4px;
    /* Soft fade at the edges for dramatic effect */
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%), linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.9;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
    border: 1px solid var(--border-glass);
}

.char-text-col {
    flex: 1;
    text-align: left;
    padding-right: 2rem;
}

.char-text-col .separator-line {
    margin: 1.5rem 0;
    height: 2px;
    width: 60px;
    background-color: var(--accent-red);
}

.char-subtitle {
    color: var(--accent-red);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 4px;
}

.char-title-name {
    font-size: 5rem;
    color: #fff;
    line-height: 1;
}

.char-desc {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
}


/* Footer */
.glass-footer {
    background: rgba(10, 10, 10, 1);
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    text-align: center;
}

.glass-footer p {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-red);
}

/* Animations */
.section-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 900px) {
    .route-fullscreen {
        background-attachment: scroll;
    }

    .game-logo {
        width: 90%;
    }

    .nav-links {
        display: none;
    }

    .char-scroll-row {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        margin-bottom: 6rem;
    }

    .char-sprite-col {
        height: 50vh;
        justify-content: center;
    }

    .sprite-img {
        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
        border: none;
    }

    .char-text-col {
        text-align: center;
        padding: 0;
    }

    .char-text-col .separator-line {
        margin: 1.5rem auto;
    }
}