/* --- ZMIENNE --- */
:root {
    --bg-dark: #0a0312;
    --primary-purple: #240b36;
    --accent-purple: #5e1675;
    --highlight: #c31432; 
    --glass-bg: rgba(20, 10, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --font-main: 'Montserrat', sans-serif;
}

/* ========================================= */
/* INTRO VIDEO ANIMATION                     */
/* ========================================= */
.intro-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    z-index: 999999; /* Musi być na absolutnej górze */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* Klasa dodawana w JS, aby płynnie ukryć film */
.intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Wypełnia cały ekran bez zniekształceń */
    pointer-events: none; /* Blokuje kliknięcia w same wideo, przekazując je do overlay */
}

/* Delikatny, pulsujący napis zachęcający do kliknięcia */
.intro-hint {
    position: absolute;
    bottom: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    animation: pulseHint 2s infinite;
}

@keyframes pulseHint {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* --- ZAKTUALIZOWANE STYLE DLA INTRO VIDEO --- */

#intro-video {
    /* Domyślnie na dużych ekranach: wypełniaj, ale nie obcinaj drastycznie */
    width: 115%;
    height: 115%;
    object-fit: contain; /* ZMIANA z cover na contain - film w całości mieści się na ekranie */
    background: #000; /* Czarny pasek w tle, jeśli proporcje filmu są inne */
    pointer-events: none;
    animation: zoomInVideo 1s ease-out; /* Dodatkowa animacja wejścia wideo */
}

