/* CSS Variables for Theme Configuration */
:root {
    /* Brand Colors */
    --brand-color: #3c454e;
    --brand-color-dark: #778899;

    /* Font Sizes */
    --font-size-base: 16px;
    --font-size-small: 12px;
    --font-size-h1: 18px;

    /* Other Colors */
    --search-bg: #f4f4f4;
    --text-color: #fff;
    --primary-btn: #dc3545;
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --danger-color: #dc3545;
    --danger-dark: #c82333;
    --success-color: #28a745;
    --success-dark: #1e7e34;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark-text: #333333;
    --muted-text: #6c757d;
    --border-color: #dee2e6;

    /* Layout */
    --container-width: 1050px;

    /* Shadows & Radius */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --border-radius: 0.375rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Transition */
    --transition: all 0.3s ease;
}

/* Utility Classes for Layout and Styling */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.text-truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-decoration-none { text-decoration: none !important; }
.w-100 { width: 100% !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.text-primary { color: var(--primary-color); }
.text-muted { color: var(--muted-text); }
.bg-light { background-color: var(--light-bg); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.rounded { border-radius: var(--border-radius); }
.border { border: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.ms-auto { margin-left: auto; }
.me-2 { margin-right: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-md); }
.my-2 { margin-top: var(--spacing-sm); margin-bottom: var(--spacing-sm); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }

/* Base Reset and Typography */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: Arial, sans-serif;
    font-size: var(--font-size-base);
    background: var(--search-bg);
}

/* Main Container Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* Header Logo Section */
.top-logo {
    background: #030303;
    text-align: center;
    padding: 10px 0;
}
.top-logo img {
    max-width: 200px;
    height: auto;
}

/* Navigation Container */
.nav-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    list-style: none;
    box-sizing: border-box;
}

/* Navigation Links */
.nav-items a {
    background: var(--brand-color);
    color: #ececec;
    padding: 10px;
    display: block;
    width: 25%;
    vertical-align: middle;
    line-height: 25px;
    border: 1px solid #686868;
    border-bottom: 0;
    border-right: 0;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
    font-weight: 300;
    font-size: var(--font-size-base);
}

/* Hover Effect */
.nav-items a:hover {
    background: var(--brand-color-dark);
}

/* Default Layout: 4 columns on desktop */
.nav-items a {
    flex: 0 0 25%;
    max-width: 25%;
}

/* If last row has 3 items → make them 33.33% each */
.nav-items a:nth-last-child(3):nth-child(4n+1),
.nav-items a:nth-last-child(2):nth-child(4n+2),
.nav-items a:nth-last-child(1):nth-child(4n+3) {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

/* If last row has 2 items → make them 50% each */
.nav-items a:nth-last-child(2):nth-child(4n+1),
.nav-items a:nth-last-child(1):nth-child(4n+2) {
    flex: 0 0 50%;
    max-width: 50%;
}

/* If last row has 1 item → make it full width */
.nav-items a:nth-last-child(1):nth-child(4n+1) {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Mobile Layout (≤768px) */
@media (max-width: 768px) {
    /* Default: 3 columns */
    .nav-items a {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
        font-size: var(--font-size-base);
        padding: var(--spacing-sm);
        display: block;
    }

    /* Last row with 1 item → full width */
    .nav-items a:nth-last-child(1):nth-child(3n+1) {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Last row with 2 items → half width each */
    .nav-items a:nth-last-child(2):nth-child(3n+1),
    .nav-items a:nth-last-child(1):nth-child(3n+2) {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Last row with 3 items → keep 33.33% each */
    .nav-items a:nth-last-child(3):nth-child(3n+1),
    .nav-items a:nth-last-child(2):nth-child(3n+2),
    .nav-items a:nth-last-child(1):nth-child(3n+3) {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
}

/* Search Box Component */
.search-box {
    background: var(--white);
    padding: 10px 0;
}
.search-box form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    margin: 0 auto;
    max-width: 500px;
}
.search-box input {
    flex: 1 1 auto;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.search-box select {
    flex: 0 0 90px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}
.search-box button {
    flex: 0 0 90px;
    padding: 8px;
    background: var(--primary-btn);
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}
.search-box button:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .search-box form {
        max-width: 100%;
        padding: 0 10px;
    }
    .search-box input { min-width: 100px; }
    .search-box select { flex: 0 0 70px; font-size: 13px; }
    .search-box button { flex: 0 0 70px; font-size: 13px; }
}

.home-title {
    font-size: var(--font-size-h1);
    text-align: center;
    padding: var(--spacing-sm);
}
/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: var(--spacing-sm);
    background: var(--light-bg);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--dark-text);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 var(--spacing-xs);
    color: var(--muted-text);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    padding: var(--spacing-sm);
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--muted-text);
}

.breadcrumb li {
    margin-left: 0 !important;
    padding: 0 !important;
}

/* Page Title Styling */
.post-title {
    font-size: var(--font-size-h1);
    background: var(--brand-color-dark);
    color: var(--text-color);
    text-align: center;
    padding: var(--spacing-sm);
    font-weight: 300;
}

/* Main Content Theme Section */
.main-theme {
    background: var(--white);
}

.main-theme img,
.main-theme video {
    max-width: 100%;
    display: block;
}

.main-theme audio {
    width: 100%;
    margin: var(--spacing-sm) 0;
}

.main-theme p {
    font-size: var(--font-size-base);
    color: var(--dark-text);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
}

.main-theme li {
    font-size: var(--font-size-base);
    color: var(--dark-text);
    padding: var(--spacing-sm);
    margin-left: var(--spacing-xl);
}

/* Post Meta Information */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--muted-text);
    font-size: var(--font-size-small);
}

