:root {
  /* Base */
  --bg-primary: #081917;      /* ink black */
  --bg-secondary: #0d2b27;    /* slightly lifted ink */
  --bg-card: #094c41;         /* pine teal */

  /* Text */
  --text-primary: #f5f5f5;
  --text-secondary: #b8d4cf;
  --text-muted: #7fa8a2;

  /* Accents */
  --accent-primary: #fcb790;  /* peach glow */
  --accent-secondary: #3fb2a1;
  --xpli-xit: #f5f5f5;

  /* UI Elements */
  --button-bg: #094c41;
  --button-hover: #0b5e52;
  --button-text: #f5f5f5;

  --border-subtle: rgba(255, 255, 255, 0.06);

  /* States */
  --focus-ring: rgba(252, 183, 144, 0.5);
  --hover-glow: rgba(252, 183, 144, 0.15);

  /* components */
    --border-thickness: 1.5px; 
    --button-radius: 30px;
    --animation-speed: 4s;
    /* Solid background color (the gold part of your gradient) */
    --button-bg-color: #004643; 
}

body.light-mode {
  /* Base */
  --bg-primary: #fdf6f1;      /* warm off-white */
  --bg-secondary: #f4eae3;
  --bg-card: #ffffff;

  /* Text */
  --text-primary: #081917;
  --text-secondary: #094c41;
  --text-muted: #5f7f79;

  /* Accents */
  --accent-primary: #fcb790;  /* peach glow */
  --accent-secondary: #094c41;
  --xpli-xit: #094c41;

  /* UI Elements */
  --button-bg: #094c41;
  --button-hover: #0b5e52;
  --button-text: #ffffff;

  --border-subtle: rgba(9, 76, 65, 0.12);

  /* States */
  --focus-ring: rgba(9, 76, 65, 0.4);
  --hover-glow: rgba(252, 183, 144, 0.25);
}


body{
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

body.nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}


.nbar {
   display: flex;
   flex-direction: row;
   align-items: center;
   justify-content: space-between;
   margin: 25px 20px;
   text-align: center;
}

.openbtn{
  margin: 10px 0 0 0;
}

.container-x a{
  display: flex;     
  align-items: center; 
  margin: 0;
  line-height: 0;
}

.container-x{
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
  margin: -40px 0 0 0;
}

.logo-t{
  width: 60px;
  height: auto;
  display: block;
  max-width: 100%;
  margin: 0;
}

.logo-t:hover {
    cursor: pointer; 
    transform: scale(1.02);
    transition: transform 0.3s ease-in-out;
}

.theme-toggle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--text-primary);
    border: 2px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    margin: -47px 0 -47px auto;
    transition: opacity 0.2s ease;
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  transform: rotate(20deg);
}

#theme-icon {
  display: block;
  object-fit: contain;
}

.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

[data-theme="light"] .sun-icon {
  display: block;
}

[data-theme="light"] .moon-icon {
  display: none;
}

#mobile-nav-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 65%;
    height: 100vh; 
    background-color: rgba(128, 128, 128, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); 
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
    transition: right 0.3s ease;
    z-index: 999;
}

#mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 100vh;
    padding: 14px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 15px 0;
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;  /* ← THE KEY FIX */
    -webkit-overflow-scrolling: touch;
}

#mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-family: "Caprasimo", serif;
}

#menu-open-btn{
    display: block;
    width: 16px;
    height: auto;
    margin-left: 40px;  
    cursor: pointer;
    filter: var(--focus-ring);
}

#menu-close-btn {
    display: block;
    width: 14px;
    height: auto;  
    cursor: pointer;
    margin: 0 12px 0 0;
    align-self: flex-end;
    filter: var(--focus-ring);
}

#mobile-nav-container.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#mobile-nav-container.open #mobile-nav {
    transform: translateX(0);
}

#user-profile-section > div:first-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(63, 178, 161, 0.3);
}

#user-profile-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#user-profile-section button:active {
  transform: translateY(0);
}

.playlist-btn {
    flex-direction: row ;
    align-items: center;
    gap: 10px;
    background: none;
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    font-weight: 100;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sight{
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .move{
    margin: 40px 0 0 0;
  }

    /* Hidden class for auth control */
    .hidden {
      display: none !important;
    }

    /* Visible class for playlist buttons */
    .playlist-btn.visible {
      display: flex !important;
    }

    .playlist-btn .nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: filter 0.3s ease;
    stroke: var(--xpli-xit);
  }

  .playlist-btn p{
    margin: auto 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-primary);
    font-weight: 900;
    font-size: 12px;
  }

  .playlist-btn:hover p{
    color: white;
  }

  .playlist-btn:hover .nav-icon{
   stroke: white;
  }
  
  .playlist-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #081917 0%, #d1ac00 250%);
  }
  
  .social-icons{
    display: flex; 
    flex-direction: row; 
    gap: 54px; 
    margin: 20px 10px 50px 10px;
  }

