/* =========================================
   PUBLIC/ASSETS/CSS/STYLE.CSS (FINAL VIP VERSION)
   Developed for Jharkhand Beats (Webphp)
========================================== */

/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #10b981; /* Emerald Green */
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.frontend-body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 2. TOP NAVIGATION BAR --- */
.topbar {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo a {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.text-primary { color: var(--primary); }

.search-box form {
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    width: 320px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 10px 18px;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.search-box button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.3s;
}

.search-box button:hover {
    background-color: #059669;
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.desktop-nav a {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--primary);
}

/* Mobile Menu Elements */
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

.mobile-nav {
    display: none;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav ul {
    list-style: none;
    padding: 10px 0;
}

.mobile-nav li a {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* --- 3. MAIN LAYOUT & HEADINGS --- */
.main-wrapper {
    min-height: 80vh;
    padding: 30px 15px;
}

.content-layout { 
    display: flex; 
    gap: 30px; 
    margin-top: 10px; 
}

.main-section { 
    flex: 1; 
}

.sidebar-section { 
    width: 320px; 
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 25px;
    color: #fff;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* --- 4. SONG GRID & PREMIUM CARDS --- */
.song-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 20px; 
}

.song-card { 
    background: linear-gradient(145deg, #1e293b, #131c2b);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px; 
    padding: 12px; 
    text-align: center; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: block;
}

.song-card:hover { 
    transform: translateY(-8px) scale(1.02); 
    border-color: rgba(16, 185, 129, 0.4); 
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.15);
}

.song-cover { 
    width: 100%; 
    aspect-ratio: 1; 
    border-radius: 10px; 
    overflow: hidden; 
    margin-bottom: 12px; 
    background: var(--bg-dark); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.song-card:hover .song-cover img {
    transform: scale(1.05);
}

.song-cover i { 
    font-size: 40px; 
    color: var(--text-muted); 
}

.song-title { 
    font-size: 15px; 
    color: #f8fafc; 
    font-weight: 700; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    margin-bottom: 5px; 
    letter-spacing: 0.3px;
}

.song-artist { 
    font-size: 12px; 
    color: var(--primary); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    text-transform: uppercase;
    font-weight: 600;
}

/* --- 5. DYNAMIC PREMIUM SIDEBAR --- */
.frontend-sidebar {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: sticky;
    top: 90px;
}

.widget-title { 
    color: white; 
    margin-bottom: 20px; 
    font-size: 18px; 
    font-weight: 800; 
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.widget-list { 
    list-style: none; 
    padding: 0;
}

.widget-list li { 
    margin-bottom: 10px; 
}

.widget-list a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #cbd5e1;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.widget-list a i { 
    color: var(--primary); 
    margin-right: 12px; 
    font-size: 16px; 
}

.widget-list a:hover {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--primary);
    color: #ffffff;
    transform: translateX(6px);
}

/* --- 6. AUDIO PLAYER & SHARE BUTTONS (SONG PAGE) --- */
audio {
    border-radius: 25px !important;
    background-color: #f1f3f4;
    height: 45px;
}

audio::-webkit-media-controls-panel {
    background-color: #1e293b;
    color: #fff;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: #fff;
}

.share-buttons a {
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-buttons a:hover {
    transform: translateY(-5px) scale(1.15);
}

/* --- 7. FOOTER --- */
.frontend-footer { 
    text-align: center; 
    padding: 25px; 
    background-color: var(--bg-panel); 
    border-top: 1px solid var(--border-color); 
    color: var(--text-muted); 
    font-size: 13px; 
}

.frontend-footer span {
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 1px;
}

/* =========================================
   8. STRICT MOBILE RESPONSIVENESS (100% FIXED)
========================================== */
@media screen and (max-width: 768px) {
    /* Hide Desktop Elements */
    .desktop-nav, .search-box { 
        display: none !important; 
    }
    
    /* Show Mobile Hamburger */
    .mobile-menu-toggle { 
        display: block !important; 
    }
    
    /* Reorder Layout: Main on top, Sidebar below */
    .content-layout { 
        flex-direction: column !important; 
        gap: 20px !important;
    }
    
    .main-section { 
        width: 100% !important; 
        order: 1 !important; 
    }
    
    .sidebar-section { 
        width: 100% !important; 
        order: 2 !important; 
    }
    
    .frontend-sidebar {
        position: static !important;
    }
    
    /* 🚀 FORCE EXACTLY 2 COLUMNS ON MOBILE 🚀 */
    .song-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important; 
    }
    
    .song-card { 
        padding: 8px !important; 
        border-radius: 10px !important; 
    }
    
    .song-cover {
        border-radius: 6px !important;
        margin-bottom: 8px !important;
    }
    
    /* Fix text overflow for small mobile screens */
    .song-title { 
        font-size: 13px !important; 
        margin-bottom: 3px !important; 
        white-space: normal !important; 
        display: -webkit-box !important; 
        -webkit-line-clamp: 2 !important; 
        -webkit-box-orient: vertical !important; 
        line-height: 1.3 !important;
    }
    
    .song-artist { 
        font-size: 11px !important; 
    }
}

@media screen and (max-width: 380px) {
    /* For extra small devices like older iPhones */
    .song-grid { 
        gap: 8px !important; 
    }
    .brand-logo a {
        font-size: 18px !important;
    }
}