:root {
    --player-bg: #ffffff;
    --player-accent: #014709;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 1. Main Container */
.podcast-player {
    display: block;
    margin: 0 auto !important;
    max-width: 500px; /* Mobil-Standard */
    background: var(--player-bg);
    color: var(--text-main);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: max-width 0.4s ease;
}

.podcast-title {
    margin-bottom: 25px;
    color: var(--player-accent);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

    /* 2. Desktop Grid (ab 768px) */
    @media (min-width: 768px) {

        .podcast-player {
            max-width: 1400px;
            display: grid;
            grid-template-columns: 320px 1fr;
            grid-template-rows: auto auto auto;
            gap: 2rem;
            align-items: start;
        }

        .podcast-title {
            grid-column: 1 ;
            grid-row: 1;
            margin-bottom: 0 !important;
        }

        .now-playing {
            grid-column: 1;
            grid-row: 2;
            margin-bottom: 0 !important;
        }

        .progress-container {
            grid-column: 1;
            grid-row: 3;
            margin: 0 !important;
        }

        .controls-main {
            grid-column: 1;
            grid-row: 4;
            margin-bottom: 0 !important;
        }

        .podcast-list {
            grid-column: 2;
            grid-row: 2 / span 3;
            height: 100%;
            max-height: 480px !important;
            margin-top: 0 !important;
            border-top: none !important;
            border-left: 1px solid var(--border-color);
            padding-left: 1.5rem;
        }

        .player-socials {
            grid-column: 1 / span 2;
            margin-top: 1rem !important;
        }
    }
    /* 3. Hero Section (Now Playing) */
    .now-playing {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 1.5rem;
    }

        .now-playing img {
            width: 100%;
            max-width: 250px;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            border-radius: 16px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
            margin-bottom: 1.25rem;
            transition: opacity 0.25s ease-in-out, transform 0.3s ease;
            will-change: opacity;
        }

    #pp-title {
        display: block;
        font-size: 1.3rem;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 0.5rem;
        color: var(--player-accent);
    }

    .time {
        font-size: 0.85rem;
        color: var(--text-muted);
        font-variant-numeric: tabular-nums;
    }
    /* 4. Controls & Progress */
    .controls-main {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .play-btn {
        background: var(--player-accent);
        color: white;
        border: none;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        transition: all 0.2s ease;
    }

        .play-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
        }

    .progress-container {
        margin: 1.5rem 0;
    }

    input[type="range"].progress {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 6px;
        background: #e2e8f0;
        border-radius: 8px;
        outline: none;
        cursor: pointer;
        overflow: hidden;
    }

        input[type="range"].progress::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: var(--player-accent);
            border-radius: 50%;
            transition: transform 0.2s;
        }

        input[type="range"].progress:hover::-webkit-slider-thumb {
            transform: scale(1.3);
        }
    /* 5. Playlist Section */
    .podcast-list {
        list-style: none;
        padding: 0;
        margin: 2rem 0 0 0;
        max-height: 250px;
        overflow-y: auto;
        border-top: 1px solid var(--border-color);
        padding-right: 8px;
    }

        .podcast-list li {
            display: grid;
            grid-template-columns: 48px 1fr 50px;
            align-items: center;
            gap: 1rem;
            padding: 0.85rem;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 4px;
        }

            .podcast-list li:hover {
                background: #f8fafc;
            }

            .podcast-list li.playing {
                background: #f1f5f9;
                border-left: 4px solid var(--player-accent);
            }

        .podcast-list img {
            width: 48px;
            height: 48px;
            border-radius: 6px;
            object-fit: cover;
        }

    .episode-title {
        font-size: 0.9rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--text-main);
    }

    .episode-time {
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: right;
    }
    /* 6. Custom Scrollbar */
    .podcast-list::-webkit-scrollbar {
        width: 5px;
    }

    .podcast-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .podcast-list::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 10px;
    }

        .podcast-list::-webkit-scrollbar-thumb:hover {
            background: #cbd5e1;
        }
    /* 7. Social Media Bar */
    .player-socials {
        display: flex;
        justify-content: center;
        gap: 2rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

        .player-socials a {
            color: var(--text-muted);
            font-size: 1.5rem;
            transition: all 0.3s ease;
            text-decoration: none;
        }

            .player-socials a:hover {
                transform: translateY(-3px);
            }

            .player-socials a[title="Apple Podcasts"]:hover {
                color: #a2aaad;
            }

            .player-socials a[title="Spotify"]:hover {
                color: #1DB954;
            }

            .player-socials a[title="Instagram"]:hover {
                color: #E1306C;
            }

    #pp-description {
        display: -webkit-box;
        -webkit-line-clamp: 3; /* Maximal 3 Zeilen anzeigen */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 1.4em; /* Verhindert Springen des Layouts */
        text-align: left;
    }

/* Container für die Beschreibung */
#pp-description {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin; /* Für Firefox */
    scrollbar-color: var(--player-accent) transparent; /* Für Firefox */
}

    /* Scrollbar-Styling für Chrome, Safari und Edge */
    #pp-description::-webkit-scrollbar {
        width: 4px;
    }

    #pp-description::-webkit-scrollbar-track {
        background: transparent;
    }

    #pp-description::-webkit-scrollbar-thumb {
        background-color: var(--player-accent);
        border-radius: 10px;
    }