main {
    flex: 1;
  }

  /* Blur background overlay */
#search-blur-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 25, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99998; /*  BELOW mobile nav (99999) */
  opacity: 0;
  transition: opacity 0.4s ease;
}
      
#search-blur-overlay.active {
  display: block;
  opacity: 1;
}
      
/* Animated search container */
.search-input-wrapper {
  position: relative;
  z-index: 1;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
      
.search-input-wrapper.overlay-active {
  position: fixed !important;
  top: 80px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: 600px !important;
  width: 90% !important;
  z-index: 100000 !important; /* ABOVE mobile nav */
}
      
 /* Results container for overlay */
 #search-results-overlay {
  display: none;
  position: fixed;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  z-index: 100000; /* ABOVE mobile nav */
  padding-bottom: 40px;
}
      
#search-results-overlay.active {
  display: block;
}
      
 /* Smooth scroll for results */
#search-results-overlay::-webkit-scrollbar {
  width: 8px;
}
      
#search-results-overlay::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
 }
      
#search-results-overlay::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
 }
      
#search-results-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
 }
      
/*  FIXED: Close button CSS (removed duplicate display) */
#close-search-btn {
   position: fixed;
   top: 20px;
   right: 20px;
   background: rgba(255, 255, 255, 0.1);
   border: none;
   border-radius: 50%;
   color: var(--text-primary);
   font-size: 28px;
   cursor: pointer;
   z-index: 100001; 
   transition: all 0.3s ease;
   align-items: center;
   justify-content: center;
   line-height: 1;
   opacity: 0;
   pointer-events: none;
   display: flex; 
   justify-content: center;
   align-items: center;
   padding: 22px;
   width: 36px;
   height: 36px;
  }
      
  #close-search-btn.visible {
    opacity: 1;
    pointer-events: auto;
  }
      
  #close-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
  }
      
  body.search-overlay-open {
   overflow: hidden;
  }

.search-input-wrapper{
  position: relative;
  width: 100%;
  max-width: 290px;
  margin: 45px auto 95px auto;
}

.search-icon{
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.input{
  width: 100%;
  border: 1px solid transparent;
  height: 50px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 10px;
  padding-left: 45px; /* Space for icon + gap */
  padding-right: 15px;
  font-size: 16px;
  box-sizing: border-box;
  cursor: pointer;
}

.input::placeholder{
  color: var(--text-accent);
}

.input:hover{
  border: 1px solid var(--accent-primary);
}

.input:focus{
  outline: none;
  border: 2px solid var(--accent-primary);
}

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

.greeting-container {
    text-align: center;
    margin: 50px 30px 30px 30px;
    padding: 0 20px;
  }

.greeting-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
  }

.mood-question {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 5px;
  }

