/* HERO SECTION STYLES */

/* HERO SECTION */
.hero-section {
    min-height: 100vh;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 20px 60px;
    overflow: hidden;
}

/* =============================================
   DYNAMIC BACKGROUND (iOS Lock Screen Style)
   ============================================= */

/* Kontener dla dynamicznego tła */
.hero-dynamic-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

/* Warstwa gradientu (animowana) */
.hero-dynamic-bg-layer {
    position: absolute;
    inset: 0;
    transition: opacity 1s ease-in-out;
}

/* Fallback gdy JS nie załaduje tła */
.hero-dynamic-bg:empty::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, rgba(255,68,0,0.15) 0%, transparent 60%);
}

/* Overlay z gradientem (zawsze widoczny) */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: 
        /* Górna krawędź - ciemniejsza dla headera */
        linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 20%),
        /* Dolna krawędź */
        linear-gradient(0deg, rgba(0,0,0,0.4) 0%, transparent 30%),
        /* Winieta po bokach */
        radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* Content - najwyższy z-index */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 1000px;
}

/* Dodatkowy efekt "świecenia" pod centralną okładką */
.carousel-slide[data-pos="0"]::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    z-index: -1;
    transition: opacity 0.5s ease;
}

.hero-section:has(.hero-dynamic-bg-layer) .carousel-slide[data-pos="0"]::before {
}

.track-info-main {
    margin-bottom: 25px;
    margin-top: -15px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-button {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(255, 68, 0, 0);
    }
}

.current-track-title {
    font-size: clamp(20px, 3.5vw, 28px);
    font-weight: 900;
    color: var(--text-white);
    line-height: 1.2;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.current-track-artist {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-gray);
    font-weight: 500;
}

/* CAROUSEL */
.carousel-container {
    width: 100%;
    padding: 0 0 10px;
    overflow: visible;
    margin-bottom: 0;
}

.carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 412px;
}

.carousel-slide {
    position: absolute;
    border-radius: 12px;
    background: var(--bg-card) no-repeat center center;
    background-size: cover;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Info pod okładką */
.carousel-slide-info {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 150%;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.carousel-slide:hover .carousel-slide-info {
    opacity: 1;
}

.carousel-slide-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.carousel-slide-artist {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-gray);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Central slide - bez tekstu (główny tytuł jest osobno) */
.carousel-slide[data-pos="0"] {
    width: 350px;
    height: 350px;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-slide[data-pos="0"] .carousel-slide-info {
    display: none;
}

/* Left slides - history */
.carousel-slide[data-pos="-1"] {
    width: 238px;
    height: 238px;
    z-index: 9;
    left: 50%;
    transform: translateX(calc(-50% - 263px));
}

.carousel-slide[data-pos="-1"] .carousel-slide-info {
    bottom: -40px;
}

.carousel-slide[data-pos="-1"] .carousel-slide-title {
    font-size: 12px;
}

.carousel-slide[data-pos="-1"] .carousel-slide-artist {
    font-size: 10px;
}

.carousel-slide[data-pos="-2"] {
    width: 175px;
    height: 175px;
    z-index: 8;
    left: 50%;
    transform: translateX(calc(-50% - 425px));
}

.carousel-slide[data-pos="-2"] .carousel-slide-info {
    bottom: -35px;
}

.carousel-slide[data-pos="-2"] .carousel-slide-title {
    font-size: 10px;
}

.carousel-slide[data-pos="-2"] .carousel-slide-artist {
    font-size: 9px;
}

.carousel-slide[data-pos="-3"] {
    width: 125px;
    height: 125px;
    z-index: 7;
    left: 50%;
    transform: translateX(calc(-50% - 538px));
}

.carousel-slide[data-pos="-3"] .carousel-slide-info {
    display: none; /* Zbyt małe dla tekstu */
}

/* Right slides - queue */
.carousel-slide[data-pos="1"] {
    width: 238px;
    height: 238px;
    z-index: 9;
    left: 50%;
    transform: translateX(calc(-50% + 263px));
}

.carousel-slide[data-pos="1"] .carousel-slide-info {
    bottom: -40px;
}

.carousel-slide[data-pos="1"] .carousel-slide-title {
    font-size: 12px;
}

.carousel-slide[data-pos="1"] .carousel-slide-artist {
    font-size: 10px;
}

.carousel-slide[data-pos="2"] {
    width: 175px;
    height: 175px;
    z-index: 8;
    left: 50%;
    transform: translateX(calc(-50% + 425px));
}

.carousel-slide[data-pos="2"] .carousel-slide-info {
    bottom: -35px;
}

.carousel-slide[data-pos="2"] .carousel-slide-title {
    font-size: 10px;
}

.carousel-slide[data-pos="2"] .carousel-slide-artist {
    font-size: 9px;
}

.carousel-slide[data-pos="3"] {
    width: 125px;
    height: 125px;
    z-index: 7;
    left: 50%;
    transform: translateX(calc(-50% + 538px));
}

.carousel-slide[data-pos="3"] .carousel-slide-info {
    display: none; /* Zbyt małe dla tekstu */
}

/* Play Button Hero */
.play-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse-button 2s ease-in-out infinite;
}

.play-btn-hero:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,68,0,0.4);
    animation: none;
}

