/* === GLOBALNE USTAWIENIA === */
:root {
    --nexus-dark: #16181e;
    --nexus-card: #1e2029;
    --nexus-header: #2b2d36;
    --nexus-accent: #8bd94e;
    --nexus-accent-hover: #76b840;
}

body {
    background-color: var(--nexus-dark);
    color: #e5e7eb;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    opacity: 1;
    overscroll-behavior-y: none;
    /* Obsługa safe-area dla telefonów z notchem (iPhone X+) */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* === NO DRAG (ZABEZPIECZENIE LOGO) === */
.no-drag {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}

/* === RESPONSIVE TYPOGRAPHY (Skalowanie tekstu) === */
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); } /* Min 2.5rem, prefer 5vw, max 4.5rem */
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
p { font-size: clamp(1rem, 2vw, 1.125rem); }

/* === CONTAINER MAX-WIDTH FOR TV/LARGE SCREENS === */
.container {
    max-width: 1400px; /* Standardowy max-width */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1921px) {
    /* Dla ekranów 4K/TV zwiększamy kontener i czcionki bazowe */
    .container {
        max-width: 1800px;
    }
    html {
        font-size: 18px; /* Lekko powiększamy bazowy tekst */
    }
}

@media (min-width: 2560px) {
    /* Dla bardzo dużych ekranów 4K+ */
    .container {
        max-width: 2400px;
    }
    html {
        font-size: 22px;
    }
}

/* Klasa animacji wejścia dla contentu */
.animate-page-load {
    opacity: 0;
    animation: pageLoad 0.5s ease-out forwards;
    width: 100%;
}

@keyframes pageLoad {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--nexus-dark); }
::-webkit-scrollbar-thumb { background: var(--nexus-header); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--nexus-accent); }

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* === ANIMACJE === */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

/* Wyłączamy ciężkie animacje na urządzeniach mobilnych dla wydajności */
@media (max-width: 768px) {
    .floating-element {
        animation: none;
    }
    .stars, .stars2, .stars3 {
        animation: none; /* Statyczne gwiazdy na mobile */
    }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in-left { animation: fadeInLeft 0.8s ease-out forwards; }
.animate-fade-in-right { animation: fadeInRight 0.8s ease-out forwards; }

/* === TŁO - BLOBY (MGŁAWICE) === */
@keyframes blobBounce {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.animate-blob {
    animation: blobBounce 10s infinite ease-in-out;
}

.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* === CZARNA DZIURA (TŁO) === */
.black-hole-container {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 200px;
    height: 200px;
    z-index: -1;
    opacity: 0.8; 
    pointer-events: none;
    transform: scale(0.8); 
    transition: transform 0.2s ease-out;
}

/* Responsywność Czarnej Dziury */
@media (max-width: 1024px) {
    .black-hole-container {
        top: 5%;
        right: 5%;
        transform: scale(0.6);
    }
}
@media (max-width: 768px) {
    .black-hole-container {
        display: none; /* Ukrywamy na telefonach dla czytelności i wydajności */
    }
}

.black-hole-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background-color: #000;
    border-radius: 50%;
    box-shadow: 0 0 30px 5px rgba(139, 92, 246, 0.4); 
    z-index: 2;
    transition: box-shadow 0.1s ease;
}

.black-hole-accretion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg, 
        transparent 0%, 
        rgba(79, 70, 229, 0.3) 25%, 
        rgba(219, 39, 119, 0.4) 50%, 
        rgba(79, 70, 229, 0.3) 75%, 
        transparent 100%
    );
    filter: blur(12px);
    animation: blackHoleSpin 25s linear infinite;
    z-index: 1;
}

.black-hole-accretion::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    filter: blur(3px);
    opacity: 0.4;
}

.black-hole-jet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 200px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(139, 92, 246, 0.3), transparent);
    transform-origin: bottom center;
    filter: blur(4px);
    z-index: 0;
    opacity: 0.7;
    animation: jetPulse 3s ease-in-out infinite;
}

.black-hole-jet.top {
    transform: translate(-50%, -100%) rotate(15deg);
}

.black-hole-jet.bottom {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(139, 92, 246, 0.3), transparent);
    transform-origin: top center;
    transform: translate(-50%, 0%) rotate(15deg);
}

