/* بودكاست قضية — قسم القصص الصوتية */

html.qpodcast-html,
body.qpodcast-body {
    margin: 0;
    padding: 0;
    background: #0c0c14;
    color: #e8e8f0;
    font-family: 'Tajawal', system-ui, sans-serif;
    min-height: 100%;
}

.qpodcast {
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Hero */
.qpodcast-hero {
    position: relative;
    padding: 48px 20px 36px;
    overflow: hidden;
    text-align: center;
}

.qpodcast-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(139, 92, 246, 0.35), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(236, 72, 153, 0.15), transparent),
        linear-gradient(180deg, #12121f 0%, #0c0c14 100%);
    z-index: 0;
}

.qpodcast-hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}

.qpodcast-back {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.qpodcast-back:hover {
    color: #fff;
}

.qpodcast-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(167, 139, 250, 0.4);
    font-size: 13px;
    font-weight: 600;
    color: #c4b5fd;
    margin-bottom: 12px;
}

.qpodcast-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 6vw, 42px);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qpodcast-subtitle {
    margin: 0 auto 20px;
    max-width: 520px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}

.qpodcast-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.qpodcast-stat {
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.qpodcast-stat strong {
    color: #a78bfa;
}

/* Main */
.qpodcast-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.qpodcast-toolbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qpodcast-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.qpodcast-toolbar-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

/* Loader / empty */
.qpodcast-loader,
.qpodcast-empty {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.qpodcast-loader-ring {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    border: 3px solid rgba(167, 139, 250, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: qpodcast-spin 0.8s linear infinite;
}

@keyframes qpodcast-spin {
    to { transform: rotate(360deg); }
}

.qpodcast-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.qpodcast-empty h3 {
    margin: 0 0 8px;
    color: #fff;
}

.qpodcast-empty a {
    color: #a78bfa;
}

/* Grid */
.qpodcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.qpodcast-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(30, 30, 48, 0.95), rgba(18, 18, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: right;
}

.qpodcast-card:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.qpodcast-card.is-playing {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.5), 0 12px 32px rgba(139, 92, 246, 0.2);
}

.qpodcast-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1a1a2e;
    overflow: hidden;
}

.qpodcast-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qpodcast-card-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
}

.qpodcast-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 42px;
}

.qpodcast-card:hover .qpodcast-card-play,
.qpodcast-card.is-playing .qpodcast-card-play {
    opacity: 1;
}

.qpodcast-card-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.75);
    font-size: 12px;
    font-weight: 600;
}

.qpodcast-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qpodcast-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.qpodcast-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
}

.qpodcast-card-excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.58);
    flex: 1;
}

.qpodcast-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.qpodcast-card-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.qpodcast-card-btn--play {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
}

.qpodcast-card-btn--full {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.qpodcast-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.qpodcast-more-btn {
    padding: 12px 28px;
    border-radius: 999px;
    border: 1px solid rgba(167, 139, 250, 0.5);
    background: transparent;
    color: #c4b5fd;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.qpodcast-more-btn:hover {
    background: rgba(139, 92, 246, 0.15);
}

/* Sticky player */
.qpodcast-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(12, 12, 20, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.qpodcast-player.is-visible {
    transform: translateY(0);
}

.qpodcast-player-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.qpodcast-player-art {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    overflow: hidden;
}

.qpodcast-player-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qpodcast-player-meta {
    flex: 1;
    min-width: 0;
}

.qpodcast-player-title {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qpodcast-player-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.qpodcast-player-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.qpodcast-ctrl {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qpodcast-ctrl-play {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    font-size: 18px;
}

.qpodcast-player-full {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8e8f0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.qpodcast-player-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.qpodcast-player-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    transition: width 0.1s linear;
}

@media (max-width: 600px) {
    .qpodcast-player-full {
        display: none;
    }

    .qpodcast-grid {
        grid-template-columns: 1fr;
    }
}
