/* --- Global Styles & Variables --- */
:root {
    --color-primary: #a79aff; /* Lavender */
    --color-secondary: #ff8dd4; /* Pink */
    --color-accent: #87e7ff; /* Cyan */
    --color-dark: #1a1a2e;
    --color-light: #f4f4f9;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-dark);
    background-color: var(--color-light);
    line-height: 1.6;
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed; top: 0; left: 0;
    width: 100%; z-index: 100;
    transition: background-color 0.3s ease;
}
.main-header.scrolled {
    background-color: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; max-width: 1400px; margin: 0 auto;
}
.nav-logo {
    font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700;
    color: white; text-decoration: none; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.nav-menu { display: flex; list-style: none; gap: 2.5rem; }
.nav-link {
    color: white; text-decoration: none; font-weight: 500;
    font-size: 1.3rem; position: relative; padding-bottom: 0.3rem;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px;
    background-image: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--color-accent); }
.nav-link:hover::after { width: 100%; }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: white; transition: all 0.3s ease-in-out; }

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    opacity: 0.6;
}
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    animation: float 8s ease-in-out infinite;
}
.hero-text {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.game-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 0.5rem;
}
.tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    max-width: 600px;
}

/* --- Animations --- */
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@keyframes float { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-8px); } 
}

/* NEW: Keyframe for the shimmering gradient effect */
@keyframes shimmer {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* REMOVED: The old move-particles keyframe is gone */

/* --- General Content Section --- */
.content-section { padding: 6rem 5%; max-width: 1200px; margin: 0 auto; position: relative; }
.section-title {
    font-family: var(--font-heading); font-size: 4rem; text-align: center; margin-bottom: 3rem;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.section-content p { font-size: 1.4rem; max-width: 800px; margin: 0 auto 1rem; }

/* NEW: Section Dividers */
.clipped-section-bottom {
    background-color: var(--color-light);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    padding-bottom: 9rem;
}
.clipped-section-top {
    background-color: white;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    padding-top: 9rem;
}

/* --- Heroine Section --- */
.character-card {
    display: flex; gap: 3rem; align-items: center;
    background-color: transparent; /* Changed for clipped background */
}
.character-sprite img { max-height: 550px; filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.1)); }
.character-info h3 { font-family: var(--font-heading); font-size: 2.7rem; }
.character-info p { font-size: 1.2rem;}
.character-info .character-va { font-size: 1.2rem; color: #666; margin-bottom: 1rem; display: block; }
.character-info hr {
    border: 0; height: 1px;
    background-image: linear-gradient(to right, var(--color-primary), var(--color-secondary), transparent);
    margin: 1rem 0;
}
.character-details { list-style: none; margin-top: 1.5rem; }
.character-details li { margin-bottom: 0.5rem; font-size:1.2rem; }

/* --- Gallery Section --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
/* NEW: Wrapper for hover effect */
.gallery-item-wrapper {
    position: relative; border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow); cursor: pointer;
}
.gallery-item-wrapper::after {
    content: '🔎'; /* Magnifying glass icon */
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background-color: rgba(0,0,0,0.6);
    color: white; font-size: 3rem;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item-wrapper:hover::after { opacity: 1; }
.gallery-item {
    width: 100%; display: block;
    transition: transform 0.3s ease;
}
.gallery-item-wrapper:hover .gallery-item { transform: scale(1.1); }


/* --- SPEC Section --- */
.spec-section { text-align: center; }
.spec-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem; max-width: 900px; margin: 0 auto 3rem; text-align: center;
}
.spec-item { text-align: center; }
.spec-item h4 { font-size: 1.2rem; color: var(--color-primary); }
.cta-button {
    display: inline-block; padding: 1rem 2.5rem; border: none; border-radius: 50px;
    color: white; font-size: 1.2rem; font-weight: 500; text-decoration: none;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 141, 212, 0.5);
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
}

/* --- Footer & Lightbox --- */
.main-footer { background-color: var(--color-dark); color: var(--color-light); text-align: center; padding: 2rem 5%; }
.lightbox {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px); justify-content: center; align-items: center;
}
.lightbox-content { max-width: 85%; max-height: 85%; animation: zoomIn 0.3s ease; }
.lightbox-close { position: absolute; top: 2rem; right: 3rem; color: white; font-size: 3rem; font-weight: bold; cursor: pointer; }

/* --- Animations --- */
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes move-particles { from { background-position: 0 0; } to { background-position: 0 1000px; } }

/* NEW: Enhanced Scroll Animations */
.animate-on-scroll { opacity: 0; transition: opacity 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; }
.animate-on-scroll.visible .animate-from-left,
.animate-on-scroll.visible .animate-from-right {
    opacity: 1; transform: translateX(0);
}
.animate-from-left, .animate-from-right {
    opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-from-left { transform: translateX(-50px); }
.animate-from-right { transform: translateX(50px); }
.animate-on-scroll.visible .gallery-item-wrapper {
    opacity: 1; transform: translateY(0);
}
.gallery-item-wrapper {
    opacity: 0; transform: translateY(50px); transition: opacity 0.5s ease, transform 0.5s ease;
}
/* Stagger the animation for gallery items */
.gallery-grid .gallery-item-wrapper:nth-child(2) { transition-delay: 0.1s; }
.gallery-grid .gallery-item-wrapper:nth-child(3) { transition-delay: 0.2s; }
.gallery-grid .gallery-item-wrapper:nth-child(4) { transition-delay: 0.3s; }
.gallery-grid .gallery-item-wrapper:nth-child(5) { transition-delay: 0.4s; }
.gallery-grid .gallery-item-wrapper:nth-child(6) { transition-delay: 0.5s; }

/* NEW: Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Responsive Design --- */
@media(max-width: 992px) {
    .character-card { flex-direction: column; text-align: center; }
    .clipped-section-bottom { clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); padding-bottom: 8rem; }
    .clipped-section-top { clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%); padding-top: 8rem; }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; left: -100%; top: 0; flex-direction: column;
        justify-content: center; background-color: var(--color-dark);
        width: 100%; height: 100vh; text-align: center; transition: 0.3s; gap: 2rem;
    }
    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.5rem; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}