.author-name a {
    color: var(--muted-text);
    text-decoration: none;
}

.author-name a:hover {
    text-decoration: underline;
}

.publish-date {
    color: var(--muted-text);
}

/* Song Page Layout */
.song-section {
    max-width: var(--container-width);
    margin: 0 auto;
}

.song-top {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.song-left {
    flex: 0 0 250px;
    max-width: 250px;
}

.song-left img {
    width: 100%;
    border-radius: var(--border-radius);
}

.song-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-md);
}

.song-meta p {
    font-size: var(--font-size-base);
    color: var(--dark-text);
    margin-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

/* Song Action Buttons */
.song-like-dislike {
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.song-like-dislike button {
    flex: 1;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--white);
}

.song-like-dislike .like-btn {
    background: #3498db;
}
.song-like-dislike .like-btn:hover {
    background: #2980b9;
}

.song-like-dislike .dislike-btn {
    background: #f39c12;
}
.song-like-dislike .dislike-btn:hover {
    background: #d35400;
}

/* Song Title */
.song-title {
    font-size: var(--font-size-h1);
    background: var(--brand-color-dark);
    color: var(--text-color);
    text-align: center;
    padding: var(--spacing-sm);
    margin: 12px 0;
    font-weight: 300;
}

.post-description {
    font-size: var(--font-size-base);
    padding: 0 var(--spacing-sm);
}

.top-description {
    font-size: var(--font-size-base);
    padding: 0 var(--spacing-sm);
}

/* Audio Player Styling */
.custom-audio-player {
    display: flex;
    justify-content: center;
    padding: 0 var(--spacing-md);
}

.custom-audio-player audio {
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Song Download and Share */
.song-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.song-actions button {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--white);
}

.download-btn { background: var(--danger-color); }
.download-btn:hover { background: var(--danger-dark); }

@media (max-width: 768px) {
    .song-top {
        flex-direction: column;
    }
    .song-left {
        max-width: 80%;
        margin: 0 auto;
    }
    .custom-audio-player audio {
        max-width: 100%;
    }
    .song-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Related Songs Section - Centered */
.related-section {
    margin: 0 auto;
    max-width: 1200px;
}

.related-title {
    font-size: var(--font-size-h1);
    background: var(--brand-color-dark);
    color: var(--text-color);
    text-align: center;
    padding: var(--spacing-sm);
    margin: 12px 0;
    font-weight: 300;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    justify-content: center;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xs);
    }
}

/* Song Card Grid Component */
.song-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.song-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.song-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--dark-text);
}

.song-card-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.song-card-body {
    padding: var(--spacing-xs);
}

.song-card-title {
    font-size: var(--font-size-base);
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-card-duration {
    font-size: var(--font-size-small);
    color: var(--muted-text);
}

@media (max-width: 768px) {
    .song-card-title {
        font-size: var(--font-size-small);
    }
}

/* Sidebar Component */
.sidebar-section {
    background: var(--white);
}

.sidebar-title {
    font-size: var(--font-size-h1);
    background: var(--brand-color-dark);
    color: var(--text-color);
    text-align: center;
    padding: var(--spacing-sm);
    margin: 12px 0;
    font-weight: 300;
}

.sidebar-list {
    list-style: none;
    padding: var(--spacing-md);
    margin: 0;
}

.sidebar-list-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar-list-item:last-child {
    border-bottom: none;
}

.sidebar-list-item:hover {
    background: var(--light-bg);
}

.sidebar-list-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.sidebar-list-thumb {
    flex: 0 0 75px;
    width: 75px;
    height: 75px;
    border-radius: var(--border-radius);
    object-fit: cover;
    margin-right: var(--spacing-sm);
}

.sidebar-list-info {
    flex: 1;
    overflow: hidden;
    margin-left: var(--spacing-sm);
}

.sidebar-list-title-text {
    font-size: var(--font-size-base);
    font-weight: bold;
    color: var(--dark-text);
    margin-bottom: var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-list-singer,
.sidebar-list-category {
    font-size: var(--font-size-small);
    color: var(--muted-text);
    margin: 0;
    padding: 0 !important;
    line-height: var(--spacing-md);
}

/* Category Grid Layout */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.category-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.category-card-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
}

.category-card-body {
    padding: var(--spacing-sm);
}

.category-card-title {
    font-size: var(--font-size-small);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-card-title span {
    font-size: var(--font-size-small);
    color: var(--muted-text);
}

.category-card-count {
    font-size: var(--font-size-small);
    color: var(--muted-text);
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }

    .category-card-title {
        font-size: var(--font-size-small);
    }
}

/* Footer Section */
.footer-container {
    background: var(--brand-color-dark);
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--spacing-md);
    color: var(--text-color);
    box-sizing: border-box;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-sm);
}

.footer-col {
    flex: 1 1 200px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-social .social-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.footer-social .social-icons div {
    width: 36px;
    height: 36px;
    background: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.footer-social .social-icons div:hover {
    background: var(--brand-color-light);
}

.footer-container hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-md) 0;
}

.footer-bottom {
    flex: 0 0 100%;
    text-align: center;
    font-size: var(--font-size-small);
    margin-top: var(--spacing-md);
}

.footer-bottom a {
    color: var(--text-color);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-col {
        flex: none;
        width: 100%;
        margin-bottom: var(--spacing-sm);
        text-align: center;
    }

    .footer-social .social-icons {
        justify-content: center;
    }
}

/* Load More Actions */
.load-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

.load-actions button {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--white);
}

.load-actions a {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--white);
    text-decoration: none;
}

/* Social Share Components */
.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.share-btn.whatsapp {
    background-color: var(--brand-color);
}

.share-btn.facebook {
    background-color: var(--brand-color);
}

.share-btn.twitter {
    background-color: var(--brand-color);
}

.share-btn.telegram {
    background-color: var(--brand-color);
}

.share-icons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.share-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--light-bg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.share-icons a img {
    width: 40px;
    height: 40px;
}

/* Comment Section */
.comment-box {
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

/* Title */
.comment-title {
  font-size: var(--font-size-h1);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--dark-text);
}

/* Error Message */
.comment-error {
  background: #ffe6e6;
  color: var(--danger-dark);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-small);
  border: 1px solid var(--danger-color);
}

/* Form Elements */
.comment-form .form-group {
  margin-bottom: var(--spacing-md);
}

.comment-form label {
  display: block;
  font-size: var(--font-size-small);
  margin-bottom: var(--spacing-xs);
  color: var(--dark-text);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Submit Button */
.comment-btn {
  background: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--font-size-base);
  transition: var(--transition);
}

.comment-btn:hover {
  background: var(--primary-dark);
}

/* User Comments */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-item {
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
}

.comment-item strong {
  font-size: var(--font-size-base);
  color: var(--dark-text);
}

.comment-date {
  font-size: var(--font-size-small);
  color: var(--muted-text);
  margin-left: var(--spacing-xs);
}

.comment-item p {
  margin: var(--spacing-xs) 0 0;
  font-size: var(--font-size-base);
  color: var(--dark-text);
}

.no-comment {
  font-size: var(--font-size-small);
  color: var(--muted-text);
  padding: var(--spacing-xs) 0;
}