:root {
    --bg-dark: #111111;
    --text-light: #F8F9FA;
    --accent-yellow: #FFD166;
    --accent-pink: #EF476F;
    --accent-mint: #06D6A0;
    --accent-blue: #118AB2;
    --box-bg: rgba(255, 255, 255, 0.05);
    --divider-bg: rgba(255, 255, 255, 0.1);
    --font-heading: 'Oswald', sans-serif;
    --font-title: 'Poppins', sans-serif;
    --font-subtitle: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-desc: 'Nunito', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.61;
}

/* Creating a wrapper to handle the rotated background without horizontal scrollbars */
.site-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    /* Clips the oversized, rotated background */
    z-index: 0;
}

.site-wrapper::before {
    content: '';
    position: absolute;
    /* Make the background massive so bringing it to 30deg doesn't show edges */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('images/MeowBox_Background_Small.png');
    background-repeat: repeat;
    background-size: 1500px;
    /* Reduced to make pattern smaller as requested */
    background-position: center;
    transform: rotate(30deg);
    /* 30 degree tilt */
    z-index: -2;
    pointer-events: none;
}

.site-wrapper::after {
    /* Optional tint/dark overlay applied *over* the background to keep text legible */
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    opacity: 0.85;
    /* Adjust visibility (0.0 = full pattern, 1.0 = pitch black) */
    z-index: -1;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Header & Hero */
.hero {
    position: relative;
    min-height: 200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Language Switcher */
.lang-switch {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 100;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.lang-switch a {
    color: var(--text-light);
    opacity: 0.6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lang-switch a:hover,
.lang-switch a.active {
    color: var(--accent-yellow);
    opacity: 1;
}

.logo-container {
    position: relative;
    z-index: 2;
    width: 320px;
    /* Increased logo size slightly more as requested */
    margin: 0;
}

.logo {
    width: 100%;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

/* Social Nav */
.social-nav {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.3rem 0;
    color: var(--text-light);
    opacity: 0.7;
    font-size: 1.1rem;
}

.social-nav a:hover,
.team-socials a:hover,
.footer-socials a:hover {
    color: var(--accent-mint);
    opacity: 1;
    transition: all 0.3s ease;
}

/* Section Dividers */
.section-divider {
    background: rgba(255, 255, 255, 0.15);
    /* Slightly visible boxed background */
    border: none;
    /* Removing full width border lines */
    border-radius: 4px;
    /* Slight rounded corners as in many UI boxes */
    text-align: center;
    padding: 0.6rem 0;
    /* Reduced vertical padding */
    margin: 0 auto 1.5rem auto;
    /* Removed top margin entirely to collapse distance */
    max-width: 800px;
    /* Constrain width to make it a box like 'Characters' */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Optional subtle shadow */
}

.section-divider h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    letter-spacing: 2px;
    color: var(--accent-yellow);
    font-weight: 700;
}

/* Game Slider Navigation */
.games-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-nav-btn {
    position: absolute;
    top: 300px; /* Adjusted by JS to center relative to game-window */
    transform: translateY(-50%);
    background: var(--bg-dark);
    border: 1px solid var(--divider-bg);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-nav-btn:hover {
    background: var(--accent-mint);
    color: #111111;
    transform: translateY(-50%) scale(1.1);
}

.prev-game-btn {
    left: -80px;
}

.next-game-btn {
    right: -80px;
}

#current-game-title {
    margin: 0;
    min-width: 300px;
    transition: opacity 0.3s ease;
}

/* Games Slider Container */
.games-slider-container {
    position: relative;
    width: 100%;
}

.games-slider-track {
    align-items: flex-start !important;
}

/* Game Window Wrapper */
.game-window {
    background: var(--box-bg);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--divider-bg);
    padding: 2rem;
    margin-bottom: 3rem;
}

/* Projects Section */
.projects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.featured-project {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.project-logo {
    max-width: 350px;
    margin-bottom: 1.5rem;
}

.project-info p {
    font-family: var(--font-desc);
    font-size: 0.95rem;
    /* Reduced text size */
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 300px;
}

.btn-red {
    background-color: var(--accent-blue);
    color: var(--text-light);
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.btn-red:hover {
    background-color: var(--accent-mint);
    color: #111111;
}

.project-video {
    flex: 1.5;
    position: relative;
    border-radius: 8px;
    /* Slightly larger border-radius to match the iframe style */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    /* A bit stronger shadow for depth */
    background-color: var(--box-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make iframe fit entirely inside perfectly */
.project-video iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.project-video video,
.project-video img {
    width: 100%;
    height: auto;
    border: none;
    display: block;
}

/* Correcting the screenshot layout */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    /* Added slightly more gap for cleaner look */
    justify-content: center;
    margin-bottom: 2rem;
}

.screenshot-gallery img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Match styling of other elements */
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-gallery img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.screenshot-gallery img:nth-child(n+4) {
    display: none;
}

/* Lightbox Modal */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(10, 10, 10, 0.95); /* Dark semi-transparent background */
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-mint);
    text-decoration: none;
    cursor: pointer;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-btn:hover {
    background: var(--accent-mint);
    color: #111111;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 15px; }
}


/* Character Slider */
.character-slider-container {
    position: relative;
    max-width: 1050px;
    margin: 3rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.slider-track-container {
    position: relative;
    width: 90%;
    height: 450px;
    /* Increased height to prevent overflow */
    overflow: hidden;
    background: var(--box-bg);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--divider-bg);
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.character-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-slide.active {
    opacity: 1;
}

.char-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.char-image img {
    max-width: 250px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
}

.char-info {
    flex: 2;
}

.char-info h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-mint);
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.char-role {
    font-family: var(--font-subtitle);
    font-style: italic;
    color: var(--accent-yellow);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.char-desc {
    font-family: var(--font-desc);
    font-weight: 500;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-dark);
    border: 1px solid var(--divider-bg);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--accent-blue);
    color: #111111;
    border-color: var(--accent-blue);
}

.prev-btn {
    left: 0;
    /* Position slightly outside */
}

.next-btn {
    right: 0;
    /* Position slightly outside */
}

.is-hidden {
    display: none !important;
}

.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent-mint);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.slider-dot.active {
    background: var(--accent-mint);
    transform: scale(1.2);
}

.press-kit-container {
    text-align: center;
    margin-top: 2rem;
}

.press-kit-link {
    display: inline-block;
    padding: 0.6rem 2rem;
    color: var(--accent-pink);
    border: 2px solid var(--accent-pink);
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-decoration: none;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.press-kit-link:hover {
    background-color: var(--accent-pink);
    color: #111111;
}

/* Team Section */
.team {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

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

.member-avatar {
    width: 140px;
    height: auto;
    /* Allow natural height based on width so aspect ratio stays true */
    margin: 0 auto 1.2rem auto;
    object-fit: contain;
    /* Prevents stretching if the image is an odd size */
    display: block;
    /* Ensures margin auto centers it */
}

.team-member h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.role {
    font-family: var(--font-subtitle);
    font-style: italic;
    color: var(--accent-mint);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.bio {
    font-family: var(--font-desc);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.9;
    margin-bottom: 1.5rem;
    min-height: 150px;
}

.credits {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}

.team-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1.2rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* Newsletter & Footer */
.newsletter {
    text-align: center;
    margin: 4rem 0;
}

.newsletter h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.newsletter p {
    font-family: var(--font-desc);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.8;
    margin-bottom: 2rem;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.subscribe-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--divider-bg);
    background: var(--box-bg);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-light);
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.subscribe-input::placeholder {
    color: var(--text-light);
    opacity: 0.5;
}

.subscribe-input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
}

.subscribe-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-blue);
    color: #111111;
    border: none;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.subscribe-btn:hover {
    background-color: var(--accent-mint);
}

.subscribe-btn:active {
    transform: scale(0.98);
}

footer {
    text-align: center;
    padding: 1rem 0;
    /* Reduced from 2rem */
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-info {
    margin-bottom: 0.5rem;
    /* Reduced from 2rem */
}

.contact-info p {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    /* Reduced from 0.5rem */
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
    opacity: 0.7;
}

.legal {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.6;
}

.legal a {
    color: var(--text-light);
    display: inline-block;
    margin-bottom: 0.2rem;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.legal a:hover {
    color: var(--accent-pink);
    opacity: 1;
}

/* Responsive Tweaks */
@media (max-width: 900px) {
    .team {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-project {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .team {
        grid-template-columns: 1fr;
    }
}