:root, [data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-blur: rgba(255, 255, 255, 0.88);
    --bg-subtle: #F3E8FF;
    --bg-hover: #FAF5FF;
    --text-primary: #1E1B4B;
    --text-muted: #64748B;
    --border-color: #F1F5F9;
    --border-accent: #DDD6FE;
    --primary-purple: #7C3AED;
    --purple-gradient: linear-gradient(135deg, #8B5CF6, #6D28D9);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 16px rgba(124, 58, 237, 0.05);
    --wave-opacity: 0.5;
}

[data-theme="dark"] {
    --bg-primary: #0F0F12;
    --bg-card: #18181B;
    --bg-card-blur: rgba(24, 24, 27, 0.88);
    --bg-subtle: #27272A;
    --bg-hover: #3F3F46;
    --text-primary: #F4F4F5;
    --text-muted: #A1A1AA;
    --border-color: #27272A;
    --border-accent: #3F3F46;
    --primary-purple: #9333EA;
    --purple-gradient: linear-gradient(135deg, #A855F7, #7C3AED);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
    --wave-opacity: 0.25;
}

[data-theme="oled"] {
    --bg-primary: #000000;
    --bg-card: #09090B;
    --bg-card-blur: rgba(9, 9, 11, 0.92);
    --bg-subtle: #18181B;
    --bg-hover: #27272A;
    --text-primary: #FAFAFA;
    --text-muted: #A1A1AA;
    --border-color: #1F1F23;
    --border-accent: #27272A;
    --primary-purple: #A855F7;
    --purple-gradient: linear-gradient(135deg, #C084FC, #9333EA);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.85);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.75);
    --wave-opacity: 0.15;
}

.stories-scroll-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 2px 12px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    box-sizing: border-box !important;
}
.stories-scroll-row::-webkit-scrollbar {
    display: none;
}
.story-avatar-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #EC4899, #8B5CF6, #3B82F6);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.story-avatar-wrap:active {
    transform: scale(0.93);
}
.story-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-card);
}
.story-badge-live {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #EF4444;
    color: #FFFFFF;
    font-size: 8.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    border: 1.5px solid var(--bg-card);
}