@keyframes jetPulse {
    0%, 100% { height: 180px; opacity: 0.6; filter: blur(4px); }
    50% { height: 240px; opacity: 0.9; filter: blur(6px); }
}

@keyframes blackHoleSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === SPADAJĄCE GWIAZDY === */
.shooting-stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    transform: rotateZ(45deg);
}

@media (max-width: 768px) {
    .shooting-stars-container {
        display: none; /* Ukrywamy na mobile dla wydajności */
    }
}

.shooting-star {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 2px;
    background: linear-gradient(-45deg, #5f91ff, rgba(0, 0, 255, 0));
    filter: drop-shadow(0 0 6px #699bff);
    animation: tail 12000ms ease-in-out infinite, shooting 12000ms ease-in-out infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 0;
    height: 2px;
    background: linear-gradient(-45deg, rgba(0, 0, 255, 0), #5f91ff, rgba(0, 0, 255, 0));
    transform: translateX(50%) rotateZ(45deg);
    border-radius: 100%;
    animation: shining 12000ms ease-in-out infinite;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 0;
    height: 2px;
    background: linear-gradient(-45deg, rgba(0, 0, 255, 0), #5f91ff, rgba(0, 0, 255, 0));
    transform: translateX(50%) rotateZ(45deg);
    border-radius: 100%;
    animation: shining 12000ms ease-in-out infinite;
    transform: translateX(50%) rotateZ(-45deg);
}

.shooting-star:nth-child(1) { top: calc(50% - 300px); left: calc(50% - 100px); animation-delay: 0ms; }
.shooting-star:nth-child(1)::before, .shooting-star:nth-child(1)::after { animation-delay: 0ms; }

.shooting-star:nth-child(2) { top: calc(50% - 100px); left: calc(50% + 200px); animation-delay: 4000ms; }
.shooting-star:nth-child(2)::before, .shooting-star:nth-child(2)::after { animation-delay: 4000ms; }

.shooting-star:nth-child(3) { top: calc(50% + 200px); left: calc(50% - 300px); animation-delay: 8500ms; }
.shooting-star:nth-child(3)::before, .shooting-star:nth-child(3)::after { animation-delay: 8500ms; }

.shooting-star:nth-child(4) { top: calc(50% + 100px); left: calc(50% + 100px); animation-delay: 11000ms; }
.shooting-star:nth-child(4)::before, .shooting-star:nth-child(4)::after { animation-delay: 11000ms; }

.shooting-star:nth-child(5) { top: calc(50% - 200px); left: calc(50% - 400px); animation-delay: 6000ms; }
.shooting-star:nth-child(5)::before, .shooting-star:nth-child(5)::after { animation-delay: 6000ms; }

@keyframes tail {
    0% { width: 0; }
    5% { width: 100px; }
    10% { width: 0; }
    100% { width: 0; }
}

@keyframes shooting {
    0% { transform: translateX(0); }
    10% { transform: translateX(300px); }
    100% { transform: translateX(300px); }
}

@keyframes shining {
    0% { width: 0; }
    5% { width: 30px; }
    10% { width: 0; }
    100% { width: 0; }
}

/* === MODAL ANIMATION (POP EFFECT) === */
.modal-content {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Mobile fix */
    width: 95%;
    max-height: 85vh;
}

.modal-active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-active .modal-backdrop {
    opacity: 1;
}

/* === TŁO GWIAZD (Hero) === */
.stars-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.warp-active .stars, 
.warp-active .stars2, 
.warp-active .stars3 {
    animation: none; 
    transform-origin: center center;
    transform: scale(1, 20); 
    opacity: 0.8;
    filter: blur(2px);
    transition: transform 0.2s ease-in;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    animation: animStar 150s linear infinite;
}

.stars {
    width: 2px; height: 2px; background: transparent;
    box-shadow: 100px 100px #FFF, 200px 400px #FFF, 500px 300px #FFF, 800px 100px #FFF, 
                150px 600px #FFF, 300px 800px #FFF, 900px 700px #FFF, 1100px 200px #FFF,
                50px 200px #FFF, 1200px 900px #FFF, 400px 500px #FFF, 700px 800px #FFF,
                1000px 400px #FFF, 600px 100px #FFF, 250px 900px #FFF, 850px 300px #FFF,
                1150px 600px #FFF, 350px 150px #FFF, 750px 50px #FFF, 1250px 350px #FFF,
                1300px 800px #FFF, 1400px 100px #FFF, 1500px 500px #FFF, 1600px 300px #FFF;
    opacity: 0.8;
    transition: opacity 0.1s ease;
}

.stars::after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 2px; height: 2px;
    background: transparent;
    box-shadow: 100px 100px #FFF, 200px 400px #FFF, 500px 300px #FFF, 800px 100px #FFF, 
                150px 600px #FFF, 300px 800px #FFF, 900px 700px #FFF, 1100px 200px #FFF,
                50px 200px #FFF, 1200px 900px #FFF, 400px 500px #FFF, 700px 800px #FFF,
                1000px 400px #FFF, 600px 100px #FFF, 250px 900px #FFF, 850px 300px #FFF,
                1150px 600px #FFF, 350px 150px #FFF, 750px 50px #FFF, 1250px 350px #FFF,
                1300px 800px #FFF, 1400px 100px #FFF, 1500px 500px #FFF, 1600px 300px #FFF;
}

.stars2 {
    width: 3px; height: 3px; background: transparent;
    box-shadow: 200px 300px #b19cf8, 600px 100px #b19cf8, 900px 500px #b19cf8, 
                1200px 800px #b19cf8, 400px 900px #b19cf8, 100px 700px #b19cf8;
    animation-duration: 200s;
    opacity: 0.5;
}

.stars2::after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 3px; height: 3px;
    background: transparent;
    box-shadow: 200px 300px #b19cf8, 600px 100px #b19cf8, 900px 500px #b19cf8, 
                1200px 800px #b19cf8, 400px 900px #b19cf8, 100px 700px #b19cf8;
}

.stars3 {
    width: 1px; height: 1px; background: transparent;
    box-shadow: 150px 250px #FFF, 550px 150px #FFF, 850px 550px #FFF, 1250px 850px #FFF;
    animation-duration: 100s;
    opacity: 1;
}

.stars3::after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 1px; height: 1px;
    background: transparent;
    box-shadow: 150px 250px #FFF, 550px 150px #FFF, 850px 550px #FFF, 1250px 850px #FFF;
}

@keyframes animStar {
    from { transform: translateY(0px); }
    to { transform: translateY(-2000px); }
}

/* === ASTEROIDY === */
.asteroid {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
    z-index: 1;
}

@media (max-width: 768px) {
    .asteroid, .astronaut {
        display: none; /* Ukrycie asteroid na mobile */
    }
}

.anim-asteroid-1 {
    top: 10%;
    left: -100px;
    width: 40px;
    animation: flyAsteroid1 35s linear infinite;
}

.anim-asteroid-2 {
    top: 60%;
    left: -150px;
    width: 60px;
    animation: flyAsteroid2 45s linear infinite;
    animation-delay: 5s;
}

.anim-asteroid-3 {
    top: 30%;
    right: -100px;
    width: 30px;
    animation: flyAsteroid3 55s linear infinite;
    animation-delay: 2s;
}

@keyframes flyAsteroid1 {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translate(110vw, 20vh) rotate(360deg); opacity: 0; }
}

@keyframes flyAsteroid2 {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translate(110vw, -30vh) rotate(-180deg); opacity: 0; }
}

@keyframes flyAsteroid3 {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translate(-120vw, 40vh) rotate(200deg); opacity: 0; }
}

/* === ASTRONAUTA === */
.astronaut {
    position: absolute;
    pointer-events: none;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    z-index: 2;
}

.anim-astronaut {
    top: 20%;
    left: -120px;
    width: 65px;
    animation: flyAstronaut 60s linear infinite;
    animation-delay: 1s;
}

@keyframes flyAstronaut {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    5% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(110vw, 30vh) rotate(2880deg); opacity: 0; }
}

/* === NOWE TŁO DLA SEKCJI FEATURES (GRID) === */
.bg-grid-pattern {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* === EFEKT SZKŁA DLA KART === */
.glass-card {
    background: rgba(30, 32, 41, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* === KURSOR - GWIEZDNY PYŁ === */
.cursor-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: fadeParticle 0.8s linear forwards;
}

@media (hover: none) {
    .cursor-particle {
        display: none; /* Ukrycie cząsteczek na ekranach dotykowych */
    }
}

@keyframes fadeParticle {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}
