/* --- Global Styles & Variables --- */
:root {
    --primary-color: #1abc9c; /* Turquoise from original design */
    --primary-hover: #16a085;
    --background-color: #ecf0f1;
    --widget-background: #ffffff;
    --border-color: #e1e1e1;
    --text-color: #333;
    --text-light: #777;
    --font-family: Arial, Helvetica, sans-serif;
    --border-radius: 4px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    padding-bottom: 70px; /* Space for the player bar */
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style-type: none;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* ===================================================================== */
/* === START: MOBILE & RESPONSIVE STYLES (KUCHAYTIRILGAN VERSIYA) === */
/* ===================================================================== */

/* --- 1. Mobil Elementlarni Katta Ekranda Majburan Yashirish --- */

/* Katta ekranda bu elementlar HECH QACHON ko'rinmasligi kerak */
.mobile-menu,
.menu-overlay,
.hamburger-btn {
    display: none !important; /* !important qoidasi boshqa stillarni "bosib qo'yadi" */
}


/* --- 2. Moslashuvchanlik Qoidalari (Breakpoint) --- */

/* Planshetlar uchun kichik o'zgarishlar */
@media (max-width: 1024px) {
    .song-grid {
        grid-template-columns: 1fr;
    }
    .progress-and-volume {
        max-width: 350px;
    }
}

/* Faqat Mobil Qurilmalar Uchun (768px dan kichik ekranlar) */
@media (max-width: 768px) {
    /* -- Sarlavha (Header) -- */
    .header-container {
        justify-content: space-between;
    }
    /* Katta ekran uchun mo'ljallangan elementlarni yashirish */
    .search-bar,
    .header-container .btn-primary {
        display: none !important;
    }

    /* "Hamburger" tugmasini ko'rsatish */
    .hamburger-btn {
        display: block !important; /* Majburan ko'rsatish */
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--text-color);
        padding: 0 10px;
        z-index: 1002;
    }

    /* -- Mobil menyuni ishga tushirish -- */
    .mobile-menu {
        display: flex !important; /* Menyuni blokini ko'rsatish */
        position: fixed;
        top: 0;
        left: -100%; /* Dastlab ekrandan tashqarida */
        width: 280px;
        height: 100%;
        background-color: var(--widget-background);
        z-index: 1005;
        transition: left 0.3s ease-in-out;
        flex-direction: column;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    /* JavaScript bu klassni qo'shganda menyu ekranga chiqadi */
    .mobile-menu.open {
        left: 0;
    }

    .menu-overlay {
        display: block !important; /* Orqa fonni ko'rsatish */
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1004;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .menu-overlay.open {
        visibility: visible;
        opacity: 1;
    }

    /* -- Asosiy Qism va Yon Panel -- */
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none !important; /* Katta ekran yon panelini majburan yashirish */
    }

    /* -- Pleyer Paneli -- */
     .player-container {
        flex-wrap: wrap; justify-content: center; gap: 10px;
    }
    .track-info { width: 100%; text-align: center; }
}

/* --- Mobil menyu ichidagi elementlarning stillari (o'zgarishsiz) --- */
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.mobile-menu-header .logo a { font-size: 24px; }
.close-menu-btn { background: none; border: none; font-size: 32px; font-weight: bold; color: var(--text-light); cursor: pointer; }
.mobile-menu-content { padding: 20px 15px; overflow-y: auto; }
.widget-title-mobile { font-size: 16px; font-weight: bold; margin-top: 20px; margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; text-transform: uppercase; }
.widget-title-mobile:first-child { margin-top: 0; }
.widget-title-mobile i { margin-right: 8px; }
.search-bar-mobile { display: flex; width: 100%; margin-bottom: 25px; }
.search-bar-mobile form { display: contents; }
.search-bar-mobile input { flex-grow: 1; width: auto; padding: 9px 12px; border: 1px solid var(--border-color); border-right: none; border-radius: var(--border-radius) 0 0 var(--border-radius); outline: none; }
.search-bar-mobile input:focus { border-color: var(--primary-color); }
.search-bar-mobile button { padding: 0 15px; border: 1px solid var(--primary-color); background-color: var(--primary-color); color: white; border-radius: 0 var(--border-radius) var(--border-radius) 0; cursor: pointer; flex-shrink: 0; }

/* =================================================================== */
/* === END: MOBILE & RESPONSIVE STYLES (KUCHAYTIRILGAN VERSIYA) === */
/* =================================================================== */

.btn {
    padding: 8px 15px;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-color);
    border-color: #ddd;
}
.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* --- Header --- */
.site-header {
    background-color: var(--widget-background);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.header-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
}

.search-bar {
    flex-grow: 1;
    max-width: 450px;
    display: flex;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
}
.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 0 15px;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
}