.player-art-box {
    position: relative;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(124, 58, 237, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.player-art-box::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 32px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.45) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    opacity: 0.85;
    filter: blur(24px);
    animation: ambientPulse 4s infinite alternate ease-in-out;
}
@keyframes ambientPulse {
    0% { transform: scale(0.98); opacity: 0.6; }
    100% { transform: scale(1.05); opacity: 0.95; }
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

html, body {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100%;
    overflow-x: hidden !important;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden !important;
    overflow-y: auto;
}

.desktop-sidebar {
    display: none;
    width: 260px;
    min-width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    flex-direction: column;
    z-index: 10005 !important;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 32px;
    padding-left: 8px;
}

.brand-text h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.purple-text {
    color: var(--primary-purple);
}

.brand-text p {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

.sidebar-link:hover, .sidebar-link:active {
    background: var(--bg-subtle);
    color: var(--primary-purple);
}

.sidebar-link.active {
    background: var(--bg-subtle);
    color: var(--primary-purple);
}

.app-main-content {
    width: 100% !important;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 110px 16px !important;
    z-index: 10;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

@media (min-width: 768px) {
    .desktop-sidebar {
        display: flex;
    }

    .app-main-content {
        margin-left: 260px;
        max-width: calc(100% - 260px) !important;
        padding: 0 36px 40px 36px !important;
    }

    .page-container {
        padding-top: 100px;
    }

    .search-container {
        margin-top: 14px;
        margin-bottom: 24px;
    }

    .bottom-nav {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }

    .mobile-only {
        display: none !important;
    }
}

.desktop-only {
    display: none !important;
}

.page-container {
    width: 100% !important;
    max-width: 100% !important;
    display: none;
    flex-direction: column;
    padding-top: 86px;
    padding-bottom: 80px;
    animation: fadeIn 0.2s ease-in-out;
}

.page-container.active-page {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.equal-upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
    width: 100% !important;
}

@media (min-width: 768px) {
    .equal-upload-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.equal-upload-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    border: 1px dashed var(--primary-purple);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 200px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.upload-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-card-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.format-tag {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.file-info-preview {
    font-size: 12.5px;
    color: var(--primary-purple);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 8px 0 4px 0;
}

.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: var(--bg-subtle);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
    display: none;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-purple);
    transition: width 0.3s ease;
}

.home-header, .subpage-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: var(--bg-card-blur);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: calc(env(safe-area-inset-top, 6px) + 8px) 16px 12px 16px;
    width: 100% !important;
    max-width: 480px;
    border-bottom: 1.5px solid var(--border-color);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    box-sizing: border-box !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.desktop-header-title {
    display: none;
}

@media (min-width: 768px) {
    .desktop-header-title {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .home-header, .subpage-header {
        position: fixed !important;
        top: 0 !important;
        left: 260px !important;
        transform: none !important;
        width: calc(100% - 260px) !important;
        max-width: calc(100% - 260px) !important;
        height: 72px !important;
        padding: 0 36px !important;
        background: var(--bg-card) !important;
        border-bottom: 1.5px solid var(--border-color) !important;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04) !important;
        z-index: 9999 !important;
    }
}

.subpage-header {
    justify-content: flex-start;
    gap: 14px;
}

.subpage-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

.desktop-header-title h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

.notification-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
    background-color: #EF4444;
    border-radius: 50%;
    border: 1.5px solid var(--bg-card);
}

/* THREE-DOT (⋮) STUDIO TOOLS DROPDOWN MENU - COMPACT TOP POPUP */
.top-tools-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 235px;
    background: var(--bg-card);
    border-radius: 18px;
    padding: 6px;
    border: 1.5px solid var(--border-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform-origin: top right;
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.82) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.tools-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--bg-primary);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.tools-dropdown-item:hover, .tools-dropdown-item:active {
    background: var(--bg-subtle);
    transform: scale(1.02);
    border-color: var(--primary-purple);
}

/* GLOBAL MICRO-ANIMATIONS & SMOOTH BUTTON TOUCH EFFECTS */
.btn, .action-btn-ui, .icon-btn, .ctrl-icon-btn, .player-act-btn, .theme-btn, .chip {
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn:active, .action-btn-ui:active, .icon-btn:active, .ctrl-icon-btn:active, .player-act-btn:active, .chip:active {
    transform: scale(0.93) !important;
}

.player-art-box {
    will-change: transform, opacity;
}

/* ANIMATED EQUALIZER BARS FOR ACTIVE PLAYING SONG */
.playing-equalizer-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.playing-equalizer-bars .bar {
    width: 4px;
    background: #FFFFFF;
    border-radius: 2px;
    animation: barJump 0.6s ease-in-out infinite alternate;
}

.playing-equalizer-bars .b1 { height: 16px; animation-delay: 0s; }
.playing-equalizer-bars .b2 { height: 10px; animation-delay: 0.2s; }
.playing-equalizer-bars .b3 { height: 18px; animation-delay: 0.4s; }

@keyframes barJump {
    0% { height: 4px; }
    100% { height: 18px; }
}

.search-container {
    margin-top: 6px;
    margin-bottom: 20px;
    width: 100% !important;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100% !important;
}

.search-icon {
    position: absolute;
    left: 16px;
    pointer-events: none;
}

.search-wrapper input {
    width: 100% !important;
    height: 52px;
    padding: 12px 46px 12px 46px;
    border: 1.5px solid var(--border-accent);
    border-radius: 26px;
    font-size: 15px;
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--shadow-card);
    box-sizing: border-box !important;
}

.mic-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
    width: 100% !important;
}

@media (min-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

.grid-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    width: 100% !important;
    box-sizing: border-box !important;
}

.grid-card:hover, .grid-card:active {
    transform: translateY(-2px);
}

