/*
    मॉडर्न, क्लीन और रेस्पॉन्सिव स्टाइलिंग
    CSS Variables for Theme Handling and High Contrast
*/

:root {
    /* -- Light Mode Defaults -- */
    --primary-color: #5B4FDD; 
    --secondary-color: #333333;      
    --text-color: #1a1a1a;           /* मुख्य टेक्स्ट: बेस्ट ब्लैक (Light Mode) */
    --background-color: #f4f7f6;    
    --card-background: #ffffff;      
    
    --subtle-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); 
    --border-radius: 8px;
}

/* --- Dark Mode Variables (High Contrast) --- */
body.dark-mode {
    --primary-color: #9287ff; 
    --secondary-color: #f0f0f0;      
    --text-color: #f0f0f0;           /* मुख्य टेक्स्ट: बेस्ट व्हाइट (Dark Mode) */
    --background-color: #121212;    
    --card-background: #1e1e1e;      
    
    --subtle-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); 
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color); 
    transition: background-color 0.3s, color 0.3s; 
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: #4338a8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* New: Heading for Home Page */
.page-heading {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-top: 30px;
}

/* --- कस्टम सर्च हेडिंग स्टाइल (आपके स्क्रीनशॉट के अनुसार) --- */
.custom-search-heading {
    font-size: 2em;
    font-weight: 700;
    color: var(--card-background); /* Dark background पर Light Text */
    margin-bottom: 25px;
    padding-top: 30px;
    text-align: center;
    background-color: var(--primary-color);
    padding: 20px 0;
    /* कंटेनर के किनारे तक फैलाने के लिए */
    margin: -20px -20px 30px -20px; 
}


/* --- Custom Search Input Styling --- */
.search-input-container {
    margin: 30px auto 40px auto;
    max-width: 600px;
}

#liveSearchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid var(--primary-color); 
    border-radius: var(--border-radius);
    background: var(--card-background); 
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#liveSearchInput:focus {
    border-color: #4338a8;
    box-shadow: 0 0 0 3px rgba(91, 79, 221, 0.2); 
}

/* Dark Mode Search Input Adjustments */
body.dark-mode #liveSearchInput {
    background-color: #1e1e1e;
    border: 2px solid var(--primary-color);
}


/* --- Header / Menu Bar --- */
.main-header {
    background: var(--card-background);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--subtle-shadow); 
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--secondary-color); 
}

.logo strong {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* --- Theme Toggle Button Styling --- */
.theme-toggle {
    background-color: var(--primary-color);
    color: var(--card-background);
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin-right: auto;
    margin-left: 20px;
    white-space: nowrap; 
}

.theme-toggle:hover {
    background-color: #4338a8;
}

/* --- Hamburger Button Styling --- */
.hamburger {
    display: none; 
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001;
}

.bar {
    background-color: var(--secondary-color);
    display: block;
    width: 100%;
    height: 3px;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* --- Home Page Grid (Text Only) --- */
.song-grid {
    display: grid;
    /* 3 कॉलम, हर एक कम से कम 280px चौड़ा */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.song-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--subtle-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
    border-left: 5px solid var(--primary-color);
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); 
}

.song-card a {
    display: block;
    color: var(--text-color); 
    padding: 20px;
    min-height: 120px;
}

.song-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-color); 
    margin: 0 0 5px 0;
}

.artist-name {
    color: var(--text-color);
    opacity: 0.8; /* FIX: Improved visibility */
    margin: 0;
    font-size: 0.9em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--text-color); /* FIX: Changed to var(--text-color) for better contrast */
}

.read-more {
    display: block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9em;
}


/* --- Post Page (Style intact, for reference) --- */

.post-container {
    max-width: 800px;
    padding-top: 50px;
}

.post-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color); 
    margin-bottom: 10px;
}

.post-meta {
    color: var(--text-color); 
    font-size: 1em;
    margin-bottom: 15px; 
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 15px;
}

.category-tags {
    margin-bottom: 30px; 
    display: flex;
    flex-wrap: wrap; 
    gap: 10px;
}

