/* ============================================
   MAIN STYLESHEET - Abbasov Music
   Professional Music Streaming Platform
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Player page responsive tweaks */
@media (max-width: 640px) {
  .player-hero {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }
  .player-cover {
    max-width: 240px !important;
    margin: 0 auto !important;
  }
  .player-cover .cover-placeholder {
    font-size: 3rem !important;
  }
  .copy-group { flex-wrap: wrap; }
  .copy-input { max-width: 100% !important; width: 100% !important; }
  .player-hero h1 { font-size: 1.8rem !important; }
  .player-hero h2 { font-size: 1.1rem !important; }
}

:root {
    --primary-color: #ff5e3a;
    --secondary-color: #c13584;
    --accent-color: #ff2a68;
    --dark-bg: #181c2f;
    --card-bg: #23263a;
    --border-color: #2d3147;
    --text-primary: #fff;
    --text-secondary: #e0e0e0;
    --button-radius: 12px;
    --shadow: 0 8px 32px rgba(44, 62, 80, 0.15);
    --hero-gradient: linear-gradient(135deg, #ff5e3a 0%, #c13584 100%);
    --overlay: rgba(24,28,47,0.7);
}

body {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    background: #f8f9fa !important;
    color: #222 !important;
    line-height: 1.6;
    min-height: 100vh;
}

/* Global mobile safety: prevent horizontal scroll and scale media */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
}

.navbar-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.navbar-brand a:hover {
    color: var(--secondary-color);
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box form {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--secondary-color);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
}

.mobile-nav-links {
    display: none;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: #222;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.mobile-nav-link:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.mobile-nav-link.active {
    background: var(--primary-color);
    color: #fff;
}

/* Off-canvas sidebar (public site) */
#site-sidebar {
    width: 240px !important;
}

#sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 90;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.genre-list {
    list-style: none;
}

.genre-list li {
    margin-bottom: 0.5rem;
}

.genre-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.genre-link:hover,
.genre-link.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
}

/* Sol yan janrlar menyusu üçün modern kart stil */
.sidebar-genres {
    background: #fff;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
    border: none;
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    width: 240px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.sidebar-genres h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ff5e3a;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
}

.sidebar-genres ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar-genres li {
    font-size: 1.08rem;
    color: #222;
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.2rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.sidebar-genres li:hover {
    background: #f3f4f6;
    color: #ff5e3a;
}

.sidebar-genres li.active {
    background: #ff5e3a;
    color: #fff;
    font-weight: 700;
}

.sidebar-genres a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
}

@media (max-width: 900px) {
    .sidebar-genres {
        width: 100%;
        min-width: 0;
        box-shadow: 0 4px 16px rgba(44,62,80,0.10);
        height: auto;
        border-radius: 18px;
        margin-bottom: 20px;
    }
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   MUSIC GRID
   ============================================ */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.music-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.music-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

.music-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-cover {
    font-size: 4rem;
    opacity: 0.5;
}

.play-btn {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
}

.music-card:hover .play-btn {
    opacity: 1;
    transform: scale(1);
}

.play-btn:hover {
    background: var(--secondary-color);
}

.music-info {
    padding: 1rem;
}

.music-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-info small {
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* ============================================
   VIDEOS GRID
   ============================================ */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.video-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.video-info small {
    color: var(--text-secondary);
}

/* ============================================
   MUSIC LIST
   ============================================ */
.music-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.music-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    transition: background 0.3s;
}

.music-item:hover {
    background: rgba(139, 92, 246, 0.05);
}

.music-item:last-child {
    border-bottom: none;
}

.music-rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.music-details {
    flex: 1;
}

.music-details h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.music-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.music-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.views {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

/* ============================================
   GENRES GRID
   ============================================ */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-top: 40px;
}

.genre-item {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
    border: none;
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
}

.genre-item:hover {
    box-shadow: 0 16px 48px rgba(44, 62, 80, 0.18);
    transform: translateY(-6px) scale(1.03);
}

.genre-link {
    text-decoration: none;
    color: #222;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.genre-icon {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    background: #f3f4f6;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
}

.genre-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #222;
    text-align: center;
}

.genre-item p {
    font-size: 0.98rem;
    color: #555;
    text-align: center;
    margin-bottom: 0.5rem;
}

.genre-item .genre-color {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #eee;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
}