.grid-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.grid-card:nth-child(1) .grid-icon-box { background: linear-gradient(135deg, #EC4899, #8B5CF6); }
.grid-card:nth-child(2) .grid-icon-box { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.grid-card:nth-child(3) .grid-icon-box { background: linear-gradient(135deg, #3B82F6, #6366F1); }
.grid-card:nth-child(4) .grid-icon-box { background: linear-gradient(135deg, #F43F5E, #D97706); }

.item-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.badge-purple { background: linear-gradient(135deg, #A855F7, #6D28D9); }
.badge-blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.badge-green { background: linear-gradient(135deg, #10B981, #047857); }
.badge-orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.badge-pink { background: linear-gradient(135deg, #EC4899, #BE185D); }
.badge-red { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.badge-cyan { background: linear-gradient(135deg, #06B6D4, #0E7490); }
.badge-indigo { background: linear-gradient(135deg, #6366F1, #4338CA); }

.grid-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    margin-left: 10px;
}

.chevron-icon {
    color: var(--primary-purple);
}

.list-options-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 8px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    width: 100% !important;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover, .list-item:active {
    background: var(--bg-hover);
    border-radius: 12px;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    overflow: hidden;
}

.item-text {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-btn-ui {
    width: 100%;
    height: 46px;
    border-radius: 23px;
    background: transparent;
    border: 1.8px solid var(--primary-purple);
    color: var(--primary-purple);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.action-btn-ui:hover, .action-btn-ui:active {
    background: var(--bg-subtle);
}

.empty-state-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    margin-top: 10px;
    margin-bottom: 20px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.empty-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.empty-state-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 340px;
}

.filter-chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    width: 100% !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
}

.chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.chip.active {
    background: var(--primary-purple);
    color: #FFFFFF;
    border-color: var(--primary-purple);
}

.eq-band-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
}

.eq-band-col span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
}

.eq-slider {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    height: 110px;
    width: 14px;
    accent-color: var(--primary-purple);
    cursor: pointer;
}

.library-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    width: 100% !important;
}

.library-card-ui {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.06);
    cursor: pointer;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
    animation: musicCardSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) ease-out;
}

@keyframes musicCardSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.library-card-ui:hover {
    transform: translateY(-2px) scale(1.008);
    border-color: var(--primary-purple);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.16);
}

.library-card-ui:active {
    transform: scale(0.97) !important;
}

.library-card-ui.active-playing-card {
    background: var(--bg-hover);
    border-color: var(--primary-purple);
    box-shadow: 0 8px 26px rgba(124, 58, 237, 0.22);
}

.library-card-ui.active-playing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4.5px;
    height: 100%;
    background: var(--purple-gradient);
    border-radius: 4px 0 0 4px;
}

.card-play-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--purple-gradient);
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.card-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5);
}

.card-play-btn:active {
    transform: scale(0.9) !important;
}

.metrics-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

.lib-info h4,
.player-title,
#playerSongTitle,
#miniSongTitle,
.queue-item h5,
.library-card-ui h4 {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

.lib-info h4 {
    font-size: 14px !important;
    font-weight: 700 !important;
}

.lib-info p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.profile-card-ui {
    background: var(--bg-card);
    border-radius: 28px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100% !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.profile-avatar-large {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)), linear-gradient(135deg, #A855F7, #EC4899, #F59E0B);
    background-origin: border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.25);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-avatar-large:active {
    transform: scale(0.92);
}

.profile-name {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.profile-handle {
    font-size: 13px;
    color: #A855F7;
    font-weight: 700;
    margin-top: 3px;
}

.profile-bio {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 6px;
}

/* iOS Translucent Glass Stats Summary Pill Bar */
.profile-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    width: 100% !important;
    background: var(--bg-subtle) !important;
    border-radius: 20px !important;
    padding: 14px 8px !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
}

.stat-col {
    position: relative;
    transition: transform 0.15s ease;
}

.stat-col:active {
    transform: scale(0.92);
}

.stat-col + .stat-col::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border-color);
}

.stat-col h4 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.stat-col p {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

/* iOS Segmented Control Tab Switcher */
.profile-tabs-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    background: var(--bg-subtle) !important;
    padding: 5px !important;
    border-radius: 18px !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 18px !important;
    box-sizing: border-box !important;
}

.profile-tabs-row .theme-btn {
    border: none !important;
    border-radius: 14px !important;
    height: 38px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    background: transparent !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.profile-tabs-row .theme-btn.active {
    background: var(--bg-card) !important;
    color: #A855F7 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}
    box-shadow: var(--shadow-soft);
    width: 100% !important;
    box-sizing: border-box !important;
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border: 3px solid var(--primary-purple);
    position: relative;
    cursor: pointer;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.profile-handle {
    font-size: 13px;
    color: var(--primary-purple);
    font-weight: 600;
    margin-top: 2px;
}

.profile-bio {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 20px;
}

.profile-stats-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.stat-col h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-col p {
    font-size: 12px;
    color: var(--text-muted);
}

.settings-theme-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.settings-theme-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.theme-options-row {
    display: flex;
    gap: 10px;
    width: 100% !important;
}

.theme-btn {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.theme-btn.active {
    background: var(--bg-subtle);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.btn {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-purple);
    border: 1.5px solid var(--primary-purple);
}

.btn-sm {
    height: 42px;
    max-width: 160px;
}

/* IPHONE / IOS STYLE TRANSLUCENT GLASS BOTTOM NAV DOCK */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100% !important;
    max-width: 480px;
    height: calc(64px + env(safe-area-inset-bottom, 12px));
    padding-bottom: env(safe-area-inset-bottom, 12px);
    background: rgba(18, 18, 22, 0.85);
    backdrop-filter: blur(28px) saturate(210%);
    -webkit-backdrop-filter: blur(28px) saturate(210%);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
    border-top: 0.5px solid rgba(255, 255, 255, 0.15);
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    z-index: 1000;
    box-sizing: border-box !important;
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.88);
    border-top: 0.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8E8E93;
    font-size: 10.5px;
    font-weight: 500;
    gap: 3px;
    position: relative;
    width: 64px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:active {
    transform: scale(0.85);
}

.nav-item svg {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease;
}

.nav-item.active {
    color: #A855F7;
    font-weight: 700;
}

[data-theme="light"] .nav-item.active {
    color: #7C3AED;
}

.nav-item.active svg {
    transform: scale(1.1) translateY(-1px);
    filter: drop-shadow(0 3px 8px rgba(168, 85, 247, 0.5));
}

.active-indicator {
    position: absolute;
    bottom: -5px;
    width: 6px;
    height: 6px;
    background: #A855F7;
    border-radius: 50%;
    box-shadow: 0 0 10px #A855F7;
}

.nav-center-fab {
    position: relative;
    top: -20px;
}

.fab-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--purple-gradient);
    border: 4px solid var(--bg-card);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bg-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    pointer-events: none;
    z-index: 1;
    opacity: var(--wave-opacity);
    overflow: hidden !important;
}

.bg-waves svg {
    width: 100%;
    height: 100%;
}

.music-note {
    position: absolute;
    color: #C084FC;
    opacity: 0.5;
    animation: floatNote 4s ease-in-out infinite alternate;
}

.n1 { left: 10%; bottom: 80px; font-size: 24px; animation-delay: 0s; }
.n2 { left: 30%; bottom: 120px; font-size: 28px; animation-delay: 1s; }
.n3 { right: 25%; bottom: 90px; font-size: 22px; animation-delay: 2s; }
.n4 { right: 10%; bottom: 140px; font-size: 26px; animation-delay: 1.5s; }

@keyframes floatNote {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(15deg); }
}

.ui-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-purple);
    color: #FFFFFF;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 200;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    pointer-events: none;
}

.ui-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* MODAL OVERLAY WRAPPER - STRICT 100% WIDTH FIX */
.video-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.video-modal-content {
    background: var(--bg-card);
    width: 100% !important;
    max-width: 520px;
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 100000 !important;
    box-sizing: border-box !important;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.video-modal-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close-btn {
    background: var(--bg-subtle);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--primary-purple);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.video-controls-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.quality-select-dropdown {
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-accent);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* SPOTIFY-STYLE INLINE COMMENTS PANEL */
.spotify-comments-panel {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-hover));
    border-radius: 20px;
    padding: 16px;
    border: 1.5px solid var(--border-accent);
    box-shadow: var(--shadow-soft);
    margin-top: 14px;
    width: 100% !important;
    box-sizing: border-box !important;
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.spotify-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.inline-comments-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
}

.inline-comment-item {
    background: var(--bg-primary);
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease;
}

.inline-comment-item:hover {
    transform: scale(1.01);
}

.player-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100% !important;
}

@media (min-width: 1024px) {
    .player-main-grid {
        grid-template-columns: 1.6fr 1fr;
    }
}

.player-card-ui {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.player-art-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    background: var(--bg-subtle);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.now-playing-pill {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 15, 18, 0.75);
    backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 10;
}

.art-placeholder-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.player-song-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100% !important;
}

