/* Google Fonts Import */
@import url('images/image_17.jpg');

/* CSS Variables */
:root {
    --color-primary-dark: #1a1a2e; /* Deep Blue/Black */
    --color-secondary-dark: #0f3460; /* Darker Blue */
    --color-accent-1: #e94560; /* Vibrant Red/Pink */
    --color-accent-2: #ff7b00; /* Orange for secondary highlights / glow */
    --color-text-light: #e0e0e0;
    --color-text-dark: #a0a0a0; /* Slightly darker text for contrast */
    --color-bg-light: #f8f8f8; /* Not much used in a dark theme, but good to define */

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;

    --max-width: 1200px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 32px;
    --spacing-lg: 64px;
    --spacing-xl: 96px;

    --border-radius-sm: 8px;
    --border-radius-md: 12px;

    --transition-speed: 0.3s ease-in-out;
}

/* Base Styles & Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text-light);
    background-color: var(--color-primary-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

a {
    color: var(--color-accent-1);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--color-accent-2);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-light);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
}

.section-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-dark);
    font-weight: 300;
}

.light-text {
    color: var(--color-text-light);
}

.content-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    z-index: 1; /* Ensure content is above parallax backgrounds */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-speed), height var(--transition-speed);
    z-index: -1;
}

.btn:hover::before {
    width: 200%;
    height: 200%;
}

.btn-primary {
    background-image: linear-gradient(45deg, var(--color-accent-1) 0%, var(--color-accent-2) 100%);
    color: var(--color-text-light);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    border: 2px solid transparent;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.7);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent-1);
    border: 2px solid var(--color-accent-1);
}

.btn-secondary:hover {
    background-color: var(--color-accent-1);
    color: var(--color-text-light);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
    transform: translateY(-3px);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-accent-1);
    border: 2px solid transparent;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.9rem;
}

.btn-ghost:hover {
    background-color: var(--color-accent-1);
    color: var(--color-text-light);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
    transform: translateY(-2px);
}

.btn.lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.2rem;
}

/* Header */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: transparent;
    padding: var(--spacing-sm) 0;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed), padding var(--transition-speed);
}

.site-header.sticky {
    background-color: rgba(15, 52, 96, 0.95); /* var(--color-secondary-dark) with alpha */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: var(--spacing-xs) 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-light);
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-md);
}

.main-nav a {
    color: var(--color-text-light);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-speed);
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-image: linear-gradient(90deg, var(--color-accent-1) 0%, var(--color-accent-2) 100%);
    transition: width var(--transition-speed);
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--color-accent-1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110; /* Above nav */
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-light);
    transition: all 0.3s ease-in-out;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 1;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    background-image: url('images/image_18.jpg'); /* A dramatic landscape or sci-fi image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.8) 0%, rgba(15, 52, 96, 0.6) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-sm);
    animation: fadeInScale 1s ease-out forwards;
}

.game-title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(45deg, var(--color-accent-1), var(--color-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(233, 69, 96, 0.7);
    animation: textGlow 2s infinite alternate;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    opacity: 1;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    opacity: 1;
    animation: fadeIn 1s ease-out 1s forwards;
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    border: 2px solid var(--color-text-light);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-down a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    opacity: 1;.7;
}
.scroll-down span {
    display: block;
    width: 2px;
    height: 8px;
    background: var(--color-text-light);
    border-radius: 2px;
}


/* Parallax Backgrounds */
.parallax-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 52, 96, 0.8); /* var(--color-secondary-dark) with alpha */
    z-index: 0;
}

.trailer-section .container,
.cta-wishlist-section .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* About Section */
.about-section .about-flex {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.about-section .about-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
}

.about-section .about-text p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-dark);
}

.about-section .about-image {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    background-color: var(--color-secondary-dark);
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 1;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.about-section .about-image.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.about-section .about-image img {
    border-radius: var(--border-radius-sm);
    filter: brightness(0.9);
    transition: filter 0.3s ease-in-out;
}

.about-section .about-image img:hover {
    filter: brightness(1.1);
}

/* Trailer Section */
.trailer-section {
    text-align: center;
}

.video-player {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: var(--spacing-lg) auto;
    background-color: #000;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 1;
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background-color: var(--color-secondary-dark);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(20px);
    opacity: 1;
}

.feature-card.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(233, 69, 96, 0.3);
}

