/* ==============================================
   PODCAST MANAGER — Frontend Styles
   ============================================== */

:root {
    --pm-red: #e4002b;
    --pm-dark: #111111;
    --pm-white: #ffffff;
    --pm-light: #f5f5f5;
    --pm-gray: #888888;
    --pm-border: #e8e8e8;
    --pm-card-radius: 8px;
    --pm-shadow: 0 2px 16px rgba(0,0,0,0.10);
    --pm-shadow-hover: 0 6px 32px rgba(0,0,0,0.16);
    --pm-font: 'Bebas Neue', 'Arial Black', sans-serif;
}

/* ---- GRID ---- */
.pm-grid {
    display: grid;
    gap: 16px;
    width: 100%;
}
.pm-cols-1 { grid-template-columns: 1fr; }
.pm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pm-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
    .pm-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .pm-cols-2, .pm-cols-3 { grid-template-columns: 1fr; }
}

/* ---- CARD ---- */
.pm-card {
    display: flex;
    align-items: stretch;
    background: var(--pm-white);
    border-radius: var(--pm-card-radius);
    box-shadow: var(--pm-shadow);
    text-decoration: none;
    color: var(--pm-dark);
    overflow: hidden;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
    border: 1px solid var(--pm-border);
    min-height: 80px;
}
.pm-card:hover {
    box-shadow: var(--pm-shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--pm-dark);
}

.pm-card-thumb {
    position: relative;
    width: 90px;
    min-width: 90px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}
.pm-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pm-card-no-thumb {
    width: 100%;
    height: 100%;
    background: var(--pm-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pm-white);
    min-height: 80px;
}
.pm-card-no-thumb svg { width: 32px; height: 32px; opacity: 0.7; }

.pm-card-ep-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: var(--pm-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.pm-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.pm-card-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--pm-dark);
}
.pm-card-host {
    font-size: 11px;
    color: var(--pm-red);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pm-card-duration {
    font-size: 11px;
    color: var(--pm-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- SINGLE PODCAST PAGE ---- */
.pm-single-wrap {
    width: 100%;
    max-width: 100%;
}

/* HERO */
.pm-single-hero {
    position: relative;
    padding: 60px 40px 40px;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--pm-dark);
}
.pm-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(8px) scale(1.1);
    opacity: 0.35;
}
.pm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 40%, rgba(0,0,0,0.4) 100%);
}
.pm-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}
.pm-hero-ep {
    display: inline-block;
    background: var(--pm-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    margin-bottom: 12px;
}
.pm-hero-title {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 900;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.pm-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.pm-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.pm-meta-item svg { flex-shrink: 0; }

.pm-like-btn {
    transition: color 0.2s;
}
.pm-like-btn:hover, .pm-like-btn.liked {
    color: var(--pm-red) !important;
}
.pm-like-btn.liked svg { fill: var(--pm-red); stroke: var(--pm-red); }

/* BODY LAYOUT */
.pm-single-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px;
}
@media (max-width: 900px) {
    .pm-single-body { grid-template-columns: 1fr; padding: 24px 20px; }
    .pm-single-hero { padding: 40px 20px 30px; }
}

/* PLAYER */
.pm-player-wrap { margin-bottom: 32px; }
.pm-player {
    background: rgba(255,255,255,0.07);
    border-radius: var(--pm-card-radius);
    box-shadow: 0 2px 20px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,0.12);
}
.pm-player-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--pm-red);
}
.pm-player-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pm-player-controls { flex: 1; min-width: 0; }
.pm-player-info { margin-bottom: 10px; }
.pm-player-title {
    font-weight: 800;
    font-size: 14px;
    display: block;
    letter-spacing: 0.02em;
    color: #ffffff;
}
.pm-player-host {
    font-size: 11px;
    color: var(--pm-red);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pm-player-btn-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pm-play-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--pm-red);
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(228,0,43,0.5);
}
.pm-play-btn:hover {
    background: #c20024;
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(228,0,43,0.7);
}
.pm-play-btn svg {
    width: 16px;
    height: 16px;
    color: #fff;
    fill: #fff;
    display: block;
    flex-shrink: 0;
}

/* Waveform */
.pm-progress-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    height: 40px;
    cursor: pointer;
}
.pm-waveform {
    display: flex;
    align-items: flex-end;
    gap: 1.5px;
    height: 36px;
    pointer-events: none;
}
.pm-wf-bar {
    flex: 1;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    min-width: 2px;
    transition: background 0.1s;
}
.pm-wf-bar.played { background: var(--pm-red); }

.pm-seekbar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.pm-time-display {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.pm-vol-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.pm-vol-wrap svg { color: rgba(255,255,255,0.5); flex-shrink: 0; }
.pm-volume {
    width: 64px;
    accent-color: var(--pm-red);
    cursor: pointer;
}

/* TRACKLIST */
.pm-section-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: var(--pm-dark);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pm-red);
    display: inline-block;
}

.pm-tracklist-wrap {
    background: var(--pm-red);
    border-radius: var(--pm-card-radius);
    padding: 24px 24px 16px;
}
.pm-tracklist-wrap .pm-section-title { color: #fff; border-bottom-color: rgba(255,255,255,0.4); }

.pm-tracklist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pm-track {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    transition: opacity 0.15s;
    color: #fff;
}
.pm-track:last-child { border-bottom: none; }
.pm-track:hover { opacity: 0.8; }
.pm-track.active .pm-track-name { font-weight: 800; }
.pm-track.active .pm-track-num { background: rgba(255,255,255,0.25); }

.pm-track-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}
.pm-track-time {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.65);
    min-width: 58px;
    flex-shrink: 0;
}
.pm-track-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

/* SIDEBAR */
.pm-single-sidebar {}
.pm-sidebar-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--pm-red);
    display: inline-block;
}

.pm-related-list { display: flex; flex-direction: column; gap: 10px; }

.pm-related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.07);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s, transform 0.2s;
}
.pm-related-item:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(3px);
    text-decoration: none;
    color: #ffffff;
}

.pm-related-thumb {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #1a1a1a;
}
.pm-related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm-related-no-thumb { width: 100%; height: 100%; background: var(--pm-red); }
.pm-related-ep {
    position: absolute;
    bottom: 3px;
    left: 3px;
    background: var(--pm-red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
}

.pm-related-info { flex: 1; min-width: 0; }
.pm-related-title {
    font-size: 12px;
    font-weight: 700;
    display: block;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
}
.pm-related-host {
    font-size: 10px;
    color: var(--pm-red);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}
.pm-related-dur {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    display: block;
    margin-top: 2px;
}

.pm-no-posts { text-align: center; padding: 40px; color: var(--pm-gray); }

/* ---- SERIES CARDS ---- */
.pm-series-grid { gap: 20px; }

.pm-series-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.pm-series-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    text-decoration: none;
    color: #ffffff;
}

.pm-series-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #1a1a1a;
}
.pm-series-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.pm-series-card:hover .pm-series-thumb img {
    transform: scale(1.05);
}
.pm-series-no-thumb {
    width: 100%;
    height: 100%;
    background: var(--pm-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    min-height: 160px;
}
.pm-series-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 12px 14px;
}
.pm-series-count {
    background: var(--pm-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
}

.pm-series-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pm-series-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    color: #ffffff;
    line-height: 1.2;
}
.pm-series-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pm-series-link {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pm-red);
    margin-top: 4px;
}

/* Series label on episode card */
.pm-card-series-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    display: block;
    margin-bottom: 2px;
}
