/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Apple Color Palette */
    --apple-black: #1d1d1f;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-green: #34c759;
    --apple-orange: #ff9500;
    --apple-pink: #ff2d55;
    --apple-purple: #af52de;
    --apple-red: #ff3b30;
    --apple-yellow: #ffcc00;

    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #fbfbfd;
    --bg-tertiary: #f5f5f7;

    /* Text */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-link: #0071e3;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 80px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-player: 0 -4px 24px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==================== Dark Mode ==================== */
body.dark-mode {
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2d2d2d;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-card-hover: 0 8px 32px rgba(0,0,0,0.5);
}

/* ==================== Header ==================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .header {
    background: rgba(29, 29, 31, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header-content::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 1px;
}

.header-nav {
    display: flex;
    gap: var(--space-lg);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    font-size: 24px;
}

.nav-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ==================== Hero Section ==================== */
.hero {
    padding: var(--space-xxxl) var(--space-xl);
    text-align: center;
    background: var(--bg-tertiary);
}

.hero-title {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--apple-blue), var(--apple-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.hero-actions {
    margin-top: var(--space-xl);
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-primary {
    background: var(--apple-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    color: var(--apple-blue);
    border: 1px solid var(--apple-blue);
}

.btn-secondary:hover {
    background: var(--apple-blue);
    color: white;
}

/* ==================== Categories ==================== */
.categories {
    padding: var(--space-xxl) var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
    }
}

.category-card {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .category-card {
    border: 1px solid rgba(255,255,255,0.1);
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-card-hover);
}

.category-card.active {
    box-shadow: 0 0 0 2px var(--apple-blue);
    border-color: var(--apple-blue);
}

.category-icon {
    font-size: 36px;
}

.category-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.category-card:nth-child(1) { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.category-card:nth-child(2) { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.category-card:nth-child(3) { background: linear-gradient(135deg, #d299c2, #fef9d7); }
.category-card:nth-child(4) { background: linear-gradient(135deg, #89f7fe, #66a6ff); }
.category-card:nth-child(5) { background: linear-gradient(135deg, #fddb92, #d1fdff); }
.category-card:nth-child(6) { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); }
.category-card:nth-child(7) { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.category-card:nth-child(8) { background: linear-gradient(135deg, #f093fb, #f5576c); }

/* ==================== Podcast Grid ==================== */
.podcast-section {
    padding: 0 var(--space-xl) var(--space-xxl);
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .podcast-section {
        padding: 0 var(--space-md) var(--space-lg);
    }
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
    max-width: 100%;
}

@media (max-width: 768px) {
    .podcast-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-md);
    }
}

@media (max-width: 380px) {
    .podcast-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-sm);
    }
}

.podcast-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .podcast-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

.podcast-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.podcast-cover {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.podcast-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-width: 0;
}

.podcast-emoji {
    font-size: 64px;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.podcast-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.podcast-card:hover .play-icon {
    transform: scale(1);
}

.podcast-info {
    padding: var(--space-md);
}

.podcast-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podcast-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.podcast-category-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.podcast-actions {
    display: flex;
    gap: var(--space-sm);
    padding: 0 var(--space-md) var(--space-md);
}

.podcast-action-btn {
    flex: 1;
    padding: var(--space-sm);
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all 0.2s;
}

.podcast-action-btn:hover {
    background: var(--apple-blue);
    color: white;
}

.podcast-action-btn.favorited {
    color: var(--apple-red);
}

/* ==================== Player Bar ==================== */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 0 var(--space-xl);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

body.dark-mode .player-bar {
    background: rgba(29, 29, 31, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
}

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

/* Collapsed state - only show mini bar */
.player-bar.collapsed .player-content {
    display: none;
}

.player-bar.collapsed {
    padding: 0;
}

.player-collapse-bar {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.02) 100%);
}

body.dark-mode .player-collapse-bar {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(255,255,255,0.02) 100%);
}

.collapse-indicator {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.player-bar.collapsed .collapse-indicator {
    transform: rotate(180deg);
}

/* Mini player when collapsed */
.player-bar.collapsed .player-info {
    justify-content: center;
    padding: 8px 0;
}

.player-bar.collapsed .mini-controls {
    display: flex;
}

.player-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr 200px;
    gap: var(--space-lg);
    align-items: center;
}

.player-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.player-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.player-details {
    overflow: hidden;
}

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

.player-episode {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.player-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
    border-radius: 50%;
    transition: all 0.2s;
}

.player-btn:hover {
    background: var(--bg-tertiary);
}

.player-btn.play-pause {
    width: 40px;
    height: 40px;
    background: var(--apple-blue);
    color: white;
    font-size: 16px;
}

.player-btn.play-pause:hover {
    transform: scale(1.05);
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.progress-time {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--apple-blue);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-bar:hover .progress-fill {
    background: var(--apple-blue-hover);
}

.player-extra {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-md);
}

.speed-btn, .volume-btn, .timer-btn {
    font-size: 12px;
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.speed-btn:hover, .volume-btn:hover, .timer-btn:hover {
    background: var(--apple-blue);
    color: white;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--apple-blue);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--apple-blue);
    cursor: pointer;
    border: none;
}

/* ==================== Modals ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.modal-overlay.visible .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--apple-red);
    color: white;
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

/* ==================== Search ==================== */
.search-container {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-xl);
    font-size: 15px;
    background: var(--bg-secondary);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-secondary);
}

.search-results {
    margin-top: var(--space-md);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
    width: 100%;
}

.search-result-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.dark-mode .search-result-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

.search-result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.search-result-cover {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    min-width: 0;
}

.search-result-cover img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 0;
}

.search-result-emoji {
    font-size: 64px;
}

.search-result-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.search-result-card:hover .search-result-play-overlay {
    opacity: 1;
}

.search-result-play-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.search-result-info {
    padding: var(--space-md);
    min-width: 0;
}

.search-result-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-artist {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-category {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-top: var(--space-sm);
}

@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 380px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
}

/* ==================== Tabs ==================== */
.tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: var(--space-sm);
}

.tab {
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--apple-blue);
    background: rgba(0,113,227,0.1);
}

/* ==================== Episode List ==================== */
.episode-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.episode-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.episode-item:hover {
    background: var(--bg-tertiary);
}

.episode-item.playing {
    border-left: 3px solid var(--apple-blue);
}

.episode-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--apple-blue);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.episode-play-btn:hover {
    transform: scale(1.1);
}