.song-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
}

.player-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.player-artist {
    font-size: 14px;
    color: var(--primary-purple);
    font-weight: 600;
    margin-top: 2px;
}

.verified-badge {
    color: var(--primary-purple);
    font-size: 13px;
    margin-left: 4px;
}

.player-tags-row {
    display: flex;
    gap: 8px;
    width: 100% !important;
}

.tag-pill {
    background: var(--bg-subtle);
    color: var(--primary-purple);
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.player-progress-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    width: 100% !important;
}

.player-seek-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    accent-color: var(--primary-purple);
    cursor: pointer;
}

.time-labels-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 10px 0;
    width: 100% !important;
}

.ctrl-icon-btn {
    background: var(--bg-subtle);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    cursor: pointer;
}

.ctrl-icon-btn:hover {
    transform: scale(1.06);
}

.large-play-btn {
    width: 64px !important;
    height: 64px !important;
}

.player-actions-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.player-act-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary-purple);
    cursor: pointer;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.player-act-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.queue-panel-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.queue-header h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-accent);
    transition: .3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider { background-color: var(--primary-purple); }
input:checked + .toggle-slider:before { transform: translateX(16px); }

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    width: 100% !important;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg-primary);
    cursor: pointer;
    border: 1px solid var(--border-color);
    width: 100% !important;
    box-sizing: border-box !important;
}

