/* ============================================
   PODCAST GALLERY — Cinematic Premium Layout
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.podcast-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    padding: 30px 0 50px;
}

@media (min-width: 768px) {
    .podcast-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 32px;
    }
}

/* Premium Card Design */
.podcast-item {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* Perfect cinematic ratio for portraits/covers */
    cursor: pointer;
    overflow: hidden;
    border-radius: 20px;
    background-color: #1a1a2e; /* Deep rich fallback background */
    background-size: cover;
    background-position: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.05);
}

.podcast-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 20px rgba(102, 126, 234, 0.4);
    z-index: 10;
}

/* Advanced Dark gradient overlay for text legibility */
.podcast-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 40%,
        rgba(0,0,0,0.6) 70%,
        rgba(0,0,0,0.95) 100%
    );
    border-radius: inherit;
    transition: opacity 0.3s ease;
}

.podcast-item:hover .podcast-item-overlay {
    opacity: 0.9;
}

/* Typography & Info */
.podcast-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 20px;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.podcast-item-info h4 {
    margin: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    letter-spacing: 0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Premium Play Button */
.podcast-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.podcast-play-btn i {
    font-size: 20px;
    color: #fff;
    margin-left: 4px; /* Optical center */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.podcast-item:hover .podcast-play-btn {
    background: rgba(255,255,255,0.25);
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
    border-color: rgba(255,255,255,0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 15px rgba(255,255,255,0.2);
}

/* Empty state styling */
.podcast-empty {
    width: 100%;
    text-align: center;
    padding: 100px 20px;
    color: #8c92a0;
    background: #f8f9fa;
    border-radius: 24px;
    border: 2px dashed #e2e8f0;
}
.podcast-empty i { font-size: 56px; margin-bottom: 20px; display: block; color: #cbd5e1; }
.podcast-empty p { font-size: 18px; font-family: 'Outfit', sans-serif; font-weight: 500; }

/* ============================================
   TIKTOK IMMERSIVE PLAYER
   ============================================ */
.tiktok-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.tiktok-modal.active {
    display: flex;
}

/* Close button */
.tiktok-close {
    position: fixed;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 22px;
    cursor: pointer;
    z-index: 100001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    transition: background 0.2s;
}

.tiktok-close:hover { background: rgba(255,59,48,0.7); }

/* Feed scroll container */
.tiktok-feed {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 2;
}

.tiktok-feed::-webkit-scrollbar { display: none; }

/* Individual slide */
.tiktok-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.tiktok-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Bottom gradient for legibility */
.tiktok-slide::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 220px;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    pointer-events: none;
    z-index: 3;
}

/* Text overlay — bottom left */
.tiktok-ui {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 80px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    z-index: 4;
}

.tiktok-ui h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 2px 16px rgba(0,0,0,0.6);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiktok-ui p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 6px rgba(0,0,0,0.7), 0 2px 10px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action buttons — right side */
.tiktok-actions {
    position: absolute;
    bottom: 50px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 4;
}

.tiktok-action-btn {
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    transition: transform 0.2s ease;
}

.tiktok-action-btn:hover { transform: scale(1.15); }

.tiktok-action-btn i {
    font-size: 26px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.tiktok-action-btn .like-count {
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.tiktok-action-btn.liked i { color: #ff3b30; }
.tiktok-action-btn.liked i { 
    animation: likePopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.575);
}

@keyframes likePopIn {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.tiktok-action-btn.next-video-btn {
    margin-top: 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: bounceChevron 2s infinite;
}

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

/* Audio Immersive Visuals */
.audio-vinyl {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 12px solid #111;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.8), inset 0 0 10px rgba(0,0,0,0.5);
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: rotateVinyl 8s linear infinite;
    animation-play-state: paused;
}
.audio-vinyl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}
@keyframes rotateVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Play/Pause Indicator */
.play-pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.tiktok-slide.show-indicator .play-pause-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Desktop: center video nicely */
@media (min-width: 768px) {
    .tiktok-modal { background: #0a0a0a; }
    .tiktok-feed { box-shadow: 0 0 80px rgba(0,0,0,0.8); }
}
