* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #9333ea;
    --primary-dark: #7c3aed;
    --secondary-color: #a855f7;
    --accent-color: #c084fc;
    --bg-gradient: linear-gradient(135deg, #9333ea 0%, #4c1d95 100%);
    --bg-gradient-hover: linear-gradient(135deg, #a855f7 0%, #581c87 100%);
    --header-gradient: linear-gradient(135deg, #000000 0%, #4c1d95 50%, #9333ea 100%);
    --text-dark: #1a1a1a;
    --text-light: #6b7280;
    --bg-light: #f5f3ff;
    --bg-dark: #0a0a0a;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(147, 51, 234, 0.1);
    --shadow-md: 0 4px 20px rgba(147, 51, 234, 0.15);
    --shadow-lg: 0 10px 40px rgba(147, 51, 234, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    min-height: 100vh;
}

/* Header mejorado */
header {
    background: var(--header-gradient);
    color: var(--white);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%239333ea" fill-opacity="0.2" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-container {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(147, 51, 234, 0.5);
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.4);
}

.logo {
    font-size: 2.5rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Main content */
main {
    max-width: 900px;
    margin: -3rem auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.episodes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Episodios mejorados */
.episode {
    display: flex;
    align-items: flex-start;
    padding: 2rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(147, 51, 234, 0.1);
}

.episode::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--bg-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.episode:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(147, 51, 234, 0.3);
}

.episode:hover::before {
    opacity: 1;
}

.episode-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 2rem;
    min-width: 4rem;
    text-align: center;
    text-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
}

.episode-content {
    flex: 1;
}

.episode-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.episode-date {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.episode-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Controles de episodio */
.episode-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.play-btn {
    background: var(--bg-gradient);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
    background: var(--bg-gradient-hover);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn.playing {
    background: linear-gradient(135deg, #000000 0%, #4c1d95 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.duration {
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(76, 29, 149, 0.1) 100%);
    border-radius: 20px;
    min-width: 60px;
    text-align: center;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

/* Mini reproductor flotante */
.mini-player {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(147, 51, 234, 0.3);
    z-index: 1000;
    min-width: 320px;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mini-player-content {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05) 0%, transparent 100%);
    border-radius: 16px;
}

.mini-player-info {
    flex: 1;
}

.mini-player-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-progress {
    margin-top: 0.5rem;
}

.progress-bar {
    height: 4px;
    background: rgba(147, 51, 234, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

.mini-player-controls {
    display: flex;
    gap: 0.5rem;
}

.mini-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

#miniPlayPause {
    background: var(--bg-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

#miniPlayPause:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

#miniClose {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(76, 29, 149, 0.1) 100%);
    color: var(--text-dark);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

#miniClose:hover {
    background: linear-gradient(135deg, #000000 0%, #4c1d95 100%);
    color: var(--white);
    border-color: transparent;
}

/* Ocultar audio nativo */
audio {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    header {
        padding: 3rem 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 0 1rem;
        margin-top: -2rem;
    }
    
    .episode {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .episode-number {
        margin-right: 0;
        margin-bottom: 1rem;
        text-align: left;
    }
    
    .mini-player {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
}