.queue-item.active {
    background: var(--bg-subtle);
    border-color: var(--primary-purple);
}

/* BASE MINI PLAYER STYLES */
.bottom-mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 72px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.mini-player-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.mini-art-thumb {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.mini-song-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.mini-song-meta h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-song-meta p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.mini-ctrls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mini-icon-btn {
    background: none;
    border: none;
    color: var(--primary-purple);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mini-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-purple);
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.mini-seek-wrap {
    width: 100%;
    display: flex;
    align-items: center;
}

.mini-player-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .bottom-mini-player {
        left: 260px !important;
        width: calc(100% - 260px) !important;
        max-width: calc(100% - 260px) !important;
        transform: none !important;
    }
}

@media (max-width: 767px) {
    .bottom-mini-player {
        position: fixed !important;
        bottom: calc(66px + env(safe-area-inset-bottom, 12px)) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 20px) !important;
        max-width: 460px !important;
        height: 60px !important;
        border-radius: 20px !important;
        padding: 0 14px !important;
        background: rgba(24, 24, 28, 0.88) !important;
        backdrop-filter: blur(24px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
        border: 0.5px solid rgba(255, 255, 255, 0.18) !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
        z-index: 990 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    [data-theme="light"] .bottom-mini-player {
        background: rgba(255, 255, 255, 0.9) !important;
        border: 0.5px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
    }

    .mini-player-left {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .mini-song-meta {
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
    }

    .mini-song-meta h4 {
        font-size: 13px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 100% !important;
    }

    .mini-song-meta p {
        font-size: 11px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 100% !important;
    }

    .mini-player-center {
        max-width: fit-content;
        flex-shrink: 0;
    }

    .mini-seek-wrap {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
    }

    .mini-seek-wrap .player-seek-slider {
        height: 3px;
        border-radius: 0;
    }

    .mini-player-right input[type="range"],
    .mini-player-right #miniTimeText {
        display: none !important;
    }

    .player-card-ui {
        padding: 16px 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .player-art-box {
        max-width: 260px !important;
        margin: 0 auto !important;
    }

    .song-header-row {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .song-header-row > div {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    #btnPlayerFollow {
        width: auto !important;
        min-width: 76px !important;
        max-width: 95px !important;
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 11.5px !important;
        font-weight: 700 !important;
        border-radius: 16px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .player-title {
        font-size: 16px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }

    .player-artist {
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }

    .app-main-content {
        padding: calc(14px + env(safe-area-inset-top, 24px)) 14px calc(100px + env(safe-area-inset-bottom, 16px)) 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .home-header {
        padding-top: max(8px, env(safe-area-inset-top, 16px)) !important;
    }

    .subpage-header {
        padding-top: max(8px, env(safe-area-inset-top, 16px)) !important;
    }

    .equal-upload-card {
        height: auto !important;
        min-height: 140px !important;
        padding: 16px 14px !important;
    }

    .profile-card-ui {
        padding: 20px 14px !important;
        border-radius: 20px !important;
    }

    .profile-header-top {
        gap: 12px !important;
    }

    .profile-avatar-large {
        width: 72px !important;
        height: 72px !important;
        min-width: 72px !important;
    }

    .profile-name {
        font-size: 17px !important;
    }

    .stat-col h4 {
        font-size: 16px !important;
    }

    .video-modal-content {
        padding: 18px 14px !important;
        max-height: 90vh !important;
        border-radius: 20px !important;
    }

    .search-wrapper input {
        height: 48px !important;
        font-size: 14px !important;
        padding: 10px 42px 10px 42px !important;
    }

    .player-controls-row {
        gap: 8px !important;
        justify-content: space-evenly !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .ctrl-icon-btn {
        width: 38px !important;
        height: 38px !important;
        flex-shrink: 0 !important;
    }

    .large-play-btn {
        width: 52px !important;
        height: 52px !important;
        flex-shrink: 0 !important;
    }

    .player-actions-grid {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 4px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .player-act-btn {
        padding: 6px 2px !important;
        font-size: 10px !important;
        border-radius: 12px !important;
        min-width: 0 !important;
        flex-direction: column !important;
        gap: 2px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .player-act-btn span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        font-size: 10px !important;
        display: block !important;
    }
}

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    touch-action: manipulation;
}

/* SMOOTH GPU-ACCELERATED IOS ANIMATIONS */
.page-container {
    animation: iosSmoothFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes iosSmoothFade {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.library-card-ui, .equal-upload-card, .story-avatar-wrap, .action-btn-ui, .btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease !important;
}

.library-card-ui:active, .equal-upload-card:active {
    transform: scale(0.97) !important;
}

body.auth-mode {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    background-color: var(--bg-primary) !important;
}

body.auth-mode .bottom-mini-player,
body.auth-mode #bottomMiniPlayer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body.auth-mode .app-main-content {
    margin: 0 auto !important;
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
}

#pageAuth {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
}

#pageAuth .profile-card-ui {
    width: 100% !important;
    max-width: 420px !important;
    padding: 24px 16px !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.12) !important;
}

/* RESPONSIVE SONG THREE-DOT CONTEXT MENU & MOBILE BOTTOM SHEET */
.song-context-menu {
    position: fixed !important;
    z-index: 999999 !important;
    width: 220px;
    background: var(--bg-card-blur, var(--bg-card));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: menuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.song-ctx-item {
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.song-ctx-item:hover, .song-ctx-item:active {
    background: var(--bg-subtle);
    color: var(--primary-purple);
}

.song-ctx-item + .song-ctx-item {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Bottom-Sheet Overlay */
.song-bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: overlayFadeIn 0.2s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.song-bottom-sheet {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border-radius: 24px 24px 0 0;
    padding: 12px 16px 28px 16px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 4px auto 14px auto;
}

.sheet-header-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-ctx-item:active, .song-ctx-item:hover {
    background: var(--bg-subtle);
    color: var(--primary-purple);
}

.song-ctx-item + .song-ctx-item {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#pageAuth .filter-chips-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
    width: 100% !important;
    overflow-x: hidden !important;
    margin-bottom: 20px !important;
}

#pageAuth .chip {
    font-size: 12.5px !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
}

#pageAuth form,
#pageAuth input,
#pageAuth button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================================================
   PROFESSIONAL RESPONSIVE VIDEO GRID & VIDEO CARDS DESIGN SYSTEM
   ============================================================================ */

.video-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 600px) {
    .video-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 900px) {
    .video-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .video-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
    }
}

/* Professional Video Card Container */
.pro-video-card {
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    cursor: pointer;
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .pro-video-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(124, 58, 237, 0.18);
        border-color: rgba(124, 58, 237, 0.4);
    }

    .pro-video-card:hover .pro-thumb-play-btn {
        transform: scale(1.1);
        background: rgba(124, 58, 237, 0.95) !important;
    }

    .pro-video-card:hover .pro-video-thumb-img {
        transform: scale(1.04);
    }
}

/* 16:9 Thumbnail Frame */
.pro-video-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0D0B18;
    overflow: hidden;
}

.pro-video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Duration Badge Bottom-Right */
.pro-video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.82);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
    z-index: 2;
}

