/* ═══════════════════════════════════════════════════════════════
   HERO SECTION - Purple Theme with Lightning
   ═══════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 10%,
        rgba(76, 29, 149, 0.2) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* Title with Lightning */
.title-container {
    position: relative;
    display: inline-block;
    padding: 80px 120px;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.hero-title.minecraft {
    font-size: clamp(1.2rem, 4vw, 3rem);
    letter-spacing: 0.15em;
    color: var(--white);
    position: relative;
    z-index: 10;
    
    /* 3D Text Effect */
    text-shadow: 
        /* Główna poświata */
        0 0 10px var(--purple-light),
        0 0 20px var(--purple),
        0 0 40px var(--purple),
        /* 3D głębia - warstwy */
        1px 1px 0 rgba(100, 50, 150, 0.8),
        2px 2px 0 rgba(90, 45, 140, 0.7),
        3px 3px 0 rgba(80, 40, 130, 0.6),
        4px 4px 0 rgba(70, 35, 120, 0.5),
        5px 5px 0 rgba(60, 30, 110, 0.4),
        6px 6px 0 rgba(50, 25, 100, 0.3),
        /* Cień pod 3D */
        8px 8px 15px rgba(0, 0, 0, 0.5);
    
    /* 3D transform */
    transform-style: preserve-3d;
    perspective: 500px;
    animation: title3DFloat 4s ease-in-out infinite, titlePulse3D 2s ease-in-out infinite;
}

@keyframes title3DFloat {
    0%, 100% {
        transform: rotateX(5deg) rotateY(-2deg) translateZ(0);
    }
    25% {
        transform: rotateX(3deg) rotateY(2deg) translateZ(10px);
    }
    50% {
        transform: rotateX(-3deg) rotateY(3deg) translateZ(5px);
    }
    75% {
        transform: rotateX(2deg) rotateY(-3deg) translateZ(8px);
    }
}

@keyframes titlePulse3D {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--purple-light),
            0 0 20px var(--purple),
            0 0 40px var(--purple),
            1px 1px 0 rgba(100, 50, 150, 0.8),
            2px 2px 0 rgba(90, 45, 140, 0.7),
            3px 3px 0 rgba(80, 40, 130, 0.6),
            4px 4px 0 rgba(70, 35, 120, 0.5),
            5px 5px 0 rgba(60, 30, 110, 0.4),
            6px 6px 0 rgba(50, 25, 100, 0.3),
            8px 8px 15px rgba(0, 0, 0, 0.5);
        filter: brightness(1);
    }
    50% {
        text-shadow: 
            0 0 20px #fff,
            0 0 40px var(--purple-light),
            0 0 60px var(--purple),
            0 0 80px var(--purple-electric),
            1px 1px 0 rgba(140, 80, 200, 0.9),
            2px 2px 0 rgba(130, 70, 190, 0.8),
            3px 3px 0 rgba(120, 60, 180, 0.7),
            4px 4px 0 rgba(110, 50, 170, 0.6),
            5px 5px 0 rgba(100, 40, 160, 0.5),
            6px 6px 0 rgba(90, 30, 150, 0.4),
            10px 10px 20px rgba(0, 0, 0, 0.6);
        filter: brightness(1.2);
    }
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    background: radial-gradient(ellipse, var(--purple-glow) 0%, transparent 70%);
    filter: blur(50px);
    opacity: 0.5;
    animation: glowPulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.15); }
}

/* Lightning Effects */
.lightning {
    position: absolute;
    width: 50px;
    height: 120px;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
}

.lightning .bolt {
    fill: var(--purple-electric);
    filter: drop-shadow(0 0 8px var(--purple)) drop-shadow(0 0 15px var(--purple-light));
}

.lightning-1 {
    top: -30px;
    left: 0;
    animation: flash1 3s ease-in-out infinite;
}

.lightning-2 {
    top: -20px;
    right: 0;
    transform: scaleX(-1);
    animation: flash2 3s ease-in-out infinite 0.8s;
}

.lightning-3 {
    bottom: -20px;
    left: 20px;
    transform: rotate(25deg);
    animation: flash3 3s ease-in-out infinite 1.5s;
}

.lightning-4 {
    bottom: -30px;
    right: 20px;
    transform: scaleX(-1) rotate(-25deg);
    animation: flash4 3s ease-in-out infinite 2.2s;
}

@keyframes flash1 {
    0%, 85%, 100% { opacity: 0; }
    86%, 88%, 90% { opacity: 1; }
    87%, 89% { opacity: 0.4; }
}

@keyframes flash2 {
    0%, 75%, 100% { opacity: 0; }
    76%, 78%, 80% { opacity: 1; }
    77%, 79% { opacity: 0.4; }
}

@keyframes flash3 {
    0%, 65%, 100% { opacity: 0; }
    66%, 68%, 70% { opacity: 1; }
    67%, 69% { opacity: 0.4; }
}