.play-btn-hero i {
    font-size: 18px;
}

/* RESPONSIVE - TABLET */
@media (max-width: 1024px) {
    .carousel-slide[data-pos="-3"],
    .carousel-slide[data-pos="3"] {
        display: none;
    }
    
    /* Chowaj tekst na poziomie -2 i 2 na tabletach (za małe) */
    .carousel-slide[data-pos="-2"] .carousel-slide-info,
    .carousel-slide[data-pos="2"] .carousel-slide-info {
        display: none;
    }
}

/* RESPONSIVE - MOBILE */
@media (max-width: 768px) {
    .hero-section {
        padding: 0 20px 40px;
    }
    
    .carousel-container {
        padding: 20px 0 0;
        margin-bottom: 0;
    }
    
    .track-info-main {
        margin-top: 8px;
        margin-bottom: 55px;
    }
    
    .current-track-title {
        font-size: clamp(28px, 6vw, 42px);
        margin-bottom: 4px;
    }
    
    .current-track-artist {
        font-size: clamp(18px, 3.5vw, 26px);
    }
    
    .carousel-track {
        height: 340px;
    }
    
    /* Centralna - duża, na wierzchu */
    .carousel-slide[data-pos="0"] {
        width: 300px;
        height: 300px;
        z-index: 10;
    }
    
    /* Boczne - mniejsze, częściowo pod centralną */
    .carousel-slide[data-pos="-1"],
    .carousel-slide[data-pos="1"] {
        width: 180px;
        height: 180px;
        z-index: 5;
    }
    
    .carousel-slide[data-pos="-1"] {
        transform: translateX(calc(-50% - 130px));
    }
    
    .carousel-slide[data-pos="1"] {
        transform: translateX(calc(-50% + 130px));
    }
    
    /* Ukryj teksty pod bocznymi okładkami na mobile */
    .carousel-slide[data-pos="-1"] .carousel-slide-info,
    .carousel-slide[data-pos="1"] .carousel-slide-info {
        display: none;
    }
    
    .carousel-slide[data-pos="-2"],
    .carousel-slide[data-pos="2"],
    .carousel-slide[data-pos="-3"],
    .carousel-slide[data-pos="3"] {
        display: none;
    }
    
    .play-btn-hero {
        padding: 20px 45px;
        font-size: 17px;
        animation: pulse-button 2s ease-in-out infinite;
    }
}

/* RESPONSIVE - SMALL MOBILE */
@media (max-width: 480px) {
    .hero-section {
        padding: 0 15px 35px;
    }
    
    .carousel-container {
        padding: 15px 0 0;
    }
    
    .track-info-main {
        margin-top: 8px;
        margin-bottom: 50px;
    }
    
    .current-track-title {
        font-size: clamp(26px, 6vw, 38px);
        margin-bottom: 4px;
    }
    
    .current-track-artist {
        font-size: clamp(17px, 3.5vw, 24px);
    }
    
    .carousel-track {
        height: 280px;
    }
    
    /* Centralna - duża, na wierzchu */
    .carousel-slide[data-pos="0"] {
        width: 240px;
        height: 240px;
        z-index: 10;
    }
    
    /* Boczne - mniejsze, częściowo pod centralną */
    .carousel-slide[data-pos="-1"],
    .carousel-slide[data-pos="1"] {
        width: 140px;
        height: 140px;
        z-index: 5;
    }
    
    .carousel-slide[data-pos="-1"] {
        transform: translateX(calc(-50% - 100px));
    }
    
    .carousel-slide[data-pos="1"] {
        transform: translateX(calc(-50% + 100px));
    }
    
    /* Ukryj teksty pod bocznymi okładkami na small mobile */
    .carousel-slide[data-pos="-1"] .carousel-slide-info,
    .carousel-slide[data-pos="1"] .carousel-slide-info {
        display: none;
    }
    
    .play-btn-hero {
        padding: 18px 40px;
        font-size: 16px;
    }
}

/* Hidden elements for playlist.js data */
#playlistDataContainer {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.hero-track-list {
    display: none;
}