/* Processing Badge for Transcoding Queue */
.pro-video-processing-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Play Icon Overlay */
.pro-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.pro-thumb-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.88);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* Info Section (Avatar + Meta + Menu) */
.pro-video-info-body {
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
}

.pro-creator-avatar-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    font-weight: 800;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.pro-creator-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pro-video-meta-content {
    flex: 1;
    overflow: hidden;
}

/* Max 2 Lines Title with Ellipsis */
.pro-video-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.pro-video-creator-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-purple);
    margin: 0 0 3px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pro-video-stats-row {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Three-dot Options Menu Button */
.pro-video-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 800;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: -2px;
    transition: background 0.15s ease, color 0.15s ease;
}

.pro-video-menu-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* Skeleton Loading State for Video Grid */
.video-card-skeleton {
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skeleton-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-primary) 50%, var(--bg-subtle) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-info {
    padding: 12px 14px;
    display: flex;
    gap: 12px;
}

.skeleton-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-subtle);
    flex-shrink: 0;
}

.skeleton-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: var(--bg-subtle);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================================
   AUTHENTIC YOUTUBE-STYLE VIDEO PLAYER CONTROLS OVERLAY
   ============================================================================ */

.yt-player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

/* Center Big Play/Pause Action Icon */
.yt-center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.yt-player-frame.controls-visible .yt-center-play-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* Bottom Transparent Gradient Controls Overlay */
.yt-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 16px 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

