﻿/* ========================================
   MOBILE-SPECIFIC STYLES
   ======================================== */

@media (max-width: 768px) {

    /* ========================================
     MOBILE NAVIGATION BAR (BOTTOM)
     ======================================== */

    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        /* Slightly more compact */
        background: rgba(255, 255, 255, 0.85);
        /* More glass-like */
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 10px);
        /* Better safe area handling */
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 1000;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #9CA3AF;
        font-size: 0.75rem;
        /* Slightly larger */
        font-weight: 600;
        /* Bolder for premium feel */
        gap: 4px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex: 1;
        position: relative;
    }

    /* Active State Background Pill */
    .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 4px;
        width: 48px;
        height: 32px;
        background: rgba(37, 99, 235, 0.1);
        border-radius: 20px;
        opacity: 0;
        transform: scale(0.8);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-nav-item.active {
        color: #2563eb;
    }

    .mobile-nav-item.active::before {
        opacity: 1;
        transform: scale(1);
    }

    .mobile-nav-item.active .mobile-nav-icon svg {
        transform: translateY(-2px);
        /* Slight bounce up */
    }

    .mobile-nav-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease;
        z-index: 1;
    }

    .mobile-nav-icon svg {
        width: 100%;
        height: 100%;
        transition: transform 0.3s ease;
    }

    .mobile-nav-item:active {
        transform: scale(0.95);
        /* Taptic feedback simulation */
    }

    /* ========================================
     MOBILE HEADER
     ======================================== */

    .mobile-header {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(37, 99, 235, 0.95);
        backdrop-filter: blur(15px);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        z-index: 900;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
    }

    .mobile-header-logo {
        font-size: 1.25rem;
        font-weight: 800;
        color: white;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .mobile-header-logo span {
        color: white;
        /* or slight opacity/shade */
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-header-title {
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        margin: 0;
    }

    .mobile-header .btn {
        color: white;
    }

    .mobile-header .btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* ========================================
     PREMIUM MOBILE HERO
     ======================================== */

    .mobile-hero {
        padding: 100px 20px 40px;
        text-align: center;
        background: url('https://picsum.photos/seed/music_studio/800/600') center/cover, linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
        background-blend-mode: overlay;
        color: white;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.4);
        position: relative;
        overflow: hidden;
        margin-bottom: 30px;
    }

    .mobile-hero h1 {
        font-size: 2rem;
        font-weight: 700;
        /* Professional Bold */
        color: #ffffff;
        margin-bottom: 12px;
        line-height: 1.2;
        letter-spacing: -0.02em;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-hero p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 1);
        /* Pure White */
        margin-bottom: 24px;
        line-height: 1.5;
        font-weight: 500;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    }

    .mobile-search-container {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }

    /* Hero Search (Dark Background) */
    .mobile-search-container .mobile-search-input {
        background: transparent;
        border: none;
        color: white;
        width: 100%;
        font-size: 1rem;
        outline: none;
    }

    .mobile-search-container .mobile-search-input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }

    /* Gallery Search (Light Background) */
    .mobile-search {
        padding: 12px 20px;
        background: #FFFFFF;
        position: sticky;
        top: 60px;
        z-index: 800;
        border-bottom: 1px solid #F3F4F6;
    }

    .mobile-search .mobile-search-input {
        width: 100%;
        height: 44px;
        background: #F3F4F6;
        border: none;
        border-radius: 12px;
        padding: 0 16px 0 44px;
        font-size: 0.95rem;
        color: #111827;
        outline: none;
        /* Search Icon as Background */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 20px;
    }

    /* ========================================
     MOBILE MOOD ROW (Horizontal)
     ======================================== */

    .mobile-mood-filters {
        display: flex;
        gap: 10px;
        padding: 10px 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: #FFFFFF;
    }

    /* Mood Chips (Pill styling) */
    .mood-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 20px;
        background: #F3F4F6;
        color: #4B5563;
        border-radius: 99px;
        /* Pill */
        font-size: 0.9rem;
        font-weight: 500;
        white-space: nowrap;
        text-decoration: none;
        transition: all 0.2s;
    }

    .mood-chip.active {
        background: #2563eb;
        color: white;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    }

    .mobile-mood-card {
        flex: 0 0 140px;
        height: 100px;
        /* Reduced height for better proportion */
        border-radius: 16px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    /* Icon positioning fix */
    .mobile-mood-icon {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 32px;
        /* Increased size */
        height: 32px;
        opacity: 0.9;
    }

    /* ========================================
     MOBILE MUSIC LIST (Updated)
     ======================================== */

    .music-list-container {
        padding: 0 20px 100px 20px;
        /* Bottom padding for nav */
    }

    .music-card-mobile {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        border-bottom: 1px solid #F3F4F6;
        cursor: pointer;
        transition: background 0.2s;
        background: #FFFFFF;
    }

    .music-card-mobile:active {
        background: #F9FAFB;
    }

    .music-card-artwork {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        background: linear-gradient(135deg, #E0E7FF, #C7D2FE);
        flex-shrink: 0;
        background-size: cover;
        background-position: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    .music-card-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }

    .music-card-title {
        font-size: 1rem;
        /* 16px */
        font-weight: 600;
        color: #111827;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }

    .music-card-meta {
        font-size: 0.85rem;
        /* 13.6px */
        color: #6B7280;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .music-card-actions {
        display: flex;
        align-items: center;
    }

    /* Small play button styling */
    .btn-sm-play {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #EFF6FF;
        /* Blue 50 */
        color: #2563eb;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        transition: all 0.2s;
    }

    .btn-sm-play:active {
        background: #DBEAFE;
        /* Blue 100 */
        transform: scale(0.95);
    }

    /* ========================================
     UTILITIES
     ======================================== */

    .desktop-only {
        display: none !important;
    }

    .page-wrapper {
        padding-bottom: 100px;
        /* Ensure content clears nav */
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}