/* ============================================
   PLAYLISTS
   ============================================ */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.playlist-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.playlist-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.playlist-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.playlist-cover {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.playlist-info {
    padding: 1rem;
}

.playlist-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.playlist-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.playlist-info small {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* ============================================
   DETAIL PAGES
   ============================================ */
.music-detail-page,
.playlist-detail-page,
.genre-page {
    animation: fadeIn 0.3s ease-in;
}

.music-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: rgba(139, 92, 246, 0.05);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.music-cover-large {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.music-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-cover-large {
    opacity: 0.5;
}

.music-header-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.music-header-info h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.genre-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.music-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.stat i {
    color: var(--primary-color);
}

.play-btn-large {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.play-btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.music-description {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.music-description h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.music-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Playlist detail layout helpers */
.playlist-header-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: flex-start;
}

/* Actions row (play + share) inside playlist detail items */
.playlist-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Single row inside playlist detail music list */
.playlist-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.search-form input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-form button {
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: var(--secondary-color);
}

.search-info {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.music-cover-small {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-cover-small {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Search results item layout */
.search-result-item {
    width: 100%;
}

.search-result-actions {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .search-result-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.9rem !important;
    }

    .search-result-actions {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* ============================================
   MUSIC PLAYER
   ============================================ */
.music-player {
    background: var(--card-bg);
    border-top: 2px solid var(--border-color);
    padding: 1.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: 1.5rem;
    align-items: center;
}

.player-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.player-btn {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    background: var(--primary-color);
    color: white;
}

.player-info {
    min-width: 0;
}

.player-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-info small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-progress span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 35px;
}

#progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#volume-slider {
    width: 100px;
    height: 4px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#audio-player {
    display: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 3rem;
}

.footer-content p {
    margin: 0.5rem 0;
}

/* ============================================
   BUTTONS & FORMS
   ============================================ */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.8;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
}

.btn-disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    /* Show sidebar toggle on mobile */
    #sidebar-toggle { display: flex !important; }

    /* Make sidebar off-canvas */
    #site-sidebar {
        position: fixed !important;
        top: 64px !important;
        left: -280px !important;
        height: calc(100vh - 64px) !important;
        z-index: 2000 !important;
        transition: left 0.3s ease !important;
        border-radius: 0 16px 16px 0 !important;
    }

    #site-sidebar.open { left: 0 !important; }
    #sidebar-backdrop { display: none; z-index: 1990 !important; }
    #sidebar-backdrop.show { display: block; }

    .navbar-menu { display: none !important; }
    .mobile-nav-links { display: block; margin-bottom: 1rem; }

    /* Put hamburger at top-right */
    .navbar-container { position: relative; }
    #sidebar-toggle {
        position: absolute !important;
        right: 12px !important;
        top: 10px !important;
        z-index: 2100 !important;
    }

    /* Shrink logo area to fit */
    .navbar-brand a {
        font-size: 1.2rem !important;
        gap: 0.5rem !important;
    }
}
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar {
        display: none;
    }

    .music-grid,
    .videos-grid,
    .genres-grid,
    .playlists-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .music-hero {
        grid-template-columns: 200px 1fr;
        gap: 1rem;
    }

    .music-cover-large {
        width: 200px;
        height: 200px;
        font-size: 3rem;
    }

    .music-header-info h1 {
        font-size: 1.8rem;
    }

    .navbar-container {
        gap: 1rem;
        padding: 0 1rem;
    }

    .search-box {
        max-width: 300px;
    }

    .navbar-menu {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
    }

    .music-player {
        grid-template-columns: 1fr;
        padding: 0.75rem 0.75rem !important;
        gap: 0.5rem !important;
    }

    .player-controls {
        order: 2;
        gap: 0.5rem !important;
    }

    .player-info {
        order: 1;
    }

    .player-progress {
        order: 3;
        grid-column: 1 / -1;
    }

    .player-volume {
        display: none;
    }

    .music-grid,
    .videos-grid,
    .playlists-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    /* Genres list: on mobile show exactly 2 columns for better width */
    .genres-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .music-stats {
        gap: 1rem;
    }

    /* Playlist detail: on mobile keep cover + info side by side but with small cover */
    .playlist-header-grid {
        grid-template-columns: 80px 1fr !important;
        gap: 1.5rem !important;
    }

    .playlist-header-grid .hero-cover,
    .playlist-header-grid .playlist-cover-box {
        max-width: 120px;
        margin: 0;
        padding: 16px !important;
    }

    .playlist-cover-box i {
        font-size: 2.6rem !important;
    }

    .playlist-detail-page h1 {
        font-size: 2.1rem !important;
    }

    .playlist-detail-page p {
        font-size: 0.98rem !important;
    }

    /* Genre and playlists list headers */
    .genres-list-page h1,
    .playlists-page h1,
    .genre-page h1 {
        font-size: 2.4rem !important;
    }

    .genres-list-page p,
    .playlists-page p,
    .genre-page p {
        font-size: 1rem !important;
    }

    /* Share actions wrapping inside playlist items */
    .playlist-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    /* Playlist music rows: stack vertically on tablets/mobiles */
    .playlist-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .playlist-row > div:first-child {
        /* index badge */
        align-self: flex-start;
    }

    /* Allow playlist item texts to wrap on mobile so info is fully visible */
    .playlist-row h4,
    .playlist-row p {
        white-space: normal !important;
    }

    /* Constrain playlist detail page to viewport width on mobile */
    .playlist-detail-page,
    .playlist-detail-page section {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .top-music-list {
        gap: 1rem !important;
    }

    .top-music-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-music-info h4,
    .top-music-info p {
        white-space: normal !important;
    }

    .top-music-actions {
        margin-top: 0.8rem;
        align-self: stretch;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
    }

    .navbar-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-box {
        max-width: 100%;
    }

    /* Prevent horizontal overflow from inline paddings */
    section { width: 100% !important; overflow-x: hidden !important; }

    /* Compact player */
    .music-player { padding: 0.5rem 0.5rem !important; gap: 0.5rem !important; }
    .player-btn { width: 34px !important; height: 34px !important; }
    .player-info h4 { font-size: 0.9rem !important; }
    .player-info small { font-size: 0.75rem !important; }
    #progress-bar { height: 3px !important; }
    .player-progress span { font-size: 0.7rem !important; min-width: 32px !important; }
    .player-volume { display: none !important; }

    /* Grids tighter on very small screens */
    .music-grid,
    .videos-grid,
    .genres-grid,
    .playlists-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }

    .music-hero {
        grid-template-columns: 1fr;
    }

    .music-cover-large {
        width: 100%;
        height: auto;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* Tighter header padding on very small screens */
    .genres-list-page section,
    .playlists-page section,
    .genre-page section,
    .playlist-detail-page section {
        padding: 50px 1.2rem !important;
    }

    .genres-list-page h1,
    .playlists-page h1,
    .genre-page h1 {
        font-size: 2rem !important;
    }

    .genres-list-page p,
    .playlists-page p,
    .genre-page p {
        font-size: 0.95rem !important;
    }

    /* Playlist list cards: ensure share buttons don't overflow */
    .playlists-page .playlists-grid > div > div:last-child {
        padding: 1.4rem 1.2rem !important;
    }

    .playlists-page .playlists-grid .share-row,
    .playlists-page .playlists-grid div[style*="display:flex;"] {
        flex-wrap: wrap;
    }

    .playlist-actions {
        width: 100%;
        justify-content: space-between;
    }

    .playlist-actions .share-row {
        flex-wrap: wrap;
    }

    /* Playlist rows: reduce inner padding and gaps on very small screens */
    .playlist-row {
        padding: 1.1rem 1rem !important;
        gap: 0.9rem !important;
    }

    .playlist-detail-page h2 {
        font-size: 1.6rem !important;
    }
}

/* Hero bölməsi */
.home-page {
    width: 100%;
    min-height: 100vh;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

.hero-section {
    width: 100vw !important;
    min-height: 600px !important;
    background: var(--hero-gradient) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: #fff !important;
    overflow: hidden !important;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--overlay);
    z-index: 1;
}

.hero-section .section-title {
    font-size: 4rem !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    margin-top: 120px !important;
    margin-bottom: 40px !important;
    color: #fff !important;
    text-shadow: 0 4px 32px rgba(0,0,0,0.3) !important;
}

.hero-section .hero-buttons {
    display: flex !important;
    gap: 2rem !important;
    justify-content: center !important;
    margin-bottom: 60px !important;
}

.hero-section .hero-btn {
    padding: 1.2rem 2.5rem !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    border-radius: var(--button-radius) !important;
    border: none !important;
    background: #ff5e3a !important;
    color: #fff !important;
    box-shadow: 0 8px 32px rgba(255,46,104,0.15) !important;
    cursor: pointer !important;
    transition: background 0.3s, box-shadow 0.3s !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.hero-section .hero-btn.instagram {
    background: #c13584 !important;
}

.hero-section .hero-btn:hover {
    background: #ff2a68 !important;
    box-shadow: 0 12px 40px rgba(255,46,104,0.25) !important;
}

.hero-section .hero-bg {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 0 !important;
    filter: brightness(0.7) blur(1px) !important;
}

/* ============================================
   SHARE BUTTONS (Reusable)
   ============================================ */
.share-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.share-btn.sm { width: 34px; height: 34px; border-radius: 8px; }
.share-btn.xs { width: 30px; height: 30px; border-radius: 7px; }

.share-wa { background: #25D366; }
.share-tg { background: #0088cc; }
.share-fb { background: #1877F2; }
.share-tw { background: #ffffff; color: #000 !important; }

/* Input copy group (light translucent background variants) */
.copy-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}
.copy-input {
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    width: 360px;
    max-width: 60vw;
    font-weight: 600;
}

/* ============================================
   TOAST (Minimalist notification)
   ============================================ */
.toast-container {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    animation: toast-in 160ms ease-out forwards;
}

.toast i { color: var(--primary-color); }

@keyframes toast-in {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(8px); }
}
