/* Reset & Basic Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Circular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
  background-color: #000;
  color: #fff;
  overflow: hidden;
  height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #535353;
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b3b3b3;
}

.app-container {
  display: flex;
  height: calc(100vh - 90px);
  /* Subtract player bar height */
}

/* Sidebar */
.sidebar {
  width: 240px;
  background-color: #000;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1500;
  display: none;
}

.close-sidebar {
  display: none;
  font-size: 24px;
  color: #b3b3b3;
  cursor: pointer;
}

.sidebar .logo i {
  font-size: 40px;
  margin-right: 5px;
}

.nav-menu ul {
  list-style: none;
}

.nav-menu li {
  padding: 10px 0;
  color: #b3b3b3;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  display: flex;
  align-items: center;
}

.nav-menu li:hover,
.nav-menu li.active {
  color: #fff;
}

.nav-menu li i {
  margin-right: 15px;
  font-size: 20px;
}

.policies {
  margin-top: auto;
  font-size: 12px;
}

.policies a {
  text-decoration: none;
  color: #b3b3b3;
  display: block;
  margin-bottom: 5px;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  background: linear-gradient(to bottom, #1d1d1d, #121212 40%);
  overflow-y: auto;
  padding: 24px;
  position: relative;
  border-radius: 8px;
  margin: 8px 8px 0 0;
  transition: background 0.5s ease;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  padding-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
}

.menu-btn {
  display: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  margin-right: 15px;
  transition: transform 0.2s;
}

.menu-btn:active {
  transform: scale(0.9);
}

.nav-buttons {
  display: flex;
  gap: 15px;
}

.search-bar {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-bar i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #b3b3b3;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  background-color: #242424;
  border: none;
  border-radius: 500px;
  padding: 12px 12px 12px 40px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.search-bar input:hover {
  background-color: #2a2a2a;
  box-shadow: 0 0 0 1px #535353;
}

.search-bar input:focus {
  background-color: #2a2a2a;
  box-shadow: 0 0 0 2px #fff;
}

.nav-buttons button {
  background: #000000;
  border: none;
  border-radius: 50%;
  color: #fff;
  width: 32px;
  height: 32px;
  cursor: pointer;
  margin-right: 10px;
}



.user-menu .login {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 12px 32px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s, background-color 0.2s;
}

.user-menu .login:hover {
  transform: scale(1.05);
  background-color: #00d4ff;
  color: #fff;
}

.content-spacing h2 {
  margin-bottom: 20px;
}

/* Playlist Detail Header */
.playlist-header-detail {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 30px;
  padding: 20px 0;
}

.playlist-art-large {
  width: 232px;
  height: 232px;
  background: linear-gradient(135deg, #282828, #121212);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.playlist-art-large i {
  font-size: 80px;
  color: #00d4ff;
}

.playlist-info-detail p {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.playlist-info-detail h2 {
  font-size: 72px;
  font-weight: 900;
  margin: 8px 0;
  line-height: 1;
}

@media screen and (max-width: 768px) {
  .playlist-header-detail {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .playlist-art-large {
    width: 180px;
    height: 180px;
  }

  .playlist-info-detail h2 {
    font-size: 36px;
  }
}

/* Cards */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.card {
  background-color: #181818;
  padding: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: relative;
}

.card:hover {
  background-color: #282828;
}

.album-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  margin-bottom: 16px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background-size: cover;
  background-position: center;
}

/* Gradients for placeholders - No longer needed as we have images */
/* Removed art-1 to art-4 classes */

/* Play Button on Card (appears on hover) */
.play-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: #fff;
  color: #00d4ff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-size: 24px;
  padding-left: 4px;
}

.card:hover .play-btn,
.card.active-card .play-btn {
  opacity: 1;
  transform: translateY(0);
}

.card.active-card h3 {
  color: #00d4ff;
}

.add-to-playlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s ease;
  font-size: 14px;
  z-index: 10;
}

.card:hover .add-to-playlist-btn {
  opacity: 1;
}

.add-to-playlist-btn:hover {
  background-color: #00d4ff;
  transform: scale(1.1);
}

.card-text {
  width: 100%;
  overflow: hidden;
}

.card-text h3,
.card-text p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-btn i {
  /* Fix icon alignment inside circle */
  margin: 0;
  padding: 0;
}

.fa-play {
  padding-left: 3px;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card p {
  font-size: 14px;
  color: #b3b3b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom Player Bar */
.player-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 90px;
  background-color: #181818;
  border-top: 1px solid #282828;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.player-left {
  display: flex;
  align-items: center;
  width: 30%;
}

.current-art {
  width: 56px;
  height: 56px;
  background-color: #333;
  /* Default gray */
  margin-right: 14px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
}

.current-info h4 {
  font-size: 14px;
  margin-bottom: 2px;
}

.current-info p {
  font-size: 11px;
  color: #b3b3b3;
}

.like-icon {
  margin-left: 20px;
  color: #b3b3b3;
  cursor: pointer;
}

.like-icon:hover {
  color: #fff;
}

.like-icon.liked {
  color: #00d4ff;
}

.plus-icon:hover {
  color: #fff !important;
  transform: scale(1.1);
}

.player-center {
  width: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
}

.player-controls i {
  color: #b3b3b3;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.player-controls i:hover {
  color: #fff;
}

.player-controls i.active-icon {
  color: #00d4ff;
}

.player-controls i.active-icon::after {
  content: "•";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
}

.player-controls i {
  position: relative;
}

.play-pause-btn {
  color: #fff !important;
  font-size: 32px !important;
}

.play-pause-btn i {
  color: #00d4ff;
  font-size: 32px;
}

.play-pause-btn:hover {
  transform: scale(1.1);
}

.progress-container {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  font-size: 11px;
  color: #b3b3b3;
}

/* Range Input Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #535353;
  cursor: pointer;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 12px;
  width: 12px;
  background-color: #fff;
  border-radius: 50%;
  display: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.progress-container:hover input[type="range"]::-webkit-slider-thumb,
.volume-container:hover input[type="range"]::-webkit-slider-thumb {
  display: block;
}

.progress-container:hover input[type="range"] {
  height: 4px;
}

.player-right {
  width: 30%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
}

.player-right i {
  color: #b3b3b3;
  font-size: 16px;
}

.volume-container {
  display: flex;
  align-items: center;
  width: 100px;
  gap: 10px;
}

/* Mobile Navigation Styles */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(18, 18, 18, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  /* Shown in media query */
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #b3b3b3;
  text-decoration: none;
  font-size: 11px;
  transition: all 0.3s ease;
  flex: 1;
  padding: 10px 0;
}

.mobile-nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.mobile-nav-item.active {
  color: #fff;
}

.mobile-nav-item.active i {
  color: #00d4ff;
  transform: translateY(-2px);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 2000;
    background-color: #000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    /* Override display: none if present */
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .close-sidebar {
    display: block;
  }

  .menu-btn {
    display: block;
  }

  .app-container {
    height: calc(100vh - 90px);
  }

  .main-content {
    margin: 0;
    padding: 12px;
    padding-bottom: 100px;
  }

  header {
    flex-direction: row;
    /* Keep search and menu on same line */
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
  }

  .header-left {
    width: auto;
    flex: 1;
  }

  .search-bar {
    width: 100%;
    margin-right: 10px;
  }

  .user-menu {
    width: auto;
  }

  .nav-buttons {
    display: none;
  }

  /* Adjust card container for general mobile */
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card {
    padding: 10px;
    min-height: auto;
  }

  .card-text h3 {
    font-size: 14px;
    margin-top: 8px;
  }

  .card-text p {
    font-size: 12px;
  }

  .play-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
    opacity: 1;
    /* Always visible on mobile */
    transform: translateY(0);
  }

  /* Player Bar - Full width on mobile footer */
  .player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100px;
    z-index: 1001;
    background-color: #121212;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .player-left {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .current-art {
    width: 45px;
    height: 45px;
    border-radius: 4px;
  }

  .current-info h4 {
    font-size: 14px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .progress-container {
    display: flex !important;
    width: 100%;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
  }

  .progress-container span {
    font-size: 11px;
    color: #b3b3b3;
    min-width: 30px;
  }

  .player-controls {
    width: 100%;
    justify-content: center;
    gap: 20px;
    display: flex;
    align-items: center;
  }

  .player-controls i {
    display: block !important;
    font-size: 18px;
  }

  .play-pause-btn i {
    font-size: 40px;
  }

  .player-right {
    display: none;
  }

  .mobile-nav {
    display: none !important;
    /* Force remove if still styled elsewhere */
  }

  .mobile-nav-item i {
    font-size: 22px;
  }

  .mobile-nav-item span {
    font-size: 11px;
    margin-top: 4px;
  }
}

@media screen and (max-width: 400px) {
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .current-info h4 {
    max-width: 100px;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.modal-content {
  background-color: #121212;
  width: 100%;
  max-width: 400px;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  border: 1px solid #333;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.close-modal {
  font-size: 24px;
  color: #b3b3b3;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.close-modal:hover {
  color: #fff;
  transform: rotate(90deg);
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.input-group input {
  width: 100%;
  background-color: #242424;
  border: 1px solid #535353;
  border-radius: 4px;
  padding: 14px;
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.input-group input:focus {
  border-color: #00d4ff;
  background-color: #2a2a2a;
}

.auth-submit {
  width: 100%;
  background-color: #00d4ff;
  color: #fff;
  border: none;
  border-radius: 500px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.auth-submit:hover {
  background-color: #33e0ff;
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.modal-footer {
  text-align: center;
  margin-top: 25px;
}

.modal-footer a {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.modal-footer a:hover {
  color: #00d4ff;
  text-decoration: underline;
}

.modal-footer hr {
  margin: 25px 0;
  border: 0;
  border-top: 1px solid #282828;
}

.modal-footer p {
  color: #b3b3b3;
  font-size: 14px;
}

.modal-footer p a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

.modal-footer p a:hover {
  color: #00d4ff;
}

/* Interactive Element Animations */
button,
.play-btn,
.like-icon,
.player-controls i,
.nav-menu li,
.mobile-nav-item,
.logo {
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  /* Bouncy effect */
}

button:hover,
.play-btn:hover,
.like-icon:hover,
.player-controls i:hover,
.nav-menu li:hover,
.mobile-nav-item:hover,
.logo:hover {
  transform: scale(1.1);
}

button:active,
.play-btn:active,
.like-icon:active,
.player-controls i:active,
.nav-menu li:active,
.mobile-nav-item:active,
.logo:active {
  transform: scale(0.95);
}

/* Specific adjustments for cards to avoid conflict */
.card {
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card:active {
  transform: scale(0.98);
}

/* Logo Specific Animation */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  animation: iconGlow 3s infinite alternate;
  color: #00d4ff;
  text-shadow: 0 0 10px rgb(129, 160, 253);
}

.logo span {
  background: linear-gradient(to right,
      #fff 10%,
      #00d4ff 30%,
      #00d4ff 50%,
      #00d4ff 70%,
      #fff 90%);
  background-size: 200% auto;
  color: #fff;
  background-clip: text;
  text-fill-color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
  font-weight: 800;
}

@keyframes textShimmer {
  to {
    background-position: 200% center;
  }
}

@keyframes iconGlow {
  0% {
    transform: rotate(-5deg) scale(1);
    color: #00d4ff;
    filter: drop-shadow(0 0 5px #00d4ff);
  }

  50% {
    color: #fff;
    filter: drop-shadow(0 0 15px #fff);
  }

  100% {
    transform: rotate(5deg) scale(1.1);
    color: #00d4ff;
    filter: drop-shadow(0 0 20px #00d4ff);
  }
}

/* Bubble Background Effect */
.bubble-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: #000;
}

.bubble {
  position: absolute;
  bottom: -100px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 50%;
  opacity: 0.5;
  animation: moveBubbles 15s linear infinite;
}

@keyframes moveBubbles {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-120vh) scale(1.5);
    opacity: 0;
  }
}

/* Page & Card Entrance Animations */
.main-content {
  animation: fadeInPage 0.8s ease-out;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

/* Floating Animation for Sidebar Items */
.nav-menu li {
  position: relative;
  overflow: hidden;
}

.nav-menu li::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #00d4ff;
  transition: width 0.3s ease;
}

.nav-menu li:hover::after {
  width: 100%;
}

/* Playing Song Pulsing Effect */
.active-card .album-art {
  animation: artPulse 2s infinite ease-in-out;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

@keyframes artPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Welcome Header Animation */
.welcome-header {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #fff, #00d4ff, #fff);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: welcomeSlide 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards,
    welcomeShimmer 3s ease infinite;
  display: inline-block;
  filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.3));
}

@keyframes welcomeSlide {
  from {
    opacity: 0;
    transform: translateX(-30px) skewX(-10deg);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0) skewX(0deg);
    filter: blur(0);
  }
}

@keyframes welcomeShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Play/Pause Icon Pop Animation */
.fa-play,
.fa-pause,
.fa-play-circle,
.fa-pause-circle {
  animation: playPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes playPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Enhanced Active Card Animation */
.active-card {
  background-color: #282828 !important;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.active-card .album-art {
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

/* Master Play Button Glow when playing */
.fa-pause-circle {
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}
