:root {
  --bg: #050505;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --accent: #ff2d55;
  --secondary: #5856d6;
  --text: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- ORBS --- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  animation: float 20s infinite ease-in-out;
  opacity: 0.5;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: var(--accent);
}

.orb-2 {
  bottom: -10%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: var(--secondary);
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 20px) scale(1.1); }
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

h1 {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -2px;
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

/* --- GLASS PANEL --- */
.panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- INPUTS --- */
.input-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 1.5rem 2rem;
  border-radius: 20px;
  color: #fff;
  font-size: 1.2rem;
  outline: none;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(255, 45, 85, 0.15);
}

/* STICKY SEARCH BANNER */
.input-box.sticky {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  z-index: 1000;
  padding: 0;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-box.sticky input {
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 1rem 2rem;
}

@keyframes slideDown {
  from { transform: translate(-50%, -100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.btn-go {
  position: absolute;
  right: 10px;
  top: 10px;
  bottom: 10px;
  padding: 0 2rem;
  background: var(--accent);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-go:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--accent);
}

.btn-go:disabled {
  filter: grayscale(1);
  cursor: wait;
}

/* --- SEARCH GRID --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2.5rem;
  width: 100%;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
  }
  .container { padding: 1rem; }
  .search-box { flex-direction: column; gap: 1rem; }
  .search-box input { border-radius: 12px; }
  .btn-go { border-radius: 12px; width: 100%; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
  .container { gap: 1.5rem; padding: 68px 10px 20px; }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  .input-box { max-width: 100%; }

  input {
    padding: 0.8rem 1rem;
    padding-right: 5rem;
    font-size: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
  }

  .btn-go {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    padding: 0 1rem;
    font-size: 0.8rem;
    width: auto;
    height: auto;
    border-radius: 14px;
  }

  .input-box.sticky {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 96%;
    z-index: 1000;
    padding: 0;
  }

  .input-box.sticky input {
    padding: 0.8rem 1rem;
    padding-right: 5rem;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .c-title {
    font-size: .78rem;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: nowrap;
  }

  .c-artist { font-size: .68rem; margin-bottom: 4px; }

  .download-btn-sm {
    padding: 4px 0;
    font-size: .72rem;
    border-radius: 4px;
  }
}

.card {
  position: relative;
  background: transparent;
  cursor: pointer;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  overflow: visible;
  z-index: 1;
}

.card:hover { z-index: 100; }

.cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  margin-bottom: 0.4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.card:hover .cover-wrapper {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  position: relative;
  z-index: 5;
  display: block;
}

@media (max-width: 480px) {
  .cover-wrapper { border-radius: 16px; }
}

.card-info {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: background 0.3s;
}

.card:hover .card-info {
  background: #000;
  border-color: rgba(255, 255, 255, 0.2);
}

/* VINYL RECORD */
.vinyl-record {
  position: absolute;
  top: 2.5%;
  left: 2.5%;
  width: 95%;
  height: 95%;
  border-radius: 50%;
  background: radial-gradient(circle, #111 60%, #000 65%, #222 66%, #111 100%);
  background-image: repeating-radial-gradient(#151515 0, #151515 2px, #222 3px, #111 4px);
  z-index: 1;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-record::after {
  content: '';
  width: 25%;
  height: 25%;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #000;
}

.card:hover .vinyl-record {
  transform: translateX(50%) rotate(180deg);
}

.c-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-artist {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.8rem;
}

.download-btn-sm {
  width: 100%;
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  position: relative;
  z-index: 10;
}

.download-btn-sm:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* --- SPINNER --- */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* VINYL SCROLL BUTTON */
.vinyl-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 80px;
  height: 80px;
  cursor: pointer;
  z-index: 1000;
}

.vinyl-btn:hover { transform: scale(1.05); }
.vinyl-btn:active { transform: scale(0.95); }

.vinyl-sleeve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #222;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
  overflow: hidden;
  transition: transform 0.3s;
}

.vinyl-sleeve img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vinyl-wrapper {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  right: 2px;
  z-index: 1;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  animation: spin 8s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.vinyl-disc svg {
  display: block;
  border-radius: 50%;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
}

.vinyl-btn.active .vinyl-wrapper { transform: translateX(50%); }

/* --- TOP PROGRESS BAR --- */
.top-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.top-progress-track {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}

.top-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--accent), 0 0 5px var(--accent);
}

/* --- SCROLL RULER (MINIMAL) --- */
.scroll-ruler {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 900;
  pointer-events: none;
}

.ruler-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
  font-variant-numeric: tabular-nums;
}

.ruler-num.active {
  color: #fff;
  transform: scale(1.5);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  opacity: 1;
}

.ruler-num.secondary {
  opacity: 0.5;
  transform: scale(1.1);
}

.ruler-line {
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
