/* پلیر پادکست فارسی - تم آبی سازمانی #13297E */

:root {
    --ppp-primary: #13297E;
    --ppp-primary-light: #2a4a9e;
    --ppp-primary-dark: #0d1d5a;
    --ppp-accent: #3d5aae;
    --ppp-gold: #c9a227;
    --ppp-gradient: linear-gradient(135deg, #13297E 0%, #0d1d5a 100%);
    --ppp-gradient-glow: linear-gradient(135deg, #1a3499 0%, #13297E 50%, #0d1d5a 100%);
    --ppp-glass: rgba(19,41,126,0.06);
    --ppp-shadow: 0 25px 80px rgba(19,41,126,0.25);
}

/* آیکون شناور */
#ppp-floating-icon {
    position: fixed;
    width: 64px;
    height: 64px;
    background: var(--ppp-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(19,41,126,0.5);
    z-index: 99999;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ppp-floating-icon:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 18px 50px rgba(19,41,126,0.6);
}

#ppp-floating-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    animation: ppp-icon-pulse 2.5s ease-in-out infinite;
}

@keyframes ppp-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.08); opacity: 0; }
}

/* مودال */
#ppp-modal {
    position: fixed;
    inset: 0;
    background: rgba(19,41,126,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(18px);
}

#ppp-modal.open {
    opacity: 1;
    visibility: visible;
}

#ppp-modal .ppp-container {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ppp-modal.open .ppp-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* کانتینر اصلی - ظاهر لوکس */
.ppp-container {
    width: 95%;
    max-width: 480px;
    max-height: 92vh;
    background: linear-gradient(175deg, #ffffff 0%, #f8faff 30%, #f0f4ff 100%);
    color: #13297E;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--ppp-shadow), 0 0 0 1px rgba(19,41,126,0.08);
    display: flex;
    flex-direction: column;
}

/* هدر - کوتاه */
.ppp-header {
    padding: 14px 20px 12px;
    text-align: center;
    background: var(--ppp-gradient);
    color: white;
    position: relative;
}

.ppp-close {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 10px;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppp-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.ppp-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* جستجو - فشرده */
.ppp-search {
    padding: 10px 14px;
    background: linear-gradient(180deg, #f8faff 0%, #f5f8ff 100%);
    border-bottom: 1px solid rgba(19,41,126,0.06);
}

.ppp-search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(19,41,126,0.12);
    border-radius: 12px;
    background: #fff;
    font-size: 0.9rem;
    transition: all 0.25s;
}

.ppp-search input:focus {
    outline: none;
    border-color: var(--ppp-primary);
    box-shadow: 0 0 0 3px rgba(19,41,126,0.12);
}

/* لیست پادکست‌ها - لوکس */
.ppp-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    min-height: 160px;
}

.ppp-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(19,41,126,0.06);
    box-shadow: 0 2px 8px rgba(19,41,126,0.04);
}

.ppp-item:hover {
    background: linear-gradient(135deg, rgba(19,41,126,0.04) 0%, rgba(19,41,126,0.08) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(19,41,126,0.1);
    border-color: rgba(19,41,126,0.1);
}

.ppp-item.active {
    background: linear-gradient(135deg, rgba(19,41,126,0.08) 0%, rgba(19,41,126,0.14) 100%) !important;
    border-color: rgba(19,41,126,0.25);
    transform: translateX(6px);
    box-shadow: 0 6px 24px rgba(19,41,126,0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}

.ppp-item img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
    margin-left: 14px;
    box-shadow: 0 4px 12px rgba(19,41,126,0.15);
}

.ppp-item-info {
    flex: 1;
    min-width: 0;
}

.ppp-item-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.7em;
    color: var(--ppp-primary-dark);
}

.ppp-duration {
    font-size: 0.75em;
    opacity: 0.75;
    color: var(--ppp-primary);
}

/* اکولایزر */
.ppp-equalizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 28px;
}

.ppp-equalizer span {
    width: 4px;
    min-height: 3px;
    background: var(--ppp-gradient);
    border-radius: 2px;
    animation: ppp-eq 1s ease-in-out infinite;
}

.ppp-equalizer span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.ppp-equalizer span:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.ppp-equalizer span:nth-child(3) { height: 8px;  animation-delay: 0.2s; }
.ppp-equalizer span:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.ppp-equalizer span:nth-child(5) { height: 10px; animation-delay: 0.4s; }

.ppp-equalizer.paused span {
    animation-play-state: paused;
}

@keyframes ppp-eq {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

/* بخش پلیر - لوکس */
.ppp-player {
    padding: 20px;
    background: linear-gradient(180deg, #f5f8ff 0%, #eef3ff 100%);
    border-top: 1px solid rgba(19,41,126,0.08);
    box-shadow: 0 -4px 20px rgba(19,41,126,0.04);
}

#ppp-current-title {
    font-size: 0.7em;
    margin-bottom: 14px;
    text-align: center;
    font-weight: 600;
    color: var(--ppp-primary);
}

/* ویوفرم */
#ppp-waveform {
    margin-bottom: 18px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(19,41,126,0.06);
}

/* دکمه‌های کنترل - لوکس */
.ppp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ppp-controls button {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(19,41,126,0.12);
    border-radius: 50%;
    cursor: pointer;
    color: var(--ppp-primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(19,41,126,0.08);
    padding: 0;
    line-height: 1;
}

.ppp-controls button svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ppp-controls button:hover {
    background: var(--ppp-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(19,41,126,0.3);
}

.ppp-controls #ppp-play {
    width: 56px;
    height: 56px;
    background: var(--ppp-gradient);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(19,41,126,0.35);
}

.ppp-controls #ppp-play svg {
    width: 22px;
    height: 22px;
    margin-left: 2px;
}

.ppp-controls #ppp-play:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(19,41,126,0.45);
}

.ppp-controls button.ppp-active {
    background: var(--ppp-gradient);
    color: white;
    border-color: transparent;
    opacity: 1;
}
