/* ===== MTD Gospel Music App - Light Theme from Android App ===== */

/* CSS Variables - Light Theme Colors from colors.xml */
:root {
    /* Primary Colors from Android App */
    --primary-color: #6200EE;
    --primary-dark: #3700B3;
    --primary-light: #956FCC;
    --secondary-color: #9C27B0;
    --accent-color: #6200EE;
    
    /* Background Colors - Light Theme from Android */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F2F2F2;
    --bg-card: #FFFFFF;
    --bg-elevated: #F5F5F5;
    --bg-nav: #FFFFFF;
    --bg-nav-head: #6200EE;
    --bg-color: #F2F2F2;
    
    /* Aliases for compatibility */
    --card-bg: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    
    /* Text Colors - Dark for Light Theme */
    --text-primary: #1A1A1A;
    --text-secondary: #585858;
    --text-muted: #999999;
    --text-on-primary: #FFFFFF;
    --text-color: #1A1A1A;
    
    /* Accent Colors - Purple Theme Variants */
    --color-scale: #6200EE;
    --color-style: #9C27B0;
    --color-key: #B388FF;
    --color-theme: #9C27B0;
    --color-mood: #5C6BC0;
    --color-type: #AB47BC;
    
    /* Active/Primary - Purple */
    --color-active: #6200EE;
    --color-active-light: #956FCC;
    
    /* Status Colors */
    --color-success: #4CAF50;
    --color-warning: #FFA726;
    --color-error: #E94E3A;
    
    /* Bottom Navigation - Light Mode from Android */
    --nav-active: #6200EE;
    --nav-bg: #FFFFFF;
    --nav-passive: #585858;
    --nav-pressed: #F2F2F2;
    
    /* Border */
    --border-color: #E0E0E0;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Shadows - Subtle for Light Theme */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    padding-bottom: 85px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit; /* can be overridden */
    text-decoration: none;
}

/* ===== Header - Light Theme with Purple Accent ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 14px 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(98, 0, 238, 0.25);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-tabs {
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.header-tab {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.header-tab:hover {
    color: rgba(255,255,255,0.85);
}

.header-tab.active {
    color: #FFFFFF;
}

.menu-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #FFFFFF;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.25);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #FFFFFF;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* ===== Main Content ===== */
.main-content {
    margin-top: 60px;
    padding: 0 16px 20px;
}

/* ===== Filter Pills (Figma exact) ===== */
.filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

