@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Lexend+Deca:wght@400;700&family=Geologica:wght@700;800;900&display=swap");

:root {
  --bg-dark: #161619;
  --bg-medium: #1d1d20;
  --bg-light: #2a2a2e;
  --border-color: #38383f;
  --text-primary: #e4e4e7;
  --text-secondary: #a0a0a9;
  --accent-primary: #9a03aa;
  --accent-secondary: #70027a;
  --purple: #70027a;
  --purple-light: #9a03aa;
  --light-gray: #a8a8a8;
  --gray: #1A1A1D;
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Lexend Deca', sans-serif;
  --font-headings: 'Geologica', sans-serif;
  --transition-speed: 0.4s;
}

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

html { 
  scroll-behavior: smooth; 
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* --- EKRAN ŁADOWANIA --- */
.loading {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    visibility: visible;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    width: 120px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.loading-text-wrapper {
    margin-top: 25px;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    letter-spacing: 4px;
    color: var(--light-gray);
    text-align: center;
    min-height: 2em;
    text-transform: uppercase;
}

#loading-message {
    display: inline-block;
    opacity: 1;
}

#loading-message::after {
    content: '_';
    animation: blink-cursor 0.7s infinite;
    margin-left: 2px;
    color: var(--purple-light);
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* TŁO WIDEO */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: #0b0c10;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
}

/* Zastepcze tlo gdy wideo nie jest ladowane (telefon / oszczedzanie danych) */
.video-background.no-video {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(154, 3, 170, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 80%, rgba(112, 2, 122, 0.22) 0%, transparent 55%),
        #0b0c10;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(22, 22, 25, 0.6) 0%, rgba(22, 22, 25, 0.95) 100%);
}

/* NAWIGACJA */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 1000;
    transition: background-color var(--transition-speed) ease-in-out,
                padding var(--transition-speed) ease-in-out;
    background: transparent;
    box-shadow: none;
}

.navbar.scrolled {
    background: rgba(13, 13, 15, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.85rem 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu {
    display: flex;
    flex: 1;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.nav-link {
    color: #e7e7e7;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 999px;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link:hover, .nav-link.active {
    color: white;
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: none;
    background: linear-gradient(135deg, rgba(112, 2, 122, 0.15), rgba(112, 2, 122, 0.08));
}

.nav-toggle { 
    display: none; 
    font-size: 1.5rem; 
    cursor: pointer;
    color: white;
}

/* LICZNIKI GRACZY */
.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-right { margin-left: auto; }

.player-count-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 140px;
    height: 56px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.22s ease;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    position: relative;
    cursor: pointer;
    flex-wrap: nowrap;
}

.player-count-container:hover {
    transform: translateY(-3px);
    box-shadow: none;
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(112, 2, 122, 0.15), rgba(112, 2, 122, 0.08));
}

.player-count-container[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
}

.player-count-icon {
    font-size: 1.05rem;
    color: var(--purple-light);
    text-shadow: 0 0 4px rgba(112, 2, 122, 0.35);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
    transition: background-color 0.5s;
}

@keyframes livePulse {
    0% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(1); opacity: 0.85; }
}

.player-count-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    line-height: 1.1;
    gap: 2px;
}

#player-count-label, #player-count-label-soon {
    font-size: 0.68rem;
    color: #dcdcdc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-count-numbers {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    color: white;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.count-separator { margin: 0 1px; }

#player-count {
    font-size: 1.32rem;
    line-height: 1;
}

.count-separator, #max-players {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-gray);
    line-height: 1;
}

.trend-arrow {
    font-size: 1rem;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    transform: translateY(5px);
}

.trend-arrow.visible { opacity: 1; transform: translateY(0); }
.trend-arrow.up { color: #2ecc71; text-shadow: 0 0 8px #2ecc71; }
.trend-arrow.down { color: #e74c3c; text-shadow: 0 0 8px #e74c3c; }

/* Status SOON */
.player-count-container.soon-status .live-indicator {
    background-color: #e74c3c;
    animation: soonDot 1.6s ease-in-out infinite;
}

.player-count-container.soon-status #player-count-label-soon {
    color: #e74c3c;
}

.player-count-container.soon-status {
    cursor: default;
    flex: 0 0 auto;
    min-width: 140px;
}

.player-count-container.soon-status .player-count-icon {
    color: var(--light-gray);
}

.player-count-container.soon-status:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.player-count-container.soon-status .player-count-numbers span {
    font-size: 1.2rem;
    letter-spacing: 1px;
}

@keyframes soonDot {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* RESPONSIVE NAV */
@media (max-width: 992px) {
    .nav-toggle { display: block; z-index: 1001; }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s ease-in-out;
        z-index: 1000;
    }
    .nav-menu.active { right: 0; }
    .player-count-container { display: none; }
    .status-left, .status-right { display: none; }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-medium); }
