:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --accent: #c4a45a;
    /* Golden for divine touch */
    --accent-red: #8b0000;
    /* Blood/Plague red */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --glass: rgba(255, 255, 255, 0.05);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

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

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(196, 164, 90, 0.3);
}

.nav-logo-img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transition: var(--transition);
}

.footer-logo-img {
    height: 35px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: opacity(0.8);
    transition: var(--transition);
}

.footer-logo-img:hover {
    filter: opacity(1);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex: 1;
}

/* Distribute the available space symmetrically to center the links */
.nav-links > a:first-child {
    margin-left: auto;
}

.nav-links > a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links > a.active {
    color: var(--accent);
}

.nav-links > a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
}

.btn-steam {
    background: var(--accent);
    color: #000 !important;
    padding: 0.8rem 1.5rem;
    border-radius: 2px;
    font-weight: 700 !important;
    transition: var(--transition);
    border: 1px solid var(--accent);
    margin-left: auto !important; /* Matches the auto margin of the first child for perfect balance */
}

.lang-switcher {

    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}

.lang-selector {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.2rem 0.4rem;
    border: 1px solid transparent;
    border-radius: 2px;
}

.lang-selector:hover {
    color: var(--text-primary);
}

.lang-selector.active {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-steam:hover {
    background: transparent;
    color: var(--accent) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
        url('../assets/hero.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-logo {
    max-width: 500px;
    width: 90%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}

.sub-title {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}

.main-title {
    font-size: 6rem;
    font-weight: 900;
    margin-bottom: 2rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s 0.2s forwards;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s 0.4s forwards;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s 0.6s forwards;
}

.cta-primary,
.cta-secondary {
    padding: 1.2rem 2.5rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
}

.cta-primary {
    background: var(--accent-red);
    color: white;
    border: 1px solid var(--accent-red);
}

.cta-primary:hover {
    background: #5e0000;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.cta-secondary {
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
}

.cta-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-5px);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 4px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2s infinite;
}

/* Sections */
.section {
    padding: 8rem 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

.section-title.center {
    display: block;
    text-align: center;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

.dark-bg {
    background-color: #0d0d0d;
}

/* About Section */
.grid-about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.mechanic-box {
    background: linear-gradient(90deg, var(--accent-red), transparent);
    padding: 2rem;
    border-left: 4px solid var(--accent);
    margin-top: 2rem;
}

.mechanic-box h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.mechanic-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.image-frame {
    position: relative;
    padding: 10px;
    border: 1px solid var(--glass);
    background: var(--glass);
}

.game-art {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.placeholder-art {
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #1a1a1a, #0a0a0a);
    position: relative;
    overflow: hidden;
}

.placeholder-art::before {
    content: 'CONCEPT ART';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--glass);
    font-family: 'Cinzel';
    font-size: 2rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border: 1px solid var(--glass);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(196, 164, 90, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: grayscale(100%) contrast(1.2);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.gallery-overlay span {
    font-family: 'Cinzel';
    color: white;
    font-size: 1.2rem;
    letter-spacing: 2px;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%) contrast(1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
        height: 300px;
    }
}

/* Lore Section */
.lore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.lore-item {
    background: var(--glass);
    padding: 2.5rem;
    border: 1px solid var(--glass);
    transition: var(--transition);
}

.lore-item:hover {
    background: rgba(139, 0, 0, 0.05);
    border-color: var(--accent-red);
}

.lore-item h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.lore-item p {
    color: var(--text-secondary);
}

/* Trailer */
.trailer-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    border: 1px solid var(--glass);
    padding: 10px;
    background: var(--glass);
}

.trailer-container iframe {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Studio Section */
.studio-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.studio-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.studio-location {
    font-family: 'Cinzel';
    color: var(--accent);
    font-size: 1.1rem;
    letter-spacing: 4px;
}

/* Footer */
footer {
    padding: 5rem 0;
    background: #050505;
    border-top: 1px solid var(--glass);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.footer-info .logo {
    margin-bottom: 1rem;
    display: block;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.made-in {
    margin-top: 1rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.footer-links a {
    display: block;
    text-decoration: none;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cursor {
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

.cursor::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent);
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border: 1px solid var(--glass);
    transition: var(--transition);
}

.news-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-5px);
}

.news-date {
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 1rem;
}

.news-card h3 {
    margin-bottom: 1rem;
}

/* Fact Sheet */
.fact-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 4rem;
    padding: 2.5rem;
    border: 1px solid var(--glass);
    background: rgba(255, 255, 255, 0.02);
}

.fact-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.fact-item strong {
    color: var(--accent);
    margin-right: 0.5rem;
}

@media (max-width: 968px) {
    .cursor {
        display: none;
    }

    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }

    .main-title {
        font-size: 3rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .section {
        padding: 4rem 0;
    }

    .grid-about, .footer-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        width: 100%;
        display: block;
        margin-top: 2rem;
    }

    .image-frame, .game-art {
        width: 100%;
        height: auto;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
        height: 300px;
    }
    
    .footer-grid {
        gap: 2rem;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-scroll {
        display: none;
    }
    
    .cta-primary, .cta-secondary {
        width: 100%;
    }
    
    .trailer-container iframe {
        height: 250px;
    }

    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        justify-content: center;
        align-items: center;
        z-index: 999;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Global Fix for horizontal scroll */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure no element can exceed viewport width */
.container, .nav-container {
    overflow: hidden;
}

/* Add custom hover effect for interactive elements */
a:hover~.cursor,
button:hover~.cursor {
    transform: translate(-50%, -50%) scale(2.5);
    background: rgba(196, 164, 90, 0.1);
}

.hidden-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hidden-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    z-index: 998;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.floating-cta img {
    height: 24px;
    width: 24px;
    object-fit: contain;
    filter: brightness(0); /* Force the logo to be black */
}

.floating-cta:hover {
    transform: translateY(-5px);
    background: #fff;
}

@media (max-width: 768px) {
    .floating-cta {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem;
    }
    .floating-cta span {
        display: none;
    }
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 2rem;
    right: 2rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass);
    padding: 2rem;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: bottom 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
}

#cookie-banner.visible {
    bottom: 2rem;
}

.cookie-text {
    max-width: 800px;
}

.cookie-text h4 {
    color: var(--accent);
    font-family: 'Cinzel', serif;
    margin-bottom: 0.5rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cookie-text a {
    color: var(--accent);
    text-decoration: none;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

#accept-cookies {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#accept-cookies:hover {
    background: #fff;
}

#cookie-settings {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

#cookie-settings:hover {
    border-color: var(--accent);
}

@media (max-width: 768px) {
    #cookie-banner {
        flex-direction: column;
        left: 1rem;
        right: 1rem;
        padding: 1.5rem;
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #accept-cookies, #cookie-settings {
        width: 100%;
    }
}