/* Light Theme Pill Colors - Purple Variants */
.pill.scale { background: var(--primary-color); color: white; }
.pill.style { background: #9C27B0; color: white; }
.pill.key { background: #B388FF; color: #1A1A1A; }
.pill.theme { background: #9C27B0; color: white; }
.pill.mood { background: #5C6BC0; color: white; }
.pill.type { background: #AB47BC; color: white; }

.pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pill.active {
    background: var(--primary-color) !important;
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.pill .close-x {
    font-size: 10px;
    opacity: 0.8;
}

/* ===== Section Headers ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== Shorts Section (Figma 9:16 cards) ===== */
.shorts-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.shorts-scroll::-webkit-scrollbar {
    display: none;
}

.short-card {
    flex-shrink: 0;
    width: 110px;
    height: 196px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
}

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

.short-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 8px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.short-title {
    font-size: 11px;
    font-weight: 500;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Album Cards (Horizontal Scroll) ===== */
.album-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.album-scroll::-webkit-scrollbar {
    display: none;
}

.album-card {
    flex-shrink: 0;
    width: 100px;
    transition: transform 0.2s ease;
}

.album-card:hover {
    transform: translateY(-4px);
}

.album-cover {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-card);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 32px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.album-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-artist {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== CTA Card (Contribute - Light Theme) ===== */
.cta-card {
    background: linear-gradient(135deg, rgba(98, 0, 238, 0.08) 0%, rgba(149, 111, 204, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 16px 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.cta-card::before {
    content: '✍️';
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 40px;
    opacity: 0.15;
}

.cta-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    position: relative;
}

.cta-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    position: relative;
    line-height: 1.5;
}

.cta-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Artist Cards (Circular) ===== */
.artist-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.artist-scroll::-webkit-scrollbar {
    display: none;
}

.artist-card {
    flex-shrink: 0;
    text-align: center;
    width: 72px;
    transition: transform 0.2s ease;
}

.artist-card:hover {
    transform: translateY(-4px);
}

.artist-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    background: var(--bg-card);
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.artist-card:hover .artist-avatar {
    border-color: var(--primary-color);
}

.artist-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.artist-name {
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ===== Song List (SQUARE Thumbnails - Figma exact) ===== */
.song-list {
    list-style: none;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    gap: 12px;
    cursor: pointer;
}

.song-item:active {
    opacity: 0.7;
}

/* SQUARE thumbnail - NOT circular */
.song-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card);
}

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

.song-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 20px;
    background: linear-gradient(135deg, #3A3A3C, #2C2C2E);
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-menu {
    color: var(--text-secondary);
    font-size: 18px;
    padding: 8px;
}

/* ===== Search Bar (Figma exact) ===== */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
}

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

.search-mic-btn {
    width: 44px;
    height: 44px;
    background: var(--color-active);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== Bottom Navigation - Light Theme ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 20px;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    color: var(--nav-passive);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--primary-color);
    background: var(--nav-pressed);
}

.nav-item.active {
    color: var(--nav-active);
    background: rgba(98, 0, 238, 0.1);
}

.nav-item .nav-icon {
    font-size: 22px;
}

.nav-item .nav-icon svg {
    fill: currentColor;
}

.nav-item .nav-label {
    font-size: 10px;
}

/* ===== My Library Page ===== */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.library-section {
    margin-bottom: 24px;
}

/* Playlist Grid (2x2 with mosaic covers) */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.playlist-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.playlist-cover {
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    background: var(--bg-elevated);
}

.playlist-cover-item {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-cover-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-cover-placeholder {
    font-size: 24px;
}

.playlist-info {
    padding: 10px 12px;
}

.playlist-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--primary-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: rgba(98, 0, 238, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== Tabs (Scale Categories) ===== */
.tabs-container {
    margin-top: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tabs {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}

.tab {
    display: inline-flex;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tab:hover {
    border-color: var(--color-active);
    color: var(--color-active);
    box-shadow: 0 2px 8px rgba(98, 0, 238, 0.15);
}

.tab.active {
    background: var(--color-active);
    color: white;
    border-color: var(--color-active);
}

.tab.active:hover {
    background: var(--color-active);
    color: white;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

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

/* ===== Loading ===== */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-active);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Drawer (Side Menu) ===== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-primary);
    z-index: 1200;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.drawer.active {
    left: 0;
}

.drawer-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 40px 20px 32px;
    position: relative;
    overflow: hidden;
}

.drawer-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.drawer-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-top: 4px;
}

.drawer-menu {
    list-style: none;
    padding: 8px 0;
}

.drawer-menu a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 14px;
}

.drawer-menu a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.drawer-menu a.active {
    background: rgba(98, 0, 238, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}

.drawer-menu .menu-icon {
    margin-right: 16px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.drawer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.drawer-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px 8px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}

.theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-primary);
    font-size: 14px;
}

/* Toggle Switch */
.switch {
    position: relative;
    width: 48px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 28px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background: var(--color-active);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ===== Video Grid ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-thumb {
    aspect-ratio: 16/9;
    background: var(--bg-elevated);
    position: relative;
}

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

.video-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 32px;
}

.video-info {
    padding: 10px;
}

.video-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-release {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Video Scroll ===== */
.video-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.video-scroll::-webkit-scrollbar {
    display: none;
}

.video-card-small {
    flex-shrink: 0;
    width: 140px;
}

.video-card-small .video-thumb {
    width: 140px;
    height: 80px;
    border-radius: var(--radius-sm);
}

.video-card-small .video-card-title {
    font-size: 12px;
    margin-top: 8px;
}

/* ===== Channel Cards ===== */
.channel-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.channel-scroll::-webkit-scrollbar {
    display: none;
}

.channel-card-small {
    flex-shrink: 0;
    width: 72px;
    text-align: center;
}

.channel-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    background: var(--bg-card);
    position: relative;
}

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

.channel-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 24px;
}

.channel-card-name {
    font-size: 11px;
    color: var(--text-primary);
}

.live-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF0000;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
}

/* ===== Lyrics Page ===== */
.lyrics-header {
    margin-bottom: 16px;
}

.lyrics-song-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.lyrics-artist {
    color: var(--text-secondary);
    font-size: 14px;
}

.lyrics-artist a {
    color: var(--color-active);
}

.lyrics-content-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.lyrics-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.font-btn {
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
}

.lyrics-content {
    font-size: 16px;
    line-height: 2;
    white-space: pre-wrap;
}

/* ===== WebView Container ===== */
.webview-container {
    width: 100%;
    height: 70vh;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
}

.webview-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Scale Grid ===== */
.scale-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scale-row {
    display: flex;
    gap: 4px;
}

.note {
    flex: 1;
    padding: 12px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* ===== Social Links ===== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.social-icon.youtube { background: #FF0000; }
.social-icon.telegram { background: #0088cc; }
.social-icon.facebook { background: #1877F2; }
.social-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

/* ===== Contact Info ===== */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

/* ===== Support Options ===== */
.support-grid {
    display: grid;
    gap: 12px;
}

.support-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
}

.support-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.support-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ===== Video Player ===== */
.video-player-container {
    margin: 0;
    background: #000;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1A1A1A, #000);
}

.video-wrapper.youtube iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder-large {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2A2A2A, #1A1A1A);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-placeholder-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.video-placeholder-large .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-placeholder-large .play-button {
    width: 70px;
    height: 70px;
    background: rgba(98, 0, 238, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(98, 0, 238, 0.5);
}

.video-placeholder-large .play-overlay p {
    font-size: 0.9em;
    opacity: 0.9;
}

.quality-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1A1A1A, #2A2A2A);
    color: white;
    font-size: 0.85em;
}

.quality-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
}

/* Video Details Card */
.video-details {
    margin: 16px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.video-header {
    margin-bottom: 16px;
}

.video-detail-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 12px;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #F0E6FF, #E8DEFF);
    border-radius: 12px;
    font-size: 0.8em;
    color: #6200EE;
    font-weight: 500;
}

.quality-badge {
    background: linear-gradient(135deg, #FF6B6B, #EE5A5A) !important;
    color: white !important;
}

.premium-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #1A1A1A !important;
}

.video-description {
    padding-top: 16px;
    border-top: 1px solid #F0E6FF;
}

.video-description h3,
.video-genres h3,
.video-cast h3,
.video-director h3 {
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-description p {
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
}

.video-genres,
.video-cast,
.video-director {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F0E6FF;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #9C27B0, #6200EE);
    color: white;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.cast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cast-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #F8F5FF;
    border-radius: 25px;
}

.cast-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #9C27B0, #6200EE);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
}

.cast-name {
    font-size: 0.85em;
    font-weight: 500;
    color: #444;
}

/* Episodes Section */
.episodes-section {
    margin: 0 16px 16px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.episodes-section .card-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 16px;
}

.season-block {
    margin-bottom: 20px;
}

.season-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #6200EE;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #F0E6FF;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #F8F5FF;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.episode-item:hover {
    background: #F0E6FF;
    transform: translateX(4px);
}

.episode-item.active {
    background: linear-gradient(135deg, #9C27B0, #6200EE);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(98, 0, 238, 0.3);
}

.episode-thumbnail {
    width: 80px;
    height: 50px;
    background: #E0D6FF;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #6200EE;
}

.episode-item.active .episode-placeholder {
    color: white;
}

.episode-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.episode-number {
    font-size: 0.75em;
    font-weight: 600;
    color: #6200EE;
    text-transform: uppercase;
}

.episode-item.active .episode-number {
    color: rgba(255, 255, 255, 0.8);
}

.episode-title {
    font-size: 0.9em;
    font-weight: 500;
    color: #1A1A1A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-item.active .episode-title {
    color: white;
}

/* Related Videos Section */
.card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card .card-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-grid.small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.video-card.small {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(98, 0, 238, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.video-card.small:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(98, 0, 238, 0.2);
    border-color: #6200EE;
}

.video-card.small .video-thumbnail {
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F0E6FF, #E8DEFF);
}

.video-card.small .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card.small:hover .video-thumbnail img {
    transform: scale(1.1);
}

.video-card.small .video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 36px;
    height: 36px;
    background: rgba(98, 0, 238, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(98, 0, 238, 0.4);
}

.video-card.small:hover .video-thumbnail::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-card.small .video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #9C27B0;
}

.video-card.small .video-info {
    padding: 12px;
    background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
}

.video-card.small .video-title {
    font-size: 0.8em;
    font-weight: 600;
    color: #1A1A1A;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.video-card.small:hover .video-title {
    color: #6200EE;
}

/* Error Card */
.error-card {
    margin: 16px;
    padding: 40px 20px;
    text-align: center;
}

.error-card .empty-state-icon {
    font-size: 4em;
    margin-bottom: 16px;
}

.error-card small {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 0.85em;
}

.genre-tag {
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.episode-item.active {
    background: var(--color-active);
}

.episode-item.active .episode-number,
.episode-item.active .episode-title {
    color: white;
}

.episode-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-active);
    min-width: 32px;
}

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

/* ===== Responsive ===== */
@media (min-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .playlist-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .main-content {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Header Title Styles */
.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
}

.header-title span {
    color: #FFFFFF;
}

.header-title-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
}

.header-title-link:hover {
    opacity: 0.9;
}

.header-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #FFFFFF;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: rgba(255,255,255,0.25);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== New Songs / Video Page Styles ===== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px 20px;
    margin: -16px -16px 20px -16px;
    text-align: center;
    border-radius: 0 0 20px 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Genre Filter Tabs */
.filter-section {
    margin-bottom: 20px;
}

.genre-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.genre-tabs::-webkit-scrollbar {
    display: none;
}

.genre-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-card);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.genre-tab:hover {
    background: var(--bg-elevated);
    border-color: var(--primary-color);
}

.genre-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Video Card */
.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 150%; /* 2:3 aspect ratio for portrait */
    background: var(--bg-elevated);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.video-quality {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.video-badge.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.video-year {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    margin-top: 10px;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Error/Empty States */
.error-card {
    border-left: 4px solid var(--color-error);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.empty-state small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Force scale tab styling */
.scale-tabs-section a.scale-tab-btn,
a.scale-tab-btn {
    color: #FFFFFF !important;
    background: rgba(255,255,255,0.2) !important;
}
.scale-tabs-section a.scale-tab-btn.active,
a.scale-tab-btn.active {
    color: #6200EE !important;
    background: #FFFFFF !important;
}
