/* --- COLOR VARIABLES (Based on logo) --- */
:root {
    --bg-color: #050505;       /* Almost black */
    --text-color: #ffffff;     /* White */
    --accent-color: #8b5a2b;   /* Brown from the bottle nipple */
    --gray-color: #333333;     /* Dark gray for boxes */
    --ui-gray: #1a1a1a;        /* Slightly lighter gray for UI elements */
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace; /* Text font */
    font-size: 20px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Press Start 2P', cursive; /* Header font */
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.4;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: 0.3s;
}

/* --- SCANLINES EFFECT (CRT TV style) --- */
body::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 10;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* --- MAIN CONTAINER --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 11;
}

/* --- HEADER & LOGO --- */
header {
    text-align: center;
    padding: 60px 0;
    border-bottom: 4px solid var(--text-color);
    margin-bottom: 50px;
}

.logo-img {
    max-width: 300px;
    height: auto;
    /* Ensures crisp edges for pixel art scaling */
    image-rendering: pixelated; 
    image-rendering: crisp-edges;
    margin-bottom: 20px;
}

.studio-desc {
    font-size: 1.5rem;
    opacity: 0.8;
    letter-spacing: 2px;
}

/* --- REUSABLE RETRO BOX STYLES --- */
.retro-box {
    background-color: var(--ui-gray);
    border: 4px solid var(--text-color);
    padding: 30px;
    box-shadow: 8px 8px 0px var(--accent-color);
}

.retro-box--dashed {
    border: 4px dashed var(--gray-color);
    padding: 25px;
    background-color: rgba(255,255,255,0.05);
}

/* --- GAME SECTION --- */
.game-section {
    text-align: center;
    margin-bottom: 80px;
}

.game-title {
    margin-top: 25px;
    font-size: 2rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 0px var(--text-color);
}

/* --- CAROUSEL / SLIDER STYLES (New!) --- */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 30px auto;
    border: 4px solid var(--text-color);
    background-color: #000;
}

.carousel-track-container {
    overflow: hidden;
    /* Aspect ratio box hack for consistent height */
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.carousel-track {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    transition: transform 400ms ease-in-out;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    min-width: 100%; /* Each slide takes full width */
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills box without stretching */
    image-rendering: pixelated;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--text-color);
    font-family: 'Press Start 2P';
    font-size: 1rem;
    padding: 10px;
    cursor: pointer;
    z-index: 12;
}

.carousel-button:hover {
    background: var(--accent-color);
}

.prev-btn { left: -20px; }
.next-btn { right: -20px; }

.carousel-button.is-hidden {
    display: none;
}

/* --- ROBLOX BUTTON --- */
.roblox-btn {
    display: inline-block;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 15px 35px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    margin-top: 30px;
    border: 4px solid var(--bg-color);
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--accent-color);
}

.roblox-btn:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
    border-color: var(--text-color);
    box-shadow: none;
    transform: translate(4px, 4px);
}

/* --- TEAM SECTION --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
    margin-bottom: 80px;
}

.role-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--bg-color);
    font-family: 'Press Start 2P';
    padding: 8px 12px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    border: 2px solid var(--text-color);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 50px 0;
    border-top: 2px solid var(--gray-color);
    font-size: 1rem;
    opacity: 0.7;
}

/* Helper class for yellow text needing replacement */
.placeholder-text {
    color: #ffff00; 
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    /* Adjust carousel arrows on mobile */
    .prev-btn { left: 5px; }
    .next-btn { right: 5px; }
    .carousel-button { padding: 5px; font-size: 0.8rem; opacity: 0.8; }
}

/* --- TYPEWRITER EFFECT (WERSJA FINALNA) --- */
.typewriter-text {
    /* inline-block sprawia, że pudełko jest szerokie tylko tyle ile tekst */
    display: inline-block; 
    
    /* Ukrywanie nadmiaru */
    overflow: hidden; 
    
    /* Kursor */
    border-right: .15em solid var(--accent-color); 
    
    /* Blokada zawijania wierszy */
    white-space: nowrap; 
    
    /* Marginesy nie są tu potrzebne do centrowania, bo załatwia to rodzic (header) */
    margin: 0; 
    
    letter-spacing: 2px;
    
    /* WAŻNE: Startujemy od szerokości 0 */
    width: 0; 
    
    /* Animacja */
    animation: 
        typing 3.5s steps(30, end) forwards, 
        blink-caret .75s step-end infinite;
}

/* --- ZMIANA TUTAJ (plik style.css na samym dole) --- */

@keyframes typing {
    from { width: 0 }
    to { width: 34ch } /* Zwiększyłem z 30ch na 34ch - ten zapas naprawi ucięty tekst */
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color) }
}

/* --- GLITCH EFFECT (POPRAWIONE) --- */
/* Upewniamy się, że H1 stoi w miejscu */
h1 {
    display: block; 
    margin-bottom: 20px;
}

/* Efekt dotyczy tylko tekstu w środku */
.glitch-text {
    position: relative;
    display: inline-block; /* Konieczne dla transformacji */
    transition: color 0.1s;
}

.glitch-text:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: var(--accent-color);
    cursor: default; /* Żeby kursor nie sugerował, że to link */
}

@keyframes glitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}


/* --- SCROLL REVEAL ANIMATION --- */
.hidden-element {
    opacity: 0;
    transform: translateY(50px); /* Przesunięcie w dół */
    transition: all 0.8s ease-out; /* Płynne wejście */
    filter: blur(5px); /* Lekkie rozmycie na start */
}

.show-element {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Opcjonalnie: opóźnienie dla kart zespołu, żeby wjeżdżały jedna po drugiej */
.team-member:nth-child(2) { transition-delay: 200ms; }
.team-member:nth-child(3) { transition-delay: 400ms; }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    /* Zmniejszamy główne nagłówki */
    h1 { 
        font-size: 1.4rem; /* Było 1.8, ale dla długich nazw lepiej dać mniej */
    }
    
    h2 { 
        font-size: 1.3rem; 
    }
    
    /* --- NAPRAWA TYTUŁU GRY --- */
    .game-title {
        font-size: 1.1rem; /* Zmniejszamy drastycznie z 2rem, żeby się zmieściło */
        line-height: 1.4;  /* Większy odstęp między wierszami jakby jednak zawinęło */
        word-break: break-word; /* Wymusza zawijanie słów, jeśli są za długie */
        padding: 0 10px; /* Margines bezpieczeństwa */
    }
    
    /* Adjust carousel arrows on mobile */
    .prev-btn { left: 5px; }
    .next-btn { right: 5px; }
    .carousel-button { padding: 5px; font-size: 0.8rem; opacity: 0.8; }
    
    /* Dodatkowo: poprawka dla Typewritera na bardzo wąskich ekranach */
    .typewriter-text {
        font-size: 0.8rem; /* Mniejszy tekst terminala */
        letter-spacing: 1px; /* Mniejsze odstępy */
    }
}