.mood-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;
    padding: 20px;
    background-color: rgba(128, 128, 128, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    -webkit-backdrop-filter: blur(20px);
    background: var(--bg-card);
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.mood-grido h3{
    text-align: center;
}

.mood-grido{
  margin: 90px 20px 50px 20px;
}

.mood-button {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: transparent;
    border: transparent;
    cursor: pointer;
    transition: all 0.3s ease; 
}

.mood-emoji {
    display: flex;
    align-items: center;
    justify-content: center; 
    font-size: 24px;
    padding: 15px;
    border-radius: 12px;
    background-color: var(--hover-glow); 
    margin-bottom: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.mood-button p {
    margin: 0;
    font-weight: 600;
    font-size: 10px;
    color: var(--text-primary);
}

.mood-button:hover .mood-emoji {
    animation-duration: 0.6s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.mood-emoji img {
    object-fit: contain;
}

/* Optional: Slight pulse of the container background itself to stay "reactive" */
.mood-emoji {
    animation: background-glow 3s infinite ease-in-out;
}

@keyframes background-glow {
    0%, 100% { background-color: var(--hover-glow); }
    50% { background-color: rgba(128, 128, 128, 0.15); }
}

/* Tablet and Desktop: */
@media (min-width: 768px) {
    .mood-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

.artist-section {
    display: flex;
    justify-content: center;
    margin: 100px auto 110px auto;
    padding: 0 20px;
}

.artist-grid-container {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 15px; 
    max-width: 700px;
    width: 100%;
}

.artist-button {
    flex: 1 1 45%; 
    max-width: 180px; 
    height: 150px; 
    border-left: 1px solid rgba(128, 128, 128, 0.08);
    border-top: 1px solid rgba(128, 128, 128, 0.08);
    border-right: none;
    border-bottom: none;
    background-color: rgba(128, 128, 128, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    position: relative; 
    z-index: 1; 
    overflow: hidden; 
}

.artist-button:hover {
    transform: scale(1.05); 
    z-index: 10; 
}

.butt-img {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.img-1 {
    width: 75px;
    height: 95px;
    border-radius: 10%;
    object-fit: cover;
}

.butt-img p {
    font-size: 10px;
    margin: 0;
    font-family: "Caprasimo", serif;
    color: var(--accent-secondary); 
}

/* Smooth staggered slide and fade in */
.fade-in {
    opacity: 0;
    animation: slideFadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* THE ROTATING COLOR LAYER (::before) */
/* New colors to match your dark/gold theme */

.color-border-button::before {
    content: "";
    position: absolute;
    top: -100%; 
    left: -100%;
    right: -100%;
    bottom: -100%;
    
    /* 💥 UPDATED CONIC GRADIENT 💥 */
    background: conic-gradient(
        from 0deg,
        #FFD700,    /* Bright Gold/Yellow */
        #FF8C00,    /* Dark Orange */
        #B8860B,    /* Dark Goldenrod (Gold tint of background) */
        #D2B48C,    /* Tan/Light Gold */
        #FFFFFF,    /* White/Bright Highlight */
        #FFD700     /* Bright Gold (completes the loop) */
    );
    
    border-radius: calc(var(--button-radius) + var(--border-thickness));
    animation: gradient-rotate var(--animation-speed) linear infinite;
    z-index: -2; 
}

/* THE SOLID MASK LAYER (::after) */
/* primary gold color for the button fill */

.color-border-button::after {
    content: "";
    position: absolute;
    
    /* Inset defined by the border thickness variable */
    top: var(--border-thickness); 
    left: var(--border-thickness);
    right: var(--border-thickness);
    bottom: var(--border-thickness);
    
    background-color: var(--bg-primary); 
    border-radius: var(--button-radius);
    z-index: -1;
}

.butt-3 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    width: 100%;
}

.color-border-button {
    position: relative;
    width: 90vw;
    max-width: 300px;
    min-height: 110px;
    cursor: pointer;
    font-family: "Caprasimo", serif;
    background: transparent;
    border: none; 
    border-radius: var(--button-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; 
    overflow: hidden; 
}

.button-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: var(--accent-primary); 
    z-index: 5; 
    position: relative; 
}

.play-link {
    text-decoration: none;
    display: inline-block;
}

.play-b {
    display: block;
    width: 60px;
    height: auto;
    animation: float 3s ease-in-out infinite alternate;
}

@keyframes gradient-rotate {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}


/* index.html search results styles */
/* unresolved */
  .search-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    max-width: 600px; /* controls width */
    text-align: center;
  }
  
  .track {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 15px;
    margin: 12px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .track:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
  }
  
  .track img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
  }
  
  .track h3 {
    font-size: 1.1rem;
    margin: 0;
  }
  
  .track p {
    font-size: 0.9rem;
    color: #bdbdbd;
    margin: 4px 0;
  }
  
  .track a {
    font-size: 0.85rem;
    color: #1DB954; /* Spotify green */
    text-decoration: none;
    transition: color 0.2s ease;
  }
  
  .track a:hover {
    color: #1ed760;
  }

/* --- BROWSE.HTML STYLES --- */

/* Playlist app styles (cards, controls) */
.playlist-controls { max-width: 1000px; margin: 20px auto; padding: 0 18px; text-align: center; }
.playlist-controls h2{
    margin: 50px 0 30px 0;
    font-family: serif;
    letter-spacing: 2px; 
    background: var(--text-primary);        
    -webkit-background-clip: text;
    background-clip: text;   
    -webkit-text-fill-color: transparent;
  }

/* VIBE BUILDER  */
.vibe-builder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 24px;
  background-color: rgba(128, 128, 128, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); 
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.vibe-builder label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ✅ MODERN DROPDOWN STYLES */
.vibe-builder select,
#timeOfDay,
#energy,
#vibeMood {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  
  /* Layout */
  width: 100%;
  padding: 14px 40px 14px 16px;
  
  /* Background */
  background: var(--bg-card);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23FCB790" d="M1.41 0L6 4.58 10.59 0 12 1.42l-6 6-6-6z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  
  /* Border */
  border: 2px solid rgba(252, 183, 144, 0.2);
  border-radius: 12px;
  
  /* Text */
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.5;
  
  /* Cursor */
  cursor: pointer;
  
  /* Transition */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadow */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hover State */
.vibe-builder select:hover,
#timeOfDay:hover,
#energy:hover,
#vibeMood:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(252, 183, 144, 0.3);
}

/* Focus State */
.vibe-builder select:focus,
#timeOfDay:focus,
#energy:focus,
#vibeMood:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(252, 183, 144, 0.2);
  transform: translateY(-2px);
}

/* Disabled State */
.vibe-builder select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Option Styling (Limited browser support) */
.vibe-builder select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px;
}

/* BUILD MY VIBE BUTTON */
#buildVibeBtn,
#randomVibeBtn {
  grid-column: 1 / -1;
  padding: 16px 32px;
  background: var(--accent-secondary);
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(252, 183, 144, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#buildVibeBtn:hover,
#randomVibeBtn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(252, 183, 144, 0.6);
}

#buildVibeBtn:active,
#randomVibeBtn:active {
  transform: translateY(-2px);
}