.yt-player-frame.controls-visible .yt-controls-overlay,
.yt-player-frame.paused .yt-controls-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* YouTube Red Progress Timeline */
.yt-timeline-container {
    width: 100%;
    height: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.yt-seek-slider {
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
    transition: height 0.15s ease;
}

.yt-timeline-container:hover .yt-seek-slider {
    height: 6px;
}

.yt-seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #FF0000;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.8);
    transition: transform 0.15s ease;
}

.yt-timeline-container:hover .yt-seek-slider::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Controls Bar Row */
.yt-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.yt-ctrl-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yt-btn-icon {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.yt-btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.yt-time-text {
    color: #DDDDDD;
    font-size: 12px;
    font-weight: 600;
    font-family: Roboto, -apple-system, sans-serif;
    letter-spacing: 0.2px;
}

/* YouTube Settings Flyout Popup Menu */
.yt-settings-popup {
    position: absolute;
    bottom: 56px;
    right: 16px;
    background: rgba(28, 28, 28, 0.95);
    border-radius: 12px;
    padding: 10px;
    width: 210px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    z-index: 10;
    display: none;
    flex-direction: column;
    gap: 8px;
    animation: ytPopUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ytPopUp {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.yt-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #FFFFFF;
    font-weight: 700;
}

.yt-settings-select {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

/* ============================================================================
   AUTHENTIC YOUTUBE-STYLE WATCH PAGE LAYOUT & RESPONSIVE GRID
   ============================================================================ */

.watch-page-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 900px) {
    .watch-page-layout {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 24px;
        align-items: flex-start;
    }
}

@media (min-width: 1200px) {
    .watch-page-layout {
        grid-template-columns: 1fr 380px;
        gap: 28px;
    }
}

.watch-main-column {
    width: 100% !important;
    display: flex;
    flex-direction: column;
}

.watch-suggested-column {
    width: 100% !important;
    display: flex;
    flex-direction: column;
}

.watch-details-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 18px;
    box-shadow: var(--shadow-card);
}

.watch-suggested-card {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    padding: 8px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.watch-suggested-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.watch-suggested-thumb {
    width: 130px;
    min-width: 130px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
    flex-shrink: 0;
}

.watch-suggested-meta {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.watch-suggested-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watch-suggested-artist {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary-purple);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watch-suggested-stats {
    font-size: 10.5px;
    color: var(--text-muted);
    margin: 0;
}