@keyframes flash4 {
    0%, 55%, 100% { opacity: 0; }
    56%, 58%, 60% { opacity: 1; }
    57%, 59% { opacity: 0.4; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 0.6s ease 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-indicator span {
    width: 8px;
    height: 8px;
    background: var(--purple);
    border-radius: 50%;
    animation: scrollBounce 1.5s ease-in-out infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: 0.15s;
    opacity: 0.6;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: 0.3s;
    opacity: 0.3;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .title-container {
        padding: 40px 60px;
    }
    
    .hero-title.minecraft {
        font-size: clamp(1rem, 5vw, 2rem);
    }
    
    .lightning {
        width: 30px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .title-container {
        padding: 30px 40px;
    }
    
    .hero-title.minecraft {
        font-size: 0.9rem;
    }
    
    .lightning {
        width: 25px;
        height: 60px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MARQUEE BANNER
   ═══════════════════════════════════════════════════════════════ */

.marquee-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Bazowe przezroczyste tło */
    background: transparent;
    color: var(--white);
    padding: 11px 0;
    z-index: 10000;
    overflow: hidden;
    box-shadow: none;
    border-bottom: none;
}

/* Pseudo-element dla animowanego tła */
.marquee-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
    /* Domyślnie widoczne (po scrollu) - animacja od góry */
    transform: translateY(0%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Na górze strony - tło chowa się do góry */
.marquee-banner.scrolled::before {
    transform: translateY(-100%);
}

/* Gradient overlay dla stanu scrolled - zawsze widoczny u góry */
.marquee-banner.scrolled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.45) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: -1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Gdy nie scrolled - ukryj gradient */
.marquee-banner:not(.scrolled)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -2;
    opacity: 0;
}


@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shimmerGlow {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

@keyframes shimmerGlow2 {
    0% { left: -80%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

.marquee-track {
    display: flex;
    animation: marqueeScroll 30s linear infinite;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    background: none !important;
    background-color: transparent !important;
}

.marquee-track span {
    font-family: var(--font-minecraft);
    font-size: 0.65rem;
    letter-spacing: 2px;
    padding-right: 50px;
    /* Efekt starego telewizora CRT - rozwarstwianie kolorów RGB */
    text-shadow: 
        /* Czerwony kanał - przesunięty w lewo */
        -2px 0 0 rgba(255, 0, 0, 0.6),
        /* Zielony kanał - centralny */
        0 0 0 rgba(0, 255, 0, 0.5),
        /* Niebieski kanał - przesunięty w prawo */
        2px 0 0 rgba(0, 100, 255, 0.6),
        /* Dodatkowa poświata */
        0 0 10px rgba(255, 255, 255, 0.3);
    animation: crtGlitch 0.15s infinite;
}

/* Animacja glitchu CRT */
@keyframes crtGlitch {
    0%, 100% {
        text-shadow: 
            -2px 0 0 rgba(255, 0, 0, 0.6),
            0 0 0 rgba(0, 255, 0, 0.5),
            2px 0 0 rgba(0, 100, 255, 0.6),
            0 0 10px rgba(255, 255, 255, 0.3);
    }
    25% {
        text-shadow: 
            -1px 1px 0 rgba(255, 0, 0, 0.7),
            1px 0 0 rgba(0, 255, 0, 0.5),
            2px -1px 0 rgba(0, 100, 255, 0.7),
            0 0 8px rgba(255, 255, 255, 0.4);
    }
    50% {
        text-shadow: 
            -3px 0 0 rgba(255, 0, 0, 0.5),
            0 1px 0 rgba(0, 255, 0, 0.6),
            3px 0 0 rgba(0, 100, 255, 0.5),
            0 0 12px rgba(255, 255, 255, 0.3);
    }
    75% {
        text-shadow: 
            -2px -1px 0 rgba(255, 0, 0, 0.6),
            -1px 0 0 rgba(0, 255, 0, 0.5),
            1px 1px 0 rgba(0, 100, 255, 0.7),
            0 0 6px rgba(255, 255, 255, 0.5);
    }
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Shimmer effect on banner */
.marquee-banner .shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 100%
    );
    animation: shimmerMove 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes shimmerMove {
    0% { left: -100%; }
    100% { left: 200%; }
}

.marquee-banner + .header {
    top: 38px;
    margin-top: -3px;
}

body.has-marquee .header {
    top: 38px;
    margin-top: -3px;
}

body.has-marquee .hero {
    /* Hero zaczyna się od góry - marquee jest fixed nad nim */
    margin-top: 0;
    padding-top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   ROTATING HEADLINE
   ═══════════════════════════════════════════════════════════════ */

.hero-title.minecraft {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-title.minecraft.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.hero-title.minecraft.fade-in {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 768px) {
    .marquee-track span {
        font-size: 0.5rem;
    }
    
    .marquee-track {
        animation-duration: 20s;
    }
    
    .marquee-banner {
        padding: 8px 0;
    }
    
    body.has-marquee .header {
        top: 28px;
    }
    
}