.episode-info {
    flex: 1;
    overflow: hidden;
}

.episode-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.episode-duration {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
}

.episode-new-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
}

.category-card#refreshCard {
    cursor: pointer;
    transition: all 0.2s;
}

.category-card#refreshCard:hover {
    transform: scale(1.05);
}

.category-card#refreshCard:active {
    transform: scale(0.95);
}

/* ==================== Add Podcast Form ==================== */
.add-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-secondary);
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--apple-blue);
}

.form-select {
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-secondary);
    cursor: pointer;
}

.help-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== Loading States ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xxl);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--apple-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== Empty States ==================== */
.empty-state {
    text-align: center;
    padding: var(--space-xxl);
    color: var(--text-secondary);
    grid-column: 1 / -1;
    justify-self: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.empty-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* ==================== Toast ==================== */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
}

.toast {
    background: var(--apple-black);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    /* Header - mobile optimized */
    .header-content {
        padding: 0 var(--space-md);
        height: 48px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .header-actions {
        gap: var(--space-sm);
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

/* Header - compact logo on mobile */
    .logo {
        font-size: 14px;
        gap: 4px;
    }

    .logo-icon {
        font-size: 18px;
    }

    .logo-text {
        display: inline;
    }

    .hero {
        padding: var(--space-xl) var(--space-md);
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: var(--space-md);
    }

    .hero-subtitle {
        font-size: 15px;
        padding: 0 var(--space-sm);
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--space-sm);
        margin-top: var(--space-lg);
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Categories - mobile optimized */
    .categories {
        padding: var(--space-lg) var(--space-md);
    }

    .section-header {
        margin-bottom: var(--space-md);
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
    }

    .category-card {
        aspect-ratio: 1;
        border-radius: var(--radius-md);
    }

    .category-icon {
        font-size: 28px;
    }

    .category-name {
        font-size: 11px;
    }

    /* Podcast Grid - mobile optimized */
    .podcast-section {
        padding: 0 var(--space-md) var(--space-xl);
    }

    .podcast-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .podcast-card {
        border-radius: var(--radius-md);
    }

    .podcast-cover {
        border-radius: var(--radius-sm);
    }

    .podcast-info {
        padding: var(--space-sm);
    }

    .podcast-title {
        font-size: 13px;
    }

    .podcast-meta {
        font-size: 11px;
    }

    .podcast-actions {
        padding: 0 var(--space-sm) var(--space-sm);
    }

    .podcast-action-btn {
        font-size: 11px;
        padding: 6px;
    }

    /* Search - mobile optimized */
    .search-container {
        margin-bottom: var(--space-md);
    }

    .search-input {
        padding: 12px 14px 12px 40px;
        font-size: 14px;
    }

    .search-icon {
        left: 14px;
        font-size: 14px;
    }

    /* Player - mobile optimized */
    .player-content {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        padding: var(--space-sm) 0;
    }

    .player-extra {
        display: none;
    }

    .player-buttons {
        gap: var(--space-md);
    }

    .player-btn.play-pause {
        width: 36px;
        height: 36px;
    }

    .progress-container {
        padding: 0 var(--space-sm);
    }

    /* Modal - mobile optimized */
    .modal {
        width: 95%;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }

    .modal-header {
        padding: var(--space-md);
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-body {
        padding: var(--space-md);
        max-height: calc(85vh - 100px);
    }

    /* Episode list - mobile optimized */
    .episode-item {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .episode-play-btn {
        width: 32px;
        height: 32px;
    }

    .episode-title {
        font-size: 13px;
    }

    /* Tabs - mobile optimized */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: var(--space-xs);
    }

    .tab {
        padding: var(--space-xs) var(--space-sm);
        font-size: 13px;
        white-space: nowrap;
    }

    /* Toast - mobile adjusted */
    .toast-container {
        bottom: 80px;
    }

    .toast {
        font-size: 13px;
        padding: 10px 20px;
    }

    /* Episode list - prevent overflow on small screens */
    .episode-info {
        min-width: 0;
    }

    .episode-title {
        white-space: normal;
        -webkit-line-clamp: 2;
    }

    .episode-date {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* About section - mobile responsive */
    .about-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .about-cover,
    .about-emoji {
        width: 72px;
        height: 72px;
        font-size: 36px;
    }

    .about-title {
        font-size: 16px;
    }

    .about-description {
        padding: var(--space-sm);
    }

    .about-meta-item {
        flex-wrap: wrap;
    }

    .meta-value {
        max-width: 100%;
        text-align: left;
    }
}

/* ==================== Back to Top Button ==================== */
.back-to-top-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--apple-blue);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.1);
}

.back-to-top-btn:active {
    transform: scale(0.95);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .back-to-top-btn {
        right: 16px;
        bottom: 90px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ==================== Footer ==================== */
.site-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: var(--space-xl) var(--space-xl);
    margin-top: auto;
}

body.dark-mode .site-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-disclaimer {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.footer-icon {
    font-size: 14px;
}

.footer-link {
    color: var(--apple-blue);
    text-decoration: none;
    margin-left: var(--space-xs);
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Extra small screens (iPhone SE, small Android) */
@media (max-width: 380px) {
    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .category-icon {
        font-size: 24px;
    }

    .category-name {
        font-size: 10px;
    }

    .podcast-grid {
        gap: var(--space-sm);
    }

    .podcast-title {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: var(--space-md);
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        display: none;
    }

    .hero-actions {
        flex-direction: row;
        margin-top: var(--space-sm);
    }
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.podcast-card {
    animation: fadeIn 0.4s ease-out forwards;
}

.podcast-card:nth-child(1) { animation-delay: 0s; }
.podcast-card:nth-child(2) { animation-delay: 0.05s; }
.podcast-card:nth-child(3) { animation-delay: 0.1s; }
.podcast-card:nth-child(4) { animation-delay: 0.15s; }
.podcast-card:nth-child(5) { animation-delay: 0.2s; }
.podcast-card:nth-child(6) { animation-delay: 0.25s; }

/* ==================== About Content ==================== */
.about-content {
    padding: var(--space-sm) 0;
}

.about-podcast {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.about-header {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.about-cover {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.about-emoji {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.about-info {
    flex: 1;
}

.about-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.about-category-tag {
    display: inline-block;
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.about-description {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.about-description h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.about-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.about-meta-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .about-meta-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.meta-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

/* ==================== Floating Player ==================== */
.floating-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid rgba(0,0,0,0.08);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

body.dark-mode .floating-player {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.floating-player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.floating-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.floating-cover {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.floating-text {
    min-width: 0;
    flex: 1;
}

.floating-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.floating-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 50%;
    transition: background 0.2s;
}

.floating-btn:hover {
    background: var(--bg-tertiary);
}

.floating-btn:active {
    transform: scale(0.95);
}

.floating-play {
    width: 44px;
    height: 44px;
    background: var(--apple-blue);
    color: white;
    font-size: 18px;
}

.floating-play:hover {
    background: var(--apple-blue-hover);
}

.floating-progress {
    height: 6px;
    background: var(--bg-tertiary);
    cursor: pointer;
    border-radius: 3px;
    overflow: hidden;
}

.floating-progress-bar {
    height: 100%;
    position: relative;
    cursor: pointer;
}

.floating-progress-fill {
    height: 100%;
    background: var(--apple-blue);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
}

/* Mobile Responsive for Floating Player */
@media (max-width: 480px) {
    .floating-player-content {
        padding: 10px 12px;
    }

    .floating-cover {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .floating-title {
        font-size: 13px;
    }

    .floating-time {
        font-size: 10px;
    }

    .floating-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .floating-play {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .floating-controls {
        gap: 4px;
    }

    .floating-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .floating-play {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Hide some controls on very small screens */
@media (max-width: 320px) {
    .floating-btn:not(.floating-play) {
        display: none;
    }
}