/* --- Main Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 20px;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: var(--widget-background);
    padding: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    text-transform: uppercase;
}
.widget-title i {
    margin-right: 8px;
}

.category-list li a {
    display: block;
    padding: 8px 0;
    color: var(--text-color);
    font-size: 14px;
    border-bottom: 1px solid #f2f2f2;
}
.category-list li:last-child a {
    border-bottom: none;
}

.top-list li a {
    display: flex;
    padding: 8px 0;
    gap: 10px;
    border-bottom: 1px solid #f2f2f2;
}
.top-list li:last-child a {
    border-bottom: none;
}
.top-list li p {
    font-size: 14px;
    margin: 0;
    line-height: 1.3;
}
.top-list li small {
    font-size: 12px;
    color: var(--text-light);
}

/* --- Content Area --- */
.content {
    background-color: var(--widget-background);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-link {
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    border-bottom: none;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.tab-link.active {
    background-color: var(--widget-background);
    border-bottom: 1px solid var(--widget-background);
    position: relative;
    bottom: -1px;
    font-weight: bold;
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.song-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}
.song-item:hover {
    background-color: #f9f9f9;
}

.song-item.playing {
    background-color: #e8f8f5;
}
.song-item.playing .song-title {
    color: var(--primary-color);
}

.song-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.play-btn-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-btn-sm:hover {
    background-color: var(--primary-color);
    color: white;
}

.song-title {
    font-size: 14px;
    display: block;
}
.song-artist {
    color: var(--text-light);
    font-size: 12px;
}

.song-duration {
    font-size: 13px;
    color: var(--text-light);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.page-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
}
.page-description h3 {
    color: var(--text-color);
    font-size: 16px;
}

/* --- Footer --- */
.site-footer {
    background-color: #34495e;
    color: #bdc3c7;
    padding: 20px 0;
    font-size: 13px;
}

.footer-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer .logo a { color: white; }
.footer-text a { color: #ecf0f1; }
.social-links a { color: white; font-size: 18px; margin-left: 12px; }

.footer-bottom {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #46627f;
    font-size: 12px;
    color: #95a5a6;
}

/* --- Promo Card for Song Page --- */
.promo-card {
    display: flex;
    align-items: flex-start; /* Ikonkani matnning birinchi qatoriga to'g'rilaydi */
    gap: 15px; /* Ikona va matn orasidagi masofa */
    background-color: #f2f8fa; /* Orqa fon rangi */
    border: 1px solid #d6eaf8; /* Chegara chizig'i */
    border-left: 4px solid var(--primary-color); /* Chapdagi asosiy rangli chiziq */
    padding: 15px;
    margin-bottom: 20px; /* Pastki qismdagi masofa */
    border-radius: var(--border-radius);
}

.promo-card i {
    font-size: 28px; /* Ikona o'lchami */
    color: var(--primary-color); /* Ikona rangi */
    margin-top: 2px; /* Ikonkani matnga nisbatan ozgina pastga surish */
    flex-shrink: 0; /* Ekran kichrayganda ikonka siqilib qolmasligi uchun */
}

.promo-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6; /* Qatorlar orasidagi masofa */
    color: #555;
}

.promo-card p strong {
    color: var(--text-color);
}

/* --- Player Bar --- */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f5f5f5;
    border-top: 1px solid #ccc;
    z-index: 1000;
}
.player-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.track-info {
    width: 250px;
}
.track-info span { 
    display: block;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-info small { color: var(--text-light); font-size: 12px; }

.player-controls-main {
    display: flex;
    align-items: center;
    gap: 15px;
}
.player-controls-main button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
}
.player-controls-main button:hover { color: #000; }

.player-controls-main .play-main {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 50%;
    font-size: 16px;
}
.player-controls-main .play-main:hover { background-color: #eee; }

.progress-and-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    margin-left: 20px;
    max-width: 500px;
}

.time-current, .time-total {
    font-size: 12px;
    color: var(--text-light);
}

input[type="range"] {
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    flex-grow: 1;
}

/* Progress Bar Styles */
input[type="range"].progress-bar {
    height: 10px;
}
input[type="range"].progress-bar::-webkit-slider-runnable-track {
    background: #ddd;
    height: 4px;
    border-radius: 2px;
}
input[type="range"].progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    margin-top: -4px;
}

/* Volume Slider Styles */
.volume-slider {
    max-width: 80px;
}
input[type="range"].volume-slider::-webkit-slider-runnable-track {
    background: #ccc;
    height: 3px;
    border-radius: 2px;
}
input[type="range"].volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    margin-top: -3.5px;
}

#volume-btn {
    background: none; border: none; cursor: pointer; color: #555;
}

/* --- Song Detail Page --- */
.breadcrumbs {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.song-page-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}
.song-details-card {
    display: flex;
    gap: 20px;
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.album-art {
    width: 150px;
    height: 150px;
    background-color: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    color: #ced4da;
    flex-shrink: 0;
}
.song-meta-details p { margin-bottom: 6px; font-size: 14px; }
.listen-bar { padding: 10px; border: 1px solid var(--border-color); margin-bottom: 20px; }
.lyrics-section p { font-size: 15px; line-height: 1.7; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .song-grid { grid-template-columns: 1fr; }
    .progress-and-volume { max-width: 350px; }
}

@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .search-bar { order: 3; width: 100%; margin: 0; }
    .main-layout { grid-template-columns: 1fr; }
    .player-container { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .track-info { width: 100%; text-align: center; }
    .progress-and-volume { width: 100%; margin-left: 0; }
}
