/* ========================================== */
/* WEBSIDERS - GŁÓWNY ARKUSZ STYLÓW           */
/* ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Główne tło i ustawienia strony */
html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* TO NAPRAWIA BIAŁY EKRAN - GŁĘBOKA CZERŃ W TLE */
    background-color: #050507 !important; 
    color: #ffffff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Ukrycie domyślnego suwaka paska przewijania (Scrollbara) */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050507;
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* ========================================== */
/* WARSTWY TŁA I THREE.JS (GWIAZDY)           */
/* ========================================== */

/* Płótno Three.js (Gwiazdy i Monitor) */
#webgl-canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Niebieska poświata na stałe w tle */
.page-glow {
    position: fixed !important;
    inset: 0;
    pointer-events: none !important;
    z-index: 1 !important;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.15) 0%, rgba(5, 5, 7, 0) 65%);
}

/* Ułożenie warstw dla treści właściwej (MUSI BYĆ NAD GWIAZDAMI) */
header.top-bar, .animation-space, main.content {
    position: relative;
    z-index: 10;
}

/* Zabezpieczenie modala przed zmianą na relative */
#auth-modal {
    position: fixed !important;
    z-index: 9999 !important;
}

/* ========================================== */
/* NAWIGACJA (TOP BAR)                        */
/* ========================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 35px 5vw;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 100;
    pointer-events: none; 
}

.top-bar .logo {
    height: 38px;
    width: auto;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.top-bar .logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.8));
}

/* ========================================== */
/* SEKCJA HERO (Z GŁÓWNYM NAPISEM)            */
/* ========================================== */
.hero {
    position: relative;
    z-index: 10;
    color: #ffffff;
    background: transparent !important;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: #a1a1aa;
    font-weight: 400;
    max-width: 650px;
    margin-bottom: 4rem;
    line-height: 1.6;
}

/* Animowany wskaźnik scrollowania */
.scroll-indicator {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #3b82f6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    font-weight: 600;
    opacity: 0.8;
    animation: pulseText 2s infinite ease-in-out;
}

.scroll-indicator::after {
    content: '';
    width: 2px;
    height: 70px;
    background: linear-gradient(to bottom, #3b82f6, transparent);
    display: block;
    margin-left: 15px;
    animation: scrollLine 2s infinite ease-in-out;
}

/* ========================================== */
/* HUD / PANEL POSTĘPU ANIMACJI 3D            */
/* ========================================== */
#progress-ui {
    position: fixed;
    top: 35px;
    
    /* Wyśrodkowanie idealnie na ekranie! */
    left: 50%;
    transform: translateX(-50%);
    
    width: 320px;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 14px;
    z-index: 100;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#progress-ui.hidden {
    opacity: 0 !important;
    /* Musi uwzględniać translateX(-50%) żeby nie uciekło znowu na lewo/prawo przy znikaniu */
    transform: translate(-50%, -15px);
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a1a1aa;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

#progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
    transition: width 0.1s linear, background-color 0.3s ease;
    border-radius: 4px;
}

/* ========================================== */
/* ZAAWANSOWANE KLAWISZE I PODPOWIEDZI UI     */
/* ========================================== */
#skip-animation-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99999;
    pointer-events: auto !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    animation: floatingBtn 2s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#skip-animation-btn:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
    transform: translateX(-50%) scale(1.1);
    animation-play-state: paused;
}


.side-scroll-hint {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    pointer-events: none;
    opacity: 0.7;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    animation: pulseHint 2.5s infinite;
    z-index: 999;
    transition: opacity 0.4s ease; /* <--- Płynne zanikanie */
}

.side-scroll-hint.left { left: 40px; }
.side-scroll-hint.right { right: 40px; }

/* Kluczowe klatki animacji */
@keyframes pulseText { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes scrollLine { 0% { transform: translateY(-10px) scaleY(0.5); opacity: 0; } 50% { transform: translateY(0) scaleY(1); opacity: 1; } 100% { transform: translateY(15px) scaleY(0.5); opacity: 0; } }
@keyframes floatingBtn { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
@keyframes pulseHint { 0%, 100% { opacity: 0.2; transform: translateY(-50%) scale(1); } 50% { opacity: 0.9; transform: translateY(-50%) scale(1.1); } }