::-webkit-scrollbar-thumb { background: var(--accent-secondary); border-radius: 10px; }

/* === STRONA GŁÓWNA === */
#main-page {
    position: relative;
    z-index: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* HERO SECTION */
.main-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 80px;
    position: relative;
}

.main-hero .hero-content {
    max-width: 800px;
}

.main-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3.2vw, 3rem);
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    min-height: 1.2em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.main-hero .cursor {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.main-hero p {
    font-size: 1.15rem;
    color: var(--light-gray);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--light-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.scroll-hint:hover {
    color: var(--accent-primary);
}

.scroll-hint i {
    font-size: 1.5rem;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

/* === CONTENT CONTAINER === */
.content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 5% 100px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section Card */
.section-card {
    background: rgba(29, 29, 32, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 56, 63, 0.9);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.section-card.highlight {
    border-left: 4px solid var(--accent-primary);
    background: linear-gradient(135deg, rgba(154, 3, 170, 0.1), rgba(29, 29, 32, 0.9));
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    flex-shrink: 0;
}

.section-icon i {
    font-size: 1.8rem;
}

.section-icon.purple-icon {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}
.section-icon.purple-icon i { color: #8b5cf6; }

.section-icon.yellow-icon {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}
.section-icon.yellow-icon i { color: #fbbf24; }

.section-title {
    flex: 1;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin-bottom: 5px;
    display: block;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.section-body {
    padding: 30px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.section-body p {
    font-size: 1.05rem;
}

/* === FEATURES GRID === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-item {
    background: rgba(29, 29, 32, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 56, 63, 0.9);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item .feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid;
}

.feature-item .feature-icon i {
    font-size: 1.4rem;
}

/* Feature colors */
.feature-item.blue { border-left: 3px solid #3b82f6; }
.feature-item.blue:hover { border-color: #3b82f6; }
.feature-item.blue .feature-icon {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}
.feature-item.blue .feature-icon i { color: #3b82f6; }

.feature-item.green { border-left: 3px solid #10b981; }
.feature-item.green:hover { border-color: #10b981; }
.feature-item.green .feature-icon {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}
.feature-item.green .feature-icon i { color: #10b981; }

.feature-item.yellow { border-left: 3px solid #fbbf24; }
.feature-item.yellow:hover { border-color: #fbbf24; }
.feature-item.yellow .feature-icon {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}
.feature-item.yellow .feature-icon i { color: #fbbf24; }

.feature-item.purple { border-left: 3px solid #8b5cf6; }
.feature-item.purple:hover { border-color: #8b5cf6; }
.feature-item.purple .feature-icon {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}
.feature-item.purple .feature-icon i { color: #8b5cf6; }

.feature-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: white;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === TIMELINE === */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-item {
    position: relative;
    padding-left: 25px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-dark);
}

.timeline-item.highlight-item {
    border-left-color: var(--accent-primary);
}

.timeline-item.highlight-item::before {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.timeline-item h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: white;
    margin-bottom: 8px;
}

.timeline-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 40px 5%;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* === POPUP KONTAKTOWY === */
.contact-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.contact-popup.active {
    opacity: 1;
    visibility: visible;
}

.contact-container {
    width: 90%;
    max-width: 550px;
    background: var(--bg-light, #1d1d20);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

.contact-popup.active .contact-container {
    transform: scale(1);
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.contact-header h2 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-heading);
}

.contact-header h2 i {
    color: var(--accent-primary);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px;
}

.close-btn:hover {
    color: white;
    transform: rotate(90deg);
}

.contact-intro {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
}

.contact-method {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 10px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.contact-icon.ticket {
    background: #5865F2;
    color: white;
}

.contact-info h3 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.contact-link:hover {
    transform: scale(1.05);
    background: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(154, 3, 170, 0.5);
}

.contact-link i {
    transition: transform 0.3s ease;
}

.contact-link:hover i {
    transform: translateX(3px);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .main-hero h1 {
        font-size: 2rem;
    }
    
    .main-hero p {
        font-size: 1rem;
    }
    
    .content-container {
        padding: 40px 4% 80px;
        gap: 25px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .section-body {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-container {
        padding: 30px 20px;
    }
    
    .contact-header h2 {
        font-size: 1.5rem;
    }
}

/* ============================================================
   OGRANICZONE ANIMACJE
   Szanujemy systemowe ustawienie "ogranicz ruch" (Windows/iOS/Android).
   Wylacza nieskonczone petle (pulse, livePulse, soonDot, bounce, blink),
   ktore inaczej non-stop budza kompozytor.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
