/* Importing Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Theme */
:root {
    --primary-color: #1781b6;
    --secondary-color: #0f0f0f;
    --text-color: #121212;
    --bg-color: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --card-bg: #f8f8f8;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme='dark'] {
    --primary-color: #1781b6;
    --secondary-color: #0f0f0f;
    --text-color: #ffffff;
    --bg-color: #121212;
    --nav-bg: rgba(18, 18, 18, 0.9);
    --card-bg: #181818;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(-45deg, #1db954, #1781b6,#0f0f0f,#790c0c4d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    transition: var(--transition);
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
}

@keyframes gradientBG {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: #790c0c4d;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 10px var(--shadow-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

.hero-content p {
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s 0.3s forwards;
}

/* Music Visualizer */
.music-visualizer {
    display: flex;
    gap: 5px;
    margin-top: 2rem;
}

.bar {
    width: 10px;
    height: 30px;
    background: white;
    border-radius: 5px;
    animation: visualizer 1.5s infinite;
}

.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

/* Song Cards */
.songs-section {
    padding: 5rem 2rem;
}

.song-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    grid-auto-flow: column;
    grid-auto-columns: 16rem;
    justify-content: stretch;
    animation: animate 15s linear infinite;
}
@keyframes animate {
   to{
    transform: translateX(calc(-4 * 16rem));
   }
}

.songItem {
    background: #181818; /* or any solid color you like */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 0;
    margin: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.songItem.visible {
    transform: translateY(0);
    opacity: 1;
}

.songItem:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.songItem img,
.album-cover {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    background: #222;
    display: block;
    margin: 0 auto 1rem auto;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.player-cover {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    background: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-right: 1rem;
    flex-shrink: 0;
}

.song-name {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Default (light theme) */
.music-player .song-name {
    color: #fff;
    transition: color 0.3s;
}

/* Dark theme */
body[data-theme="dark"] .music-player .song-name {
    color: #111;
}

.play-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.play-btn:hover {
    transform: scale(1.1);
}

/* Parallax Section */
.parallax-section {
    padding: 5rem 2rem;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    color: white;
    text-align: center;
}

/* Testimonials */
.testimonials-section {
    padding: 5rem 2rem;
    background: var(--card-bg);
}

.testimonial-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.testimonial {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.testimonial:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.testimonial img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Footer */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    background: var(--card-bg);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.newsletter-form input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-color);
    border-radius: 5px;
    background: transparent;
    color: var(--text-color);
}

.newsletter-form button {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

/* Music Player */
.music-player {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 600px;
    z-index: 1000;
    background: #111;
    transition: background 0.3s, bottom 0.3s;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
    padding: 1rem 2vw;
}

.music-player .progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-bar-bg {
    flex: 1;
    height: 6px;
    background: var(--card-bg, #333);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--primary-color, #1db954);
    border-radius: 3px;
    transition: width 0.2s;
}

#current-time, #total-duration {
    color: #aaa;
    font-size: 0.95rem;
    min-width: 44px;
    text-align: center;
}

.player-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.controls button {
    background: #222;
    color: #1db954;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.controls button:hover {
    color: var(--primary-color);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 100px;
    cursor: pointer;
}

/* Music Player Button Styles */
.music-player .controls button {
    background: #222;
    color: #1db954;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.music-player .controls button:hover {
    background: #333;
}

/* Light theme (default) */
body[data-theme="light"] .music-player .controls button {
    background: #222;
    color: #1db954;
}

/* Dark theme */
body[data-theme="dark"] .music-player .controls button {
    background: #fff;
    color: #111;
}

body[data-theme="dark"] .music-player .controls button:hover {
    background: #e0e0e0;
}

/* General button theme for newsletter and others */
body[data-theme="light"] button,
body[data-theme="light"] .newsletter-form button {
    background: #1db954;
    color: #fff;
}

body[data-theme="dark"] button,
body[data-theme="dark"] .newsletter-form button {
    background: #111;
    color: #1db954;
}

body[data-theme="dark"] .newsletter-form button:hover {
    background: #222;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes visualizer {
    0%, 100% { height: 30px; }
    50% { height: 60px; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .song-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .newsletter-form {
        flex-direction: column;
    }

    .player-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .player-cover {
        width: 44px;
        height: 44px;
    }
    .songItem img,
    .album-cover {
        width: 120px;
        height: 120px;
    }
}

/* Sticky music player at bottom, but moves up for footer */
.music-player {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 600px;
    z-index: 1000;
    background: #111;
    transition: background 0.3s, bottom 0.3s;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
    padding: 1rem 2vw;
}

/* Theme colors */
body[data-theme="light"] .music-player {
    background: #111;
    color: #fff;
}
body[data-theme="dark"] .music-player {
    background: #f5f5f5;
    color: #222;
}

/* Responsive */
@media (max-width: 700px) {
    .music-player {
        max-width: 98vw;
        padding: 0.5rem 1vw;
        border-radius: 12px 12px 0 0;
        margin-bottom: 1rem;
    }
    .player-cover {
        width: 44px;
        height: 44px;
    }
    .songItem img,
    .album-cover {
        width: 100px;
        height: 100px;
    }
}

/* Responsive Navbar */
@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    margin-top: 1rem;
  }
}

/* Responsive Hero Section */
@media (max-width: 700px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .music-visualizer .bar {
    width: 4px;
    height: 18px;
  }
}

/* Responsive Albums Section */
@media (max-width: 900px) {
  .song-cards {
    gap: 1rem;
  }
  .album-cover {
    width: 110px;
    height: 110px;
  }
}
@media (max-width: 600px) {
  .song-cards {
    flex-direction: column;
    align-items: center;
  }
  .album-cover {
    width: 90px;
    height: 90px;
  }
}

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
  }
  .footer-section {
    width: 100%;
  }
}

/* Responsive Music Player */
@media (max-width: 700px) {
  .music-player {
    padding: 0.5rem 0.5rem;
  }
  .player-content {
    flex-direction: column;
    gap: 0.7rem;
  }
  .player-cover {
    width: 36px;
    height: 36px;
  }
  .volume-slider {
    width: 60px;
  }
}

/* General small screen tweaks */
@media (max-width: 500px) {
  .navbar {
    padding: 0.5rem;
  }
  .footer-content {
    padding: 1rem 0.5rem;
  }
  .hero-content {
    padding: 1rem 0.2rem;
  }
}
