
/* General Styles */
#podcast-section {
    position: relative;
}

/* Podcast Player Styles */
.podcast-player {
    position: relative;
    background: rgba(30, 27, 75, 0.9);
    backdrop-filter: blur(10px);
    overflow: hidden;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    touch-action: pan-y; /* Allows vertical scrolling */
    will-change: transform, box-shadow; /* Optimizes performance */
}

/* Hover Effect */
.podcast-player:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    transform: scale(1.02);
    z-index: 20;
}

/* Blob Decorations */
.blob-container {
    position: absolute;
    inset: 0;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    mix-blend-mode: screen;
    transition: transform 0.8s cubic-bezier(0.5, 0.8, 0.5, 1);
    will-change: transform; /* Optimizes performance */
}

/* Blob Styles */
.blob-1 {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.8), rgba(99, 102, 241, 0.4));
    width: 300px;
    height: 300px;
    left: -100px;
    top: -100px;
}

.blob-2 {
    background: radial-gradient(circle, rgba(167, 139, 250, 0.8), rgba(167, 139, 250, 0.4));
    width: 250px;
    height: 250px;
    right: -50px;
    bottom: -50px;
}

.blob-3 {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8), rgba(139, 92, 246, 0.4));
    width: 200px;
    height: 200px;
    right: 100px;
    top: 50px;
}

.blob-4 {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.8), rgba(236, 72, 153, 0.4));
    width: 180px;
    height: 180px;
    left: 50px;
    bottom: 50px;
}

/* Player Container using CSS Grid */
.player-container {
    display: grid;
    grid-template-areas: 'content';
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
    height: 100%;
    width: 100%;
    z-index: 2;
}

.cover-screen,
.player-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: inherit;
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: 100%;
    height: 100%;
    position: relative;
    will-change: opacity, transform; /* Optimizes performance */
}

/* Visibility Control */
.cover-screen {
    opacity: 1;
    z-index: 2;
}

.cover-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    z-index: 1;
}

.player-content {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
    z-index: 1;
}

.player-content.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 2;
}

/* Cover Title and Author */
.cover-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.cover-author {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Cover Play Button */
.cover-play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

.cover-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

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

/* Player Content Styles */
.player-content {
    padding: 20px;
    position: relative;
}

.podcast-info {
    text-align: center;
    margin-top: 10px;
}

.podcast-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.podcast-author {
    font-size: 14px;
    opacity: 0.8;
    transition: color 0.3s ease;
}

/* Titles and Authors Styling */
.cover-title, .cover-author, .podcast-title, .podcast-author {
    color: white;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Pseudo-element for Blend Mode Effect */
.cover-title::after,
.cover-author::after,
.podcast-title::after,
.podcast-author::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: inherit;
    mix-blend-mode: soft-light; /* Try 'overlay', 'screen', 'multiply' if needed */
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.7);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    will-change: background, transform; /* Optimizes performance */
}

.control-btn:hover {
    background: rgba(99, 102, 241, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Share Button Specific Styles */
#shareBtn {
    /* Inherit styles from control-btn */
    background: rgba(79, 70, 229, 0.7);
    padding: 0.75rem;
    display: none; /* Hidden by default */
}

#shareBtn:hover {
    background: rgba(99, 102, 241, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Play Button Larger */
#playBtn {
    width: 80px;
    height: 80px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    padding: 0 40px;
    margin-bottom: 20px;
}

.progress-bar-podcast {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: height 0.2s ease;
}

.progress-bar-podcast:hover {
    height: 6px;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.progress-handle {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.progress-bar-podcast:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1);
}

.progress-handle:hover {
    transform: translate(-50%, -50%) scale(1.2) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.7);
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: 'Arial', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 8px;
    text-transform: uppercase;
}

/* Responsive Design */
@media (max-width: 1023px) {
    .podcast-player {
        min-height: 400px;
    }

    .cover-play-btn {
        width: 60px;
        height: 60px;
    }

    .cover-title {
        font-size: 20px;
    }

    .cover-author {
        font-size: 14px;
    }

    .control-btn {
        width: 50px;
        height: 50px;
    }

    #playBtn {
        width: 70px;
        height: 70px;
    }

    .podcast-title {
        font-size: 20px;
    }

    .podcast-author {
        font-size: 12px;
    }

    .progress-container {
        padding: 0 30px;
    }

    /* Show Share Button on Tablets and Up */
    @media (min-width: 641px) {
        #shareBtn {
            display: flex;
        }
    }
}

@media (max-width: 640px) {
    .podcast-player {
        min-height: 350px;
    }

    .cover-title {
        font-size: 22px; /* Increased from 18px */
    }

    .cover-author {
        font-size: 14px; /* Increased from 12px */
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    #playBtn {
        width: 60px;
        height: 60px;
    }

    .podcast-title {
        font-size: 22px; /* Increased from 18px */
    }

    .podcast-author {
        font-size: 14px; /* Increased from 12px */
    }

    .progress-container {
        padding: 0 20px;
    }

    /* Hide Share Button on Mobile */
    #shareBtn {
        display: none;
    }
}

/* Additional Styles */

/* Animate bullet point icons */
.podcast-section ul li svg {
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.podcast-section ul li:hover svg {
    transform: scale(1.2);
    stroke: #a855f7; /* Changed to a more vibrant color */
}

/* Focus Styles for Accessibility */
.control-btn:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}