.category-tags .tag {
    background: var(--card-background); 
    color: var(--primary-color); 
    padding: 5px 12px;
    border-radius: 20px; 
    font-size: 0.9em;
    font-weight: 500;
    text-transform: capitalize;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    border: 1px solid var(--primary-color);
}

.category-tags .tag:hover {
    background: var(--primary-color);
    color: var(--card-background); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lyrics-body h2 {
    font-size: 1.5em;
    color: var(--text-color); 
    margin-bottom: 15px;
    border-left: 5px solid var(--primary-color); 
    padding-left: 15px; 
}

/* 🔥 MODIFIED: Lyrics Block Centering and Border Removal (Final and Corrected) */
.lyrics-text {
    font-family: 'Noto Serif', serif; 
    white-space: pre-wrap; 
    font-size: 1.15em; 
    line-height: 1.9;  
    color: var(--text-color); 
    
    /* --- Lyrics Alignment and Centering (Fixes Hindi/English Alignment) --- */
    width: fit-content;            /* Block ki चौड़ाई content jitni ho */
    margin-left: auto;             /* Block ko center karein */
    margin-right: auto;
    text-align: left;              /* Lines ko left-aligned rakhein */
    direction: ltr;                /* Ensures correct LTR script handling for Hindi */
    
    /* --- Border Removal --- */
    border: none;                  
    outline: none;                 
}

.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    margin-top: 30px; 
    border-radius: var(--border-radius);
    box-shadow: var(--subtle-shadow);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.9em;
    color: #999; 
    font-style: italic;
    text-align: center;
}


/* --- Footer (फिक्स्ड डार्क लुक) --- */
.main-footer {
    background: #333333; 
    color: #f4f4f4; 
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    font-size: 0.9em;
}

.footer-links a {
    color: #a0a0a0;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* --- 📱 Media Queries for Responsiveness (Mobile Menu) --- */

@media (max-width: 768px) {
    
    .container {
        padding: 10px; 
    }
    
    .page-heading {
        font-size: 1.5em;
        padding-top: 15px;
    }
    
    /* Custom Search Heading Adjustments */
    .custom-search-heading {
        font-size: 1.5em;
        padding: 15px 10px;
        margin: -10px -10px 20px -10px;
    }
    
    /* Search Input Container Adjustments */
    .search-input-container {
        max-width: 100%;
        margin: 20px auto 30px auto;
    }

    #liveSearchInput {
        padding: 12px 15px;
        font-size: 1em;
    }


    /* Header/Menu Bar Adjustment */
    .main-header {
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 15px 20px;
    }
    
    .logo {
        margin-bottom: 0;
    }
    
    .theme-toggle {
        margin-right: 10px;
        margin-left: 10px;
        padding: 6px 12px;
    }

    /* Hamburger Button visibility */
    .hamburger {
        display: block; 
    }
    
    /* Nav Menu for slide-out mobile menu */
    .main-header nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%; 
        height: 100%;
        background-color: var(--card-background); 
        box-shadow: var(--subtle-shadow);
        transform: translateX(100%); 
        padding-top: 80px; 
        transition: transform 0.3s ease-in-out, background-color 0.3s;
    }
    
    /* Show menu */
    .main-header nav.active {
        transform: translateX(0); 
    }

    .nav-links {
        flex-direction: column; 
        width: 100%;
        padding: 20px;
    }

    .nav-links li {
        margin: 5px 0; 
        width: 100%;
        text-align: left; 
    }
    
    .nav-links a {
        padding: 15px 10px; 
        border-bottom: none !important;
        font-size: 1.1em;
    }
    
    /* Hamburger Icon Animation */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Song Grid Adjustments for Mobile */
    .song-grid {
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    /* Post Page Adjustments */
    .post-title {
        font-size: 2em; 
    }
}

/* Smaller Screens/Large Mobile (480px) */
@media (max-width: 480px) {
    
    .logo {
        font-size: 1.5em;
    }
    
    h1 {
        font-size: 1.8em;
    }
    .logo {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}
}