.feature-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto var(--spacing-sm) auto;
    border: 3px solid var(--color-accent-1);
    filter: grayscale(80%);
    transition: filter 0.3s ease;
}

.feature-card:hover img {
    filter: grayscale(0%);
    border-color: var(--color-accent-2);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-accent-1);
}

.feature-card p {
    color: var(--color-text-dark);
    font-size: 0.95rem;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.gallery-item {
    background-color: var(--color-secondary-dark);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(20px);
    opacity: 1;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.gallery-item.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.8) grayscale(20%);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1) grayscale(0%);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* CTA Wishlist Section */
.cta-wishlist-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.cta-wishlist-section .wishlist-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.cta-wishlist-section .store-links {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    opacity: 1;
    max-height: 0; /* Control visibility with max-height */
    overflow: hidden;
    transition: opacity 0.4s ease-out, max-height 0.4s ease-out;
}

.cta-wishlist-section .store-links.active {
    opacity: 1;
    max-height: 100px; /* Sufficient height to show links */
}

.cta-wishlist-section .store-links img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px;
    filter: grayscale(100%) brightness(1.5);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.cta-wishlist-section .store-links img:hover {
    filter: grayscale(0%) brightness(1);
    transform: translateY(-5px);
}

/* Footer */
.site-footer {
    background-color: var(--color-primary-dark);
    color: var(--color-text-dark);
    padding: var(--spacing-lg) 0 var(--spacing-sm) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-grid h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

.footer-grid ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-grid ul li a {
    color: var(--color-text-dark);
    transition: color var(--transition-speed);
}

.footer-grid ul li a:hover {
    color: var(--color-accent-1);
}

.social-icons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--color-text-dark);
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

.social-icons a:hover {
    background-color: var(--color-accent-1);
    color: var(--color-text-light);
    border-color: var(--color-accent-1);
    transform: translateY(-3px) scale(1.1);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-md);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--color-text-dark);
    margin: 0 var(--spacing-xs);
}
.footer-bottom a:hover {
    color: var(--color-accent-1);
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 1;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 1;
    }
    to {
        opacity: 1;
    }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 15px rgba(233, 69, 96, 0.7); }
    50% { text-shadow: 0 0 35px rgba(255, 123, 0, 0.9); }
    100% { text-shadow: 0 0 15px rgba(233, 69, 96, 0.7); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 1;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal on Scroll for content elements */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform; /* Optimize performance */
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .main-nav ul {
        gap: var(--spacing-sm);
    }

    .hero-actions {
        flex-direction: column;
    }

    .about-section .about-flex {
        flex-direction: column;
        text-align: center;
    }
    .about-section .about-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: var(--spacing-sm) var(--spacing-sm);
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Off-screen */
        width: 70%;
        max-width: 300px; /* Limit width on larger mobile screens */
        height: 100%;
        background-color: var(--color-secondary-dark);
        padding-top: var(--spacing-xl);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.4);
        transition: right 0.4s ease-in-out;
        z-index: 99;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }

    .main-nav a {
        font-size: 1.2rem;
        padding: var(--spacing-sm) 0;
    }

    .main-nav a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-content {
        gap: var(--spacing-sm);
    }
    .game-title {
        font-size: clamp(3rem, 10vw, 5rem);
    }
    .tagline {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }

    .section-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    .section-subtitle {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }

    .btn.lg {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-grid h3 {
        margin-top: var(--spacing-md);
    }
    .footer-links ul {
        padding: 0;
    }
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-header .logo {
        font-size: 1.5rem;
    }
    .hero-content {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    .game-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }
    .tagline {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
    .hero-actions {
        width: 100%;
    }
    .btn {
        width: 100%;
    }
    .scroll-down {
        bottom: var(--spacing-sm);
    }
    .cta-wishlist-section .wishlist-actions {
        flex-direction: column;
    }
}

/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
