/* Clean, Lightweight Styles - Combined for Home & Song Pages */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.navbar .logo a {
    text-decoration: none;
}

.logotext {
    color: #1a73e8;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1a73e8;
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #5f6368;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
}

/* Search Container */
.search-container {
    padding: 80px 20px 20px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.search-bar-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 12px 48px 12px 16px;
    font-size: 15px;
    border: 1px solid #dfe1e5;
    outline: none;
    transition: box-shadow 0.2s;
}

.search-bar:focus {
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
    border-color: transparent;
}

.search-icon-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    background-color: #2196F3;
    right: 0%;
    padding: 10px 20px 10px 20px;
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

/* Site Title */
.sitetitle {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #202124;
    margin: 32px 0 24px;
    letter-spacing: -0.5px;
}

/* Container */
.songs-container, .genres-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 8px;
}

/* Main Content with Sidebar Layout */
.main-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 10px;
    display: grid;
    grid-template-columns: 1fr 345px;
    gap: 4px;
}

.main-content {
    min-width: 0;
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

/* Songs Grid - Desktop: 2 Column, Mobile: List */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

/* Song Card - Horizontal Layout */
.song-card {
    background: #fff;
    border-radius: 3px;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 9px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.song-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.song-cover-container {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 3px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.song-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.song-cover.lazy {
    opacity: 0.3;
    transition: opacity 0.3s;
}

.song-cover.loaded {
    opacity: 1;
}

.song-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
}

.song-title {
    font-size: 17px;
    font-weight: 400;
    color: #202124;
}

.song-title a {
    color: #202124;
    text-decoration: none;
}

.song-card:hover .song-title,
.song-card:hover .song-title a {
    color: #1a73e8;
    text-decoration: underline;
}

.song-artist {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.5;
}

.song-duration {
    font-size: 13px;
    color: #80868b;
    margin-top: 4px;
}

/* Play/Pause Button */
.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0,0,0,.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
    z-index: 10;
}

.song-cover-container:hover .play-pause-btn {
    opacity: 1;
}

.play-pause-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.play-icon {
    display: block;
}

.pause-icon {
    display: none;
}

.play-pause-btn.playing .play-icon {
    display: none;
}

.play-pause-btn.playing .pause-icon {
    display: block;
}

/* Footer Styles */
.footer {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    margin-top: 48px;
    padding: 24px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-center {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
}

.footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.footer-right a {
    color: #5f6368;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: #1a73e8;
}

/* ========== SONG PAGE SPECIFIC STYLES ========== */

/* Breadcrumb */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 5px 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #5f6368;
}

.breadcrumb-item a {
    color: #1a73e8;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 6px;
    color: #5f6368;
}

.breadcrumb-item.current {
    color: #202124;
}

.album-container {
    background: #fff;
    border-radius: 3px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    width: 100%;
}

/* Album Details */
.album-details {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 2px;
}

.album-cover-container {
    flex-shrink: 0;
    position: relative;
}

.album-cover {
    width: 200px;
    height: 200px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #f0f0f0;
}



.album-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.album-title {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 4px;
    padding: 6px;
}

.album-artist {
    font-size: 16px;
    color: #1a73e8;
    font-weight: 500;
    margin-bottom: 8px;
}

.album-artist a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.2s;
}

.album-artist a:hover {
    color: #1557b0;
    text-decoration: underline;
}

.album-meta {
    font-size: 14px;
    color: #5f6368;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.album-meta .bd {
    font-weight: 600;
    color: #202124;
    min-width: 80px;
}

.album-meta:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

/* Reaction Buttons */
.reaction-container {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.like-btn {
    background-color: #1a73e8;
    color: #fff;
}

.dislike-btn {
    background-color: #5f6368;
    color: #fff;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.user-voted {
    background-color: #34a853;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.download-button {
    display: block;
    padding: 10px 24px;
    background-color: transparent;
    color: #202124;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #5f6368;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
    flex: 0 0 auto;
}

.download-button:hover {
    background-color: #f8f9fa;
    border-color: #202124;
    color: #202124;
}

.download-button.high {
    border-color: #1a73e8;
    color: #1a73e8;
}

.download-button.high:hover {
    background-color: #e8f0fe;
    border-color: #1557b0;
    color: #1557b0;
}

/* Song Player */
.song-player {
    margin-bottom: 24px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.audio-play-trigger {
    display: block;
    padding: 10px 24px;
    border-radius: 4px;
    border: 1px solid #1a73e8;
    background-color: transparent;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
    width: 100%;
    max-width: 400px;
}

.audio-play-trigger:hover {
    background-color: #e8f0fe;
    border-color: #1557b0;
    color: #1557b0;
}

.audio-play-trigger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #dadce0;
    color: #5f6368;
}

.audio-play-trigger.hidden {
    display: none;
}

.song-player audio {
    width: 100%;
    margin-top: 12px;
    border-radius: 6px;
}

.song-player audio[data-armed="false"] {
    opacity: 0.4;
    pointer-events: none;
}

/* Description */
.song-full-description {
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #3c4043;
    line-height: 1.6;
}

/* Social Share */
.social-share {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.social-share .share-heading {
    font-weight: 600;
    font-size: 16px;
    color: #202124;
}

.social-share .share-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-share .share-btn {
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.social-share .share-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.social-share .share-btn.facebook {
    background: #1877f2;
}

.social-share .share-btn.whatsapp {
    background: #25d366;
}

.social-share .share-btn.pinterest {
    background: #e60023;
}

.social-share .share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* FAQ Section */
.song-faq {
    margin-bottom: 24px;
    padding: 12px;
    border-radius: 6px;
    background: #f9f9f9;
    border: 1px solid #efefef;
}

.song-faq h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #202124;
}

.song-faq .faq-item {
    margin-bottom: 12px;
}

.song-faq .faq-item h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #202124;
}

.song-faq .faq-item p {
    margin: 0;
    color: #5f6368;
    line-height: 1.5;
    font-size: 14px;
}

/* More Songs Section */
.more-songs {
    margin-bottom: 24px;
}

.more-songs h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #202124;
}

