/* =========================
   CAROUSEL SCÉNA
========================= */

.carousel-title-text {
    position: absolute; 
    top: 22%; 
    left: 50%; 
    transform: translateX(-50%);
    color: var(--primary); 
    font-size: 1.5rem; 
    font-weight: bold; 
    z-index: 25;
    background: rgba(0, 0, 0, 0.3); 
    padding: 5px 15px; 
    border: 1px solid rgba(0, 255, 255, 0.3);
    text-align: center;
}

.carousel-scene {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    width: 200px; 
    height: 150px; 
    perspective: 1000px; 
    z-index: 5;
}

.carousel { 
    width: 100%; 
    height: 100%; 
    position: absolute; 
    transform-style: preserve-3d; 
}

.carousel-item { 
    position: absolute; 
    width: 190px; 
    height: 140px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.card-content {
    width: 100%; 
    height: 100%; 
    background: rgba(0, 20, 30, 0.8); 
    border: 1px solid var(--primary);
    color: var(--primary); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    font-size: 0.9rem; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s;
    touch-action: manipulation;
}

.hit-img { 
    width: 60px; 
    height: 60px; 
    margin-bottom: 5px; 
    border-radius: 50%; 
    border: 2px solid var(--primary); 
    object-fit: cover; 
}

/* =========================
   MODALY A GALERIE
========================= */

.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: var(--bg-overlay); 
    z-index: 5000; 
    justify-content: center; 
    align-items: center;
    padding: 10px; /* Padding pro mobil */
}

.modal-content { 
    background: rgba(0, 10, 20, 0.95); 
    border: 1px solid var(--primary); 
    padding: 40px; 
    position: relative; 
    color: white;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    max-width: 600px; /* Menší default pro lepší čitelnost */
}

.modal-large-size { 
    width: 95%; 
    max-width: 1100px; 
    max-height: 90vh;
}

/* Speciální pro rádio iframe */
#radioModal .modal-content {
    padding: 20px;
    width: 95%;
    max-width: 1000px;
}

#radioModal iframe {
    width: 100%;
    height: 70vh;
    border: none;
    min-height: 400px; /* Minimální výška */
}

.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px; 
    padding: 20px; 
}

.gallery-item { 
    position: relative; 
    border: 1px solid rgba(0,255,255,0.2); 
    aspect-ratio: 1/1; 
    overflow: hidden; 
    cursor: pointer;
    touch-action: manipulation;
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* =========================
   DETAIL PROMPTU
========================= */

.prompt-detail-container { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    align-items: center; 
    padding: 10px; 
}

.prompt-image-large { 
    max-width: 120px; 
    max-height: 120px; 
    border: 1px solid var(--primary); 
    border-radius: 4px; 
    object-fit: cover; 
    box-shadow: 0 0 10px var(--primary-glow); 
}

.prompt-text-box {
    background: rgba(0, 0, 0, 0.9); 
    border: 2px solid var(--primary); 
    padding: 20px; 
    width: 100%;
    font-family: 'Courier New', monospace; 
    color: var(--primary); 
    white-space: pre-wrap;
    font-size: 0.9rem; 
    line-height: 1.4; 
    box-shadow: inset 0 0 15px var(--primary-glow);
    min-height: 150px; 
    max-height: 300px; 
    overflow-y: auto; 
    text-align: left;
    word-break: break-word; /* Zalomení dlouhých slov */
}

.close-btn {
    position: absolute; 
    top: 10px; 
    right: 15px; 
    color: var(--primary);
    font-size: 40px; 
    cursor: pointer; 
    line-height: 1; 
    z-index: 100;
    width: 44px; /* Touch-friendly */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* =========================
   📱 RESPONSIVE FINISH
========================= */

@media screen and (max-width: 768px) {
    /* Carousel - menší na mobilu */
    .carousel-scene {
        position: relative;
        top: 0; 
        left: 0; 
        transform: none;
        margin: 30px auto;
        width: 150px; /* Menší */
        height: 120px;
        perspective: 800px;
    }

    .carousel-item {
        width: 140px; /* Menší kartičky */
        height: 110px;
    }

    .card-content {
        font-size: 0.8rem;
    }

    .hit-img {
        width: 40px;
        height: 40px;
    }

    /* SCHOVÁNO NA MOBILU - TOP okénko */
    .carousel-title-text {
        display: none;
    }

    /* Modaly */
    .modal-content {
        width: 95% !important;
        margin: 10px auto;
        padding: 20px !important;
        max-height: 95vh;
    }

    .modal-large-size {
        width: 98% !important;
        padding: 15px !important;
    }

    #radioModal iframe {
        height: 60vh; /* Menší výška na mobilu */
        min-height: 300px;
    }

    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
        padding: 10px;
    }

    /* Zvětšení zavíracího tlačítka */
    .close-btn {
        top: 5px; 
        right: 5px; 
        font-size: 36px;
        width: 48px;
        height: 48px;
    }

    .prompt-text-box {
        font-size: 0.85rem;
        padding: 15px;
        max-height: 250px;
    }
}

/* Malé mobily */
@media screen and (max-width: 380px) {
    .carousel-scene {
        width: 130px;
        height: 100px;
    }
    
    .carousel-item {
        width: 120px;
        height: 90px;
    }
    
    .modal-content {
        padding: 15px !important;
    }
}
