/* CSS Reset - removes default browser spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: #000000;
    color: #ffffff;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: #000000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.spotify-logo i {
    font-size: 32px;
    color: #ffffff;
}

.home-icon {
    background-color: #1f1f1f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-icon i {
    font-size: 18px;
    color: #ffffff;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #1f1f1f;
    padding: 10px 16px;
    border-radius: 25px;
    width: 350px;
    gap: 12px;
}

.search-bar i {
    color: #b3b3b3;
    font-size: 16px;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 14px;
    width: 100%;
}

.search-bar input::placeholder {
    color: #b3b3b3;
}

.browse-icon {
    background-color: #1f1f1f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browse-icon i {
    color: #ffffff;
    font-size: 16px;
}

/* Right side of navbar */
.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links li {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nav-links li:hover {
    color: #ffffff;
}

.divider {
    width: 1px;
    height: 24px;
    background-color: #b3b3b3;
}

.install-app {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.install-app:hover {
    color: #ffffff;
}

.signup {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.signup:hover {
    color: #ffffff;
}

.login-btn {
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.login-btn:hover {
    transform: scale(1.05);
}


/* ===== MAIN LAYOUT ===== */
.main-container {
    display: flex;
    gap: 8px;
    padding: 0 8px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 320px;
    background-color: #121212;
    border-radius: 8px;
    padding: 16px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.create-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #1f1f1f;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.create-btn:hover {
    background-color: #2a2a2a;
}

.sidebar-card {
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.sidebar-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.sidebar-card p {
    font-size: 14px;
    color: #b3b3b3;
    margin-bottom: 16px;
}

.card-btn {
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.card-btn:hover {
    transform: scale(1.05);
}

/* Footer pushed to bottom */
.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-links a {
    color: #b3b3b3;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #727272;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
}

.lang-btn:hover {
    border-color: #ffffff;
}

/* ===== MAIN CONTENT (placeholder for now) ===== */
.main-content {
    flex: 1;
    background-color: #121212;
    border-radius: 8px;
    padding: 24px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

/* ===== SECTION COMMON STYLES ===== */
.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.show-all {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.show-all:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* ===== CARD ROW ===== */
.card-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== SONG CARD ===== */
.song-card {
    background-color: #181818;
    padding: 12px;
    border-radius: 8px;
    width: 170px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.song-card:hover {
    background-color: #282828;
}

.song-card img {
    width: 100%;
    height: 146px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    background-color: #333333; /* shows if image fails to load */
}

.song-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card p {
    font-size: 12px;
    color: #b3b3b3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== ARTIST CARD ===== */
.artist-card {
    background-color: #181818;
    padding: 16px;
    border-radius: 8px;
    width: 170px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.artist-card:hover {
    background-color: #282828;
}

.artist-img-wrapper {
    width: 138px;
    height: 138px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px auto;
}

.artist-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #333333;
}

.artist-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-card p {
    font-size: 12px;
    color: #b3b3b3;
}

/* ===== BOTTOM BANNER ===== */
.bottom-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to right,
        #3d1a78,
        #7b2fbe,
        #9333ea,
        #a855f7
    );
    padding: 7px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.banner-left h4 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.banner-left p {
    font-size: 14px;
    color: #ffffff;
    opacity: 0.9;
}

.signup-free-btn {
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.signup-free-btn:hover {
    transform: scale(1.05);
    background-color: #f0f0f0;
}

/* ===== CUSTOM SCROLLBAR ===== */
/* For the whole page */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #535353;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #727272;
}

/* For sidebar specifically */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #535353;
    border-radius: 4px;
}

/* For main content specifically */
.main-content::-webkit-scrollbar {
    width: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: #535353;
    border-radius: 4px;
}
/* ===== SEARCH BAR FOCUS EFFECT ===== */
.search-bar:focus-within {
    outline: 2px solid #ffffff;
    background-color: #2a2a2a;
}

.search-bar input:focus {
    outline: none;
}

/* Search bar typing indicator */
.search-bar.active-search {
    outline: 2px solid #ffffff;
    background-color: #2a2a2a;
}

/* ===== PAGE LOAD ANIMATION ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    animation: fadeIn 0.4s ease forwards;
}

.sidebar {
    animation: fadeIn 0.5s ease forwards;
}

.main-content {
    animation: fadeIn 0.6s ease forwards;
}

.bottom-banner {
    animation: fadeIn 0.7s ease forwards;
}

/* ===== SMOOTH TRANSITIONS FOR ALL INTERACTIVE ELEMENTS ===== */
.nav-links li,
.install-app,
.signup,
.show-all,
.footer-links a {
    transition: color 0.2s ease;
}

.song-card,
.artist-card {
    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.song-card:hover,
.artist-card:hover {
    transform: translateY(-2px);
}
/* ===== RESPONSIVE DESIGN ===== */

/* Tablet - screens smaller than 1024px */
@media (max-width: 1024px) {
    .search-bar {
        width: 250px;
    }

    .sidebar {
        width: 240px;
    }

    .song-card,
    .artist-card {
        width: 150px;
    }

    .artist-img-wrapper {
        width: 118px;
        height: 118px;
    }
}

/* Mobile - screens smaller than 768px */
@media (max-width: 768px) {

    /* Hide sidebar on mobile */
    .sidebar {
        display: none;
    }

    /* Main content takes full width */
    .main-content {
        width: 100%;
    }

    /* Navbar adjustments */
    .nav-links {
        display: none;
    }

    .install-app span {
        display: none;
    }

    .search-bar {
        width: 180px;
    }

    /* Cards become smaller */
    .song-card,
    .artist-card {
        width: 130px;
    }

    .artist-img-wrapper {
        width: 100px;
        height: 100px;
    }

    /* Banner text adjustments */
    .banner-left p {
        font-size: 12px;
    }
}

/* Small mobile - screens smaller than 480px */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px;
    }

    .search-bar {
        width: 140px;
    }

    .signup {
        display: none;
    }

    .card-row {
        justify-content: center;
    }

    .song-card,
    .artist-card {
        width: 140px;
    }

    .banner-left h4 {
        font-size: 13px;
    }

    .banner-left p {
        display: none;
    }
}

/* ===== NAV ACTIVE STATE ===== */
.nav-links li.nav-active {
    color: #ffffff;
    border-bottom: 2px solid #1db954;
    padding-bottom: 2px;
}

/* ===== MAIN CONTENT FOOTER ===== */
.content-footer {
    margin-top: 48px;
    padding-bottom: 32px;
}

/* Horizontal divider lines */
.footer-divider {
    width: 100%;
    height: 1px;
    background-color: #282828;
    margin: 32px 0;
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 24px;
    align-items: start;
}

/* Each column */
.footer-col h5 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: none;
    letter-spacing: 0;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: flex-end;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: #282828;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.social-icon:hover {
    background-color: #3e3e3e;
    transform: scale(1.1);
}

/* Copyright */
.footer-copyright {
    display: flex;
    justify-content: flex-end;
}

.footer-copyright p {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 400;
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer-social {
        justify-content: flex-start;
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-copyright {
        justify-content: flex-start;
    }
}