#buildVibeBtn:disabled,
#randomVibeBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* SPINNER ANIMATION */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

select,
  #timeOfDay,
  #energy,
  #vibeMood {
    margin: 10px 0;
  }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .vibe-builder {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 14px;
  }
  
  .vibe-builder select,
  #timeOfDay,
  #energy,
  #vibeMood {
    padding: 12px 36px 12px 14px;
    font-size: 14px;
  }
  
  .platform-filter-btn {
    font-size: 12px;
    padding: 8px 16px;
  }
  
  #buildVibeBtn,
  #randomVibeBtn {
    padding: 14px 24px;
    font-size: 14px;
  }
}

/* LIGHT MODE ADJUSTMENTS */
body.light-mode .vibe-builder select,
body.light-mode #timeOfDay,
body.light-mode #energy,
body.light-mode #vibeMood {
  background-color: #ffffff;
  color: #1a1a1a;
  border-color: rgba(252, 183, 144, 0.3);
}

body.light-mode .vibe-builder select:hover,
body.light-mode #timeOfDay:hover,
body.light-mode #energy:hover,
body.light-mode #vibeMood:hover {
  box-shadow: 0 6px 16px rgba(252, 183, 144, 0.4);
}

body.light-mode .platform-filter-btn {
  background: #f5f5f5;
  color: #666;
}

body.light-mode .platform-filter-btn:hover {
  color: #1a1a1a;
}

/* Visualizer styles */
#visualizer {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    height: 40px;
    margin: 18px auto;
    justify-content: center;
}
#visualizer span {
    display: block;
    width: 8px;
    background: #fff;
    height: 12px;
    border-radius: 3px;
    animation: pulse 1s infinite ease-in-out;
}
#visualizer span:nth-child(2){ animation-delay:0.15s }
#visualizer span:nth-child(3){ animation-delay:0.3s }
#visualizer span:nth-child(4){ animation-delay:0.45s }
#visualizer span:nth-child(5){ animation-delay:0.6s }

@keyframes pulse {
    0%,100% { height:12px; opacity:0.85; }
    50% { height:40px; opacity:1; }
}

/* subtle pulse/glow for mood transitions (Browse page) */
.mood-pulse {
  transition: box-shadow 0.45s ease, filter 0.45s ease;
  box-shadow: inset 0 0 80px rgba(255,255,255,0.03), 0 8px 40px rgba(0,0,0,0.25);
  filter: saturate(1.06) brightness(1.03);
}

/* optionally animate the visualizer's span bars when its 'active' */
#visualizer.active span {
  transform-origin: bottom center;
  animation: visualizer-pop 0.7s ease-in-out infinite alternate;
}
@keyframes visualizer-pop {
  from { transform: scaleY(1); opacity: 0.9; }
  to   { transform: scaleY(2.2); opacity: 1; }
}

/* Visualizer color changes per mood (ADDED) */
body.mood-chill #visualizer span { background: #00f2fe; }
body.mood-happy #visualizer span { background: #FFD700; }
body.mood-workout #visualizer span { background: #f12711; }
body.mood-heartbreak #visualizer span { background: #ff6a88; }


