:root {
  --bg: #0a0514;
  --panel: rgba(25, 15, 45, 0.7);
  --panel-hover: rgba(40, 20, 70, 0.8);
  --line: rgba(138, 43, 226, 0.2);
  --txt: #f0eaff;
  --muted: #b5a7df;
  --accent: #bc13fe; /* Neon Purple */
  --secondary: #39ff14; /* Cyber Green - The Resurrection Color */
  --glass-border: 1px solid rgba(188, 19, 254, 0.2);
  --neon-glow: 0 0 15px rgba(188, 19, 254, 0.4);
  --resurrect-glow: 0 0 15px rgba(57, 255, 20, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(188, 19, 254, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(57, 255, 20, 0.1) 0px, transparent 50%);
  color: var(--txt);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  padding-bottom: 100px;
  overflow-x: hidden;
}

/* Glassmorphism sidebar */
.sidebar {
  padding: 24px;
  border-right: var(--glass-border);
  background: rgba(15, 5, 25, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar h1 {
  margin: 0 0 4px;
  font-size: 26px;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.sidebar h1::after {
  content: 'RESURRECTION';
  display: block;
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--secondary);
  -webkit-text-fill-color: var(--secondary);
  margin-top: -4px;
  font-weight: 900;
}

.tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--txt);
  padding: 12px 16px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.tab:hover {
  background: rgba(188, 19, 254, 0.1);
  transform: translateX(4px);
}

.tab.active {
  background: var(--accent);
  box-shadow: var(--neon-glow);
  border-color: rgba(255, 255, 255, 0.2);
}

.box {
  margin-top: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.box label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.box input {
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: var(--glass-border);
  border-radius: 10px;
  font-size: 13px;
}

.box button {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

main { padding: 32px; }

header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}

#title { font-size: 32px; margin: 0; font-weight: 800; color: #fff; }

.searchbar { display: flex; gap: 12px; min-width: 360px; }
.searchbar input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 14px;
  border: var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  backdrop-filter: blur(4px);
}

.searchbar button {
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Grid Layout */
.panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.hidden { display: none; }

/* Polished Glass Cards */
.card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--panel-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  border-color: var(--secondary);
}

.card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 14px;
  background: #1a0525;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card h4 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.gemline {
  font-size: 13px;
  color: var(--secondary);
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
  width: fit-content;
  font-weight: 700;
}

.whyline {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row { display: flex; gap: 8px; }
.row button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.row button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Primary actions inside cards */
.card button[data-play], .card button[data-pick] {
  background: var(--accent);
}

.card button[data-play]:hover {
  box-shadow: var(--neon-glow);
}

/* Coin Badge & Group */
.coin-group {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 10;
}

.coin-badge {
  background: var(--secondary);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: var(--resurrect-glow);
  text-decoration: none;
  transition: transform 0.2s;
}

.scan-link {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--line);
}

.coin-badge:hover, .scan-link:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* ============================
   SPOTIFY-STYLE PLAYER
   ============================ */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: rgba(15, 5, 30, 0.98);
  backdrop-filter: blur(24px);
  border-top: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

/* Left: Track Info */
.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  width: 30%;
}

.player-left img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.track-info #nowTitle {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.track-info #nowArtist {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.like-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  transition: all 0.2s;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.like-btn:hover {
  opacity: 1;
  color: var(--accent);
}

.like-btn.liked {
  color: var(--accent);
  opacity: 1;
}

.like-btn svg {
  transition: all 0.2s;
}

/* Center: Playback Controls */
.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 500px;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0.7;
}

.control-btn:hover {
  opacity: 1;
  color: #fff;
  transform: scale(1.1);
}

.control-btn.active {
  color: var(--secondary);
  opacity: 1;
}

.play-pause-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #0a0514;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.play-pause-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.progress-container span {
  font-size: 11px;
  color: var(--muted);
  min-width: 35px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.progress-bar-wrapper {
  flex: 1;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.seek-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.progress-bar-wrapper:hover .progress-bar-bg {
  height: 6px;
}

.progress-bar-wrapper:hover .progress-bar-fill {
  background: var(--secondary);
}

/* Right: Volume */
.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 180px;
  width: 30%;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-bar-wrapper {
  width: 93px;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
}

.volume-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.volume-bar-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 100%;
  transition: width 0.1s;
}

.volume-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.volume-bar-wrapper:hover .volume-bar-bg {
  height: 6px;
}

.volume-bar-wrapper:hover .volume-bar-fill {
  background: var(--accent);
}

.notice {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed rgba(188, 19, 254, 0.3);
  border-radius: 20px;
  background: rgba(188, 19, 254, 0.05);
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1200px) {
  .panel { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .sidebar {
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: var(--glass-border);
  }
  header { flex-direction: column; align-items: stretch; }
  .searchbar { min-width: 0; }
  
  .player {
    padding: 0 12px;
    height: 80px;
  }
  
  .player-left img {
    width: 48px;
    height: 48px;
  }
  
  .player-right {
    display: none;
  }
  
  .track-info #nowArtist {
    display: none;
  }
}
