@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-elevated: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e1b4b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Episode Picker */
.episode-picker {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px var(--shadow);
}

.episode-picker h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.episode-list::-webkit-scrollbar {
    width: 8px;
}

.episode-list::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 10px;
}

.episode-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.episode-item {
    background: var(--bg-elevated);
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.episode-item:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
    transform: translateX(5px);
}

.episode-item.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

.episode-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.episode-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.badge-playing {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.badge-completed {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Player Section */
.player-section {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px var(--shadow);
}

.player-container {
    max-width: 700px;
    margin: 0 auto;
}

.now-playing {
    text-align: center;
    margin-bottom: 30px;
}

.now-playing h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.episode-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    left: 0%;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

/* Controls */
.main-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.skip-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.btn:active {
    transform: scale(0.95);
}

.btn-play,
.btn-pause {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
}

.btn-play svg,
.btn-pause svg {
    width: 32px;
    height: 32px;
}

.btn-stop {
    width: 70px;
    height: 70px;
}

.btn-stop svg {
    width: 24px;
    height: 24px;
}

.btn-skip {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.btn-skip svg {
    width: 24px;
    height: 24px;
}

.skip-label {
    position: absolute;
    bottom: -20px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .player-section {
        padding: 25px;
    }

    .main-controls {
        gap: 15px;
    }

    .btn-play,
    .btn-pause,
    .btn-stop {
        width: 60px;
        height: 60px;
    }

    .btn-skip {
        width: 50px;
        height: 50px;
    }
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.btn-play:hover,
.btn-pause:hover {
    animation: pulse 2s infinite;
}