/* Playlist cards */
.playlist-container { display:grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap:18px; padding: 18px; max-width:1200px; margin: 16px auto;}
.playlist-card { background: rgba(0,0,0,0.35); border-radius:12px; padding:12px; color: #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.4); }
.playlist-card img { width:100%; border-radius:8px; object-fit:cover; height:140px; }
.playlist-card h3 { margin:10px 0 6px; font-size:1.05rem; }
.playlist-card p { margin:0; color: #ddd; font-size:0.95rem; }
.platform-links { margin-top:10px; display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.platform-links a { padding:8px 10px; border-radius:8px; background:rgba(255,255,255,0.06); color:#fff; text-decoration:none; font-weight:600; }


/* footer styles */
footer{
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: center;
    margin: 80px 0 0 0;
    padding: 0 10px;
    font-size: 12px;
    font-family: serif;
    letter-spacing: 3px; 
    background: var(--bg-primary);
    border-top: 0.5px solid var(--accent-primary);        
}

  .logo-f{
    display: block;
    width: 80px;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

/* browse.html playlist styles*/
.loading {
    color: #888;
    font-style: italic;
  }
  
  .error {
    color: red;
  }
  
  .track-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: transform 0.2s ease;
  }
  
  .track-card:hover {
    transform: scale(1.03);
  }

  .track-info h3 {
    margin: 0;
    color: #fff;
  }
  
  .track-info p {
    margin: 4px 0;
    color: #ccc;
  }
  
  .play-btn {
    color: #1DB954;
    text-decoration: none;
    font-weight: bold;
  }
  .play-btn:hover {
    text-decoration: underline;
  }


/*.... PickAPlatform.html ....*/
.container{
    border: 1px solid transparent;
    margin: 40px auto 80px auto;
    max-width: 900px;
}

.container h2{
    padding: 20px 30px;
    margin: 20px 0;
    text-align: center;
    font-size: 18px;
    font-family: serif;
    letter-spacing: 2px; 
    background: var(--text-primary);        
    -webkit-background-clip: text;
    background-clip: text;   
    -webkit-text-fill-color: transparent;
}

.logos-link{
    display: flex;
    flex-wrap: wrap; 
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 70px;
    margin: 70px auto 70px auto;
}

.logo{
    max-width: 100%;
    display: block;
    width: 70px;
    height: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* hover effect */
.logo {
  cursor: pointer;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: translateY(-10px) scale(1.05);
  filter: drop-shadow(0 16px 32px rgba(252, 183, 144, 0.4));
}

.logo:active {
  transform: translateY(-5px) scale(1.02);
}

/* INLINE STYLES FOR ANIMATIONS */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.player-container {
  transition: opacity 0.2s ease;
  min-height: 100px; /* Prevents layout shift */
}

  /* PickAPlatform iframe style */
  .player-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    text-align: center;
  }
  
  .player-container iframe {
    max-width: 450px;
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

/* PLATFORM FILTER BUTTONS */
.platform-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.platform-filter-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.platform-filter-btn.active {
  background: var(--accent-secondary);
  border-color: transparent;
  color: #000;
  box-shadow: 0 6px 20px rgba(252, 183, 144, 0.4);
}

  
  /* Coming Soon Card Styles */
  .coming-soon-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 20px;
    max-width: 400px;
    width: 100%;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
  }
  
  .coming-soon-card:hover {
    transform: scale(1.03);
  }
  
  .coming-soon-logo {
    width: 80px;
    margin-bottom: 15px;
    opacity: 0.9;
  }
  
  .coming-soon-card p {
    font-size: 1.1rem;
    color: #ddd;
    font-weight: 500;
  }
  
  /* 🎬 Smooth Fade + Scale Animation */
@keyframes fadeInScale {
    0% {
      opacity: 0;
      transform: scale(0.95);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  .player-container iframe,
  .coming-soon-card {
    animation: fadeInScale 0.6s ease forwards;
  }
  
  /*......audio preview for track-cards in browse.html*/
  .audio-player {
    width: 150px;
    height: 25px;
    margin-top: 5px;
    border-radius: 8px;
  }
  
  

/* LOADING STATES & ERROR BOUNDARIES */

/* SPINNER ANIMATION */
.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Dark mode spinner */
body:not(.light-mode) .spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
}

/* Light mode spinner */
body.light-mode .spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent-primary);
}

/* SLIDE DOWN ANIMATION for Error Banner */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* LOADING STATE for Search Results */
#search-results.loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ERROR STATE Styling */
.error-container {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 107, 107, 0.1);
  border: 2px solid rgba(255, 107, 107, 0.3);
  border-radius: 16px;
  margin: 20px;
}

.error-container h3 {
  color: #ff6b6b;
  margin-bottom: 10px;
  font-size: 20px;
}

.error-container p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* RETRY BUTTON Styling */
.retry-button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #1DB954, #1ed760);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
  transition: all 0.3s ease;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(29, 185, 84, 0.4);
}

.retry-button:active {
  transform: translateY(0);
}

.retry-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* DISABLED STATE for Inputs */
input:disabled,
button:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* RATE LIMIT WARNING Badge */
.rate-limit-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: slideInFromBottom 0.4s ease;
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* PULSE ANIMATION for Active Visualizer */
#visualizer.active span {
  animation: visualizer-pulse 0.6s ease-in-out infinite alternate !important;
}