/* Animacja delikatnego powiększenia wideo przy starcie */
@keyframes zoomInVideo {
    from { transform: scale(1.1); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- MEDIA QUERY DLA TELEFONÓW (PIONOWYCH) --- */
@media (max-width: 480px) and (orientation: portrait) {
    #intro-video {
        /* Na telefonach w pionie: nie chcemy contain (za mały), ani cover (za duży).
           Chcemy, aby film zajął np. 80% szerokości ekranu, a wysokość dobrała się sama. */
        width: 190% !important;
        height: auto !important;
        object-fit: scale-down; /* Zachowuje proporcje */
        border-radius: 12px; /* Opcjonalnie: zaokrąglone rogi dla efektu karty */
        box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    }
    
    .intro-hint {
        font-size: 0.7rem;
        letter-spacing: 2px;
        bottom: 30px;
    }
}

/* Domyślny stan głównej zawartości - ukryta i przezroczysta */
.main-content-wrapper {
    transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
    /* visibility: hidden; opacity: 0; -- dodane inline w HTML dla pewności */
}

/* Klasa dodawana w JS, aby pokazać stronę */
.main-content-wrapper.content-visible {
    visibility: visible !important;
    opacity: 1 !important;
}


/* Klasa blokująca przewijanie strony, gdy intro jest aktywne */
body.no-scroll {
    overflow: hidden;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.landing-page {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- NAWIGACJA GÓRNA --- */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 8%;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}

.landing-nav .logo-area {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.landing-nav .logo-area i { color: var(--highlight); }

.nav-links { display: flex; gap: 20px; }

.nav-btn {
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-btn.ghost { color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.nav-btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.nav-btn.solid { background: #fff; color: var(--primary-purple); }
.nav-btn.solid:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255,255,255,0.3); }

/* --- HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 8%;
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
}

.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(10, 3, 18, 0.95) 0%, rgba(36, 11, 54, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    animation: fadeInUp 1s ease-out forwards;
}

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(195, 20, 50, 0.15);
    color: #ff4d4d;
    border: 1px solid rgba(195, 20, 50, 0.5);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-section h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.highlight-text {
    background: linear-gradient(90deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
}

.hero-subtext {
    font-size: 1.25rem;
    color: #ccc;
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 650px;
}

.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }

.btn-primary-large {
    background: linear-gradient(135deg, var(--highlight), #901025);
    color: #fff;
    padding: 16px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.btn-primary-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(195, 20, 50, 0.5);
}

.btn-secondary-large {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 16px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}
.btn-secondary-large:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* --- KSZTAŁTY TŁA (Zmienione, bardziej dynamiczne) --- */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    opacity: 0.4;
}
.shape-1 { width: 500px; height: 500px; background: var(--accent-purple); top: -150px; right: -100px; animation: float 10s infinite alternate; }
.shape-2 { width: 400px; height: 400px; background: var(--highlight); bottom: -100px; left: 10%; animation: float 12s infinite alternate-reverse; }
.shape-3 { width: 300px; height: 300px; background: #9c27b0; top: 40%; right: 30%; animation: float 8s infinite alternate; }

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(40px) scale(1.1); }
}

/* --- SEKCJA PODGLĄDU INTERFEJSU --- */
.preview-section {
    padding: 8rem 8%;
    background: #08020d; 
    position: relative;
}

.section-header { text-align: center; margin-bottom: 5rem; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 1rem; font-weight: 800; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
}

.preview-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.preview-card:hover { transform: translateY(-15px); border-color: rgba(156, 39, 176, 0.4); }

.preview-header {
    display: flex; align-items: center; gap: 15px; margin-bottom: 2rem;
}
.preview-header i { font-size: 2rem; color: var(--highlight); }
.preview-header h3 { font-size: 1.5rem; font-weight: 700; }

.preview-features { list-style: none; margin-top: 2rem; }
.preview-features li { margin-bottom: 12px; color: #ddd; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.preview-features li i { color: #2ecc71; font-size: 0.85rem; background: rgba(46, 204, 113, 0.1); padding: 4px; border-radius: 50%; }

/* ========================================= */
/* MOCKUPY - MAGIA CSS I ECHARTS             */
/* ========================================= */

.preview-image-box {
    background: #0f0518;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    height: 320px; /* Zwiększona wysokość, żeby elementy swobodnie oddychały */
    padding: 20px;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* KONTENER DLA WYKRESU TRENERA */
.chart-showcase {
    padding: 5px; /* Mniej paddingu, wykres wymaga miejsca */
}

/* WIZUALIZACJA LIVE WORKOUT (KLIENT) */
.live-workout-showcase {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #140a20; /* Delikatnie jaśniejsze tło symulujące aplikację */
}

.lw-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 5px;
}
.lw-date { color: #fff; font-weight: 700; font-size: 0.9rem; }
.lw-timer { color: var(--highlight); font-family: monospace; font-size: 1rem; font-weight: 600; }
.pulsing { animation: pulseRed 1.5s infinite; }
@keyframes pulseRed { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* Wiersz ćwiczenia */
.lw-row {
    background: rgba(30, 15, 45, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
    transform: translateX(20px);
}
.lw-row:nth-child(2) { animation-delay: 0.1s; }
.lw-row:nth-child(3) { animation-delay: 0.3s; }
.lw-row:nth-child(4) { animation-delay: 0.5s; }

/* Info o ćwiczeniu */
.lw-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lw-id {
    width: 35px; height: 35px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; color: #fff;
}
.bg-red { background: rgba(195, 20, 50, 0.2); border: 1px solid var(--highlight); }
.bg-orange { background: rgba(230, 126, 34, 0.2); border: 1px solid #e67e22; color: #e67e22;}
.bg-green { background: rgba(46, 204, 113, 0.2); border: 1px solid #2ecc71; color: #2ecc71; }

.lw-details { display: flex; flex-direction: column; }
.lw-details strong { font-size: 0.95rem; color: #fff; }
.lw-details small { font-size: 0.75rem; color: #999; display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-red { background: var(--highlight); }

/* Bloczki serii */
.lw-sets { display: flex; gap: 8px; margin-left: 47px; } /* Przesunięte wgłąb dla estetyki */
.lw-set {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 45px; height: 40px; border-radius: 8px; font-weight: 700; font-size: 0.95rem;
    position: relative;
}
.lw-set small {
    position: absolute; top: -5px; left: 4px;
    font-size: 0.5rem; color: #888;
}
.lw-set span { font-size: 0.6rem; margin-left: 2px; font-weight: 400; }

.lw-set.done { 
    border: 1px solid #2ecc71; color: #2ecc71; 
    background: rgba(46, 204, 113, 0.1); 
}
.lw-set.active { 
    border: 1px solid #9c27b0; color: #fff; 
    background: rgba(156, 39, 176, 0.2); 
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.3);
}
.lw-set.pending { 
    border: 1px dashed rgba(255,255,255,0.2); color: #aaa; 
}

@keyframes slideInRight {
    to { opacity: 1; transform: translateX(0); }
}

/* --- CECHY --- */
.features-section { padding: 8rem 8%; background: var(--bg-dark); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }

.feature-card {
    background: rgba(255,255,255,0.02);
    padding: 3rem 2.5rem; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s ease; text-align: center;
}
.feature-card:hover {
    background: rgba(156, 39, 176, 0.05); border-color: rgba(156, 39, 176, 0.3); transform: translateY(-10px);
}
.feature-card .icon-box {
    width: 80px; height: 80px; background: rgba(195, 20, 50, 0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: var(--highlight); margin: 0 auto 1.5rem;
}
.feature-card h3 { margin-bottom: 1rem; font-size: 1.4rem; }
.feature-card p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* --- CTA SECTION --- */
.cta-section {
    padding: 8rem 5%; text-align: center; position: relative;
    background: linear-gradient(to top, #08020d, var(--bg-dark)); overflow: hidden;
}
.cta-bg-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px; background: radial-gradient(circle, rgba(195, 20, 50, 0.15) 0%, transparent 70%); z-index: 0;
}
.cta-content { position: relative; z-index: 1; }
.cta-content h2 { font-size: 3.5rem; margin-bottom: 1rem; font-weight: 800; }
.cta-content p { color: #aaa; font-size: 1.2rem; margin-bottom: 2rem; }

/* --- FOOTER --- */
.landing-footer {
    border-top: 1px solid rgba(255,255,255,0.05); padding: 4rem 8% 2rem;
    background: #05010a; color: var(--text-muted); font-size: 0.9rem;
}
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { max-width: 300px; line-height: 1.5; margin-top: 10px; }
.footer-contact h5 { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; text-transform: uppercase; }
.footer-contact ul { list-style: none; }
.footer-contact li { margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.footer-contact a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.footer-contact a:hover { color: var(--highlight); }
.footer-legal {
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.legal-links a { color: var(--text-muted); margin-left: 20px; text-decoration: none; transition: 0.3s;}
.legal-links a:hover { color: #fff; }

/* --- ANIMACJE WEJŚCIOWE --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RWD --- */
@media (max-width: 900px) {
    .hero-section h1 { font-size: 3rem; }
    .hero-subtext { font-size: 1.1rem; }
    .footer-container { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .landing-nav { padding: 1.5rem 5%; }
    .nav-links .nav-btn.ghost { display: none; }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-primary-large, .btn-secondary-large { width: 100%; justify-content: center; }
    .section-header h2 { font-size: 2rem; }
    .preview-container { grid-template-columns: 1fr; }
    .footer-legal { flex-direction: column; text-align: center; }
    .legal-links { display: flex; flex-direction: column; gap: 10px; }
    .legal-links a { margin-left: 0; }
}