.more-songs ul {
    list-style: none;
    padding: 0;
}

.track-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 3px;
    margin-bottom: 0px;
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s;
}

.track-item:hover {
    background-color: #f1f3f4;
}

.track-info {
    flex: 1;
}

.track-title a {
    font-size: 15px;
    font-weight: 400;
    color: #3855f6;
    text-decoration: none;
}

.track-title a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

.track-artist {
    color: #5f6368;
    font-size: 13px;
    margin-top: 2px;
}

.track-duration {
    color: #80868b;
    font-size: 13px;
    margin-left: 12px;
}

/* Right Sidebar */
.right-sidebar {
    padding: 0;
    align-self: start;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 500;
    color: #000000;
    /* background-color: #4169e1; */
    padding: 6px 7px;
    /* margin: 0; */
    border-radius: 4px;
    margin-bottom: 0px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #FFF;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.category-list li {
    margin-bottom: 4px;
}

.category-list a {
    display: block;
    padding: 10px 12px;
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.category-list a:hover {
    background-color: #f1f3f4;
    color: #1a73e8;
}

.sidebar-songs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: white;
    border: 1px solid #e0e0e0;
}

.album-post {
    display: flex;
    align-items: flex-start;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.album-post:hover {
    background-color: #f8f9fa;
}

.album-post-cover {
    width: 80px;
    height: 80px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 12px;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.album-post-cover.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.album-post-cover.lazy.loaded {
    opacity: 1;
}

.album-post-details {
    flex: 1;
    min-width: 0;
}

.album-post-title a {
    font-size: 14px;
    font-weight: 500;
    color: #3954f6;
    text-decoration: none;
    display: block;
}

.album-post-title a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

.album-post-artist {
    font-size: 13px;
    color: #5f6368;
}

/* Loading Spinner */
#download-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.loader-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #1a73e8;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reaction Message */
.reaction-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}

.reaction-message.success {
    background-color: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #34a853;
}

.reaction-message.error {
    background-color: #fce8e6;
    color: #c5221f;
    border: 1px solid #ea4335;
}

.reaction-message.info {
    background-color: #e8f0fe;
    color: #1967d2;
    border: 1px solid #1a73e8;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablet & Mobile - Sidebar Stacks Below */
@media (max-width: 1024px) {
    .main-content-wrapper {
        grid-template-columns: 1fr;
    }

    .main-content-wrapper .right-sidebar {
        display: block;
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        padding: 16px 20px;
        border-bottom: 1px solid #f5f5f5;
        width: 100%;
    }

    .hamburger {
        display: block !important;
    }

    .search-container {
        padding: 25px 20px 20px;
    }

    .sitetitle {
        font-size: 24px;
        margin: 24px 0 16px;
    }

    .section-title {
        font-size: 18px;
    }

    .songs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .song-card {
        padding: 12px;
        gap: 12px;
    }

    .song-cover-container {
        width: 100px;
        height: 100px;
    }

    .song-title {
        font-size: 15px;
    }

    .song-artist {
        font-size: 13px;
    }

    .song-duration {
        font-size: 12px;
    }

    .footer {
        margin-top: 32px;
        padding: 20px 0;
    }

    .footer-container {
        gap: 12px;
    }

    .footer-right {
        gap: 12px;
    }

    .footer-right a {
        font-size: 12px;
    }

    /* Song Page - Breadcrumb */
    .breadcrumb {
        padding: 18px 10px 0px;
    }

    .album-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .album-cover {
        width: 180px;
        height: 180px;
        max-width: 100%;
    }

    .album-title {
        font-size: 20px;
    }

    .album-info {
        width: 100%;
    }

    .reaction-container {
        justify-content: center;
    }

    .breadcrumb {
        font-size: 12px;
        gap: 4px;
    }

    .social-share .share-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 10px 16px;
    }

    .logotext {
        font-size: 18px;
    }

    .search-container {
        padding: 60px 16px 16px;
    }

    .songs-container,
    .genres-container {
        padding: 16px;
    }

    .songs-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .song-card {
        padding: 8px;
        gap: 10px;
        align-items: center;
    }

    .song-cover-container {
        width: 70px;
        height: 70px;
    }

    .song-details {
        gap: 4px;
        padding-top: 0;
    }

    .song-title {
        font-size: 14px;
        font-weight: 500;
    }

    .song-artist {
        font-size: 12px;
    }

    .song-duration {
        font-size: 11px;
        margin-top: 2px;
    }

    /* Song Page */
    .album-cover {
        width: 160px;
        height: 160px;
        max-width: 100%;
    }

    .album-title {
        font-size: 18px;
    }

    .download-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .audio-play-trigger {
        padding: 12px 16px;
        font-size: 15px;
    }

    .album-post-cover {
        width: 70px;
        height: 70px;
        max-width: 100%;
    }
}

/* Prevent CLS - Reserve space for images */
.album-cover-container {
    min-width: 200px;
    min-height: 200px;
}

@media (max-width: 768px) {
    .album-cover-container {
        min-width: 180px;
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .album-cover-container {
        min-width: 160px;
        min-height: 160px;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