@keyframes visualizer-pulse {
  from {
    height: 12px;
    opacity: 0.7;
  }
  to {
    height: 40px;
    opacity: 1;
  }
}

/* SKELETON LOADING for Playlist Cards */
.skeleton-card {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 12px;
  height: 300px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* SMOOTH FADE IN for Results */
.results-inner {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SEARCH INPUT Loading State */
.input.loading {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-card) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: input-loading 1.5s infinite;
}

@keyframes input-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* HOVER EFFECTS for Interactive Elements */
.mood-button:hover:not(:disabled),
.artist-button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.mood-button:active:not(:disabled),
.artist-button:active:not(:disabled) {
  transform: translateY(0) scale(1);
}

/* FOCUS STATES for Accessibility */
.input:focus,
.mood-button:focus,
.artist-button:focus,
button:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
  .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }

  .error-container {
    margin: 10px;
    padding: 30px 15px;
  }

  .error-container h3 {
    font-size: 18px;
  }

  .retry-button {
    padding: 10px 20px;
    font-size: 14px;
  }

  .rate-limit-badge {
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    padding: 10px 16px;
  }
}


@media (min-width: 768px) {

  .greeting-text {
    font-size: 30px;
  }

  .mood-question {
    font-size: 18px;
  }
  
  .search-input-wrapper {
    max-width: 384px !important;
  }

  .input{
    align-items: center;
  }

  .input::placeholder{  
    text-align: center;
  }

}

@media (max-width: 1000px) {
  .vibe-builder{
    max-width: 800px;
    margin: 25px auto;
  }
}

@media (max-width: 1020px) {
  .vibe-builder{
    max-width: 800px;
    margin: 25px auto;
  }
}


.mobile-version{
    display: block;
}

.desktop-version{
  display: none;
}

@media (min-width: 1024px) {
  .mobile-version{
      display: none;
  }
  
  .desktop-version{
    display: block;
  }

  .logo-t{
    margin: 0;
    padding: 0;
  }

.container-one {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    flex-direction: row;
    border-radius: 20px;
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-primary); 
    padding: 0 40px;
    box-sizing: border-box; 
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

  .desktop-links{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0 10px;
  }

  .desktop-links a{
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 10px !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-decoration: none;
    margin: 0;
    padding: 12px 24px;
  }

  .greeting-container{
    margin: 150px 0 0 0;
  }

  .mood-grido{
    max-width: 600px;
    margin: 0 auto;
  }

  .playlist-controls{
    margin: 150px auto 0 auto;
  }

  .container{
    margin: 130px auto 80px auto;
  }

  .vibe-builder{
    display: flex;
    justify-content: center;
  }

  .vibe-builder label{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
  }
  
}






/* IMPROVED TRACK CARD Hover States */
.result-track,
.track-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.result-track:hover,
.track-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* PLAYLIST CARD Improvements */
.result-playlist-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-playlist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

/* AUDIO PLAYER Styling */
audio.audio-player {
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  outline: none;
}

audio.audio-player::-webkit-media-controls-panel {
  background-color: var(--bg-card);
}

/* NO RESULTS Message */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.no-results svg {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* CONNECTION ERROR Icon */
.connection-error {
  text-align: center;
  padding: 40px 20px;
}

.connection-error::before {
  content: "📡";
  font-size: 64px;
  display: block;
  margin-bottom: 20px;
  opacity: 0.5;
  animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}





  

  