* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue-dark: #050b22;
  --blue-main: #1c3b80;
  --blue-soft: #4677d3;
  --blue-light: #c7dbff;
  --yellow-sunflower: #ffc935;
  --rose-blue: #5676ff;
  --rose-blue-deep: #1f2f80;
  --bg-gradient: radial-gradient(circle at top, #274b9f 0, #050414 55%, #02020a 100%);
  --text-main: #f7fbff;
  --text-soft: #c9d8ff;
  --card-bg: rgba(9, 20, 60, 0.9);
  --card-border: rgba(131, 167, 255, 0.3);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.6);
  --radius-xl: 22px;
}

/* Body base */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", sans-serif;
  min-height: 100vh;
  background: var(--bg-gradient);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* App container */

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Pantallas */

.screen {
  position: absolute;
  inset: 0;
  display: none;
  padding: 24px 18px 18px;
}

.screen.active {
  display: flex;
}

/* Intro screens */

.screen-intro {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at top, #345ed1 0, #050414 60%);
}

.screen-content {
  max-width: 320px;
}

.screen-text {
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--text-main);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 1.2s ease forwards;
}

.main-quote {
  font-weight: 600;
}

.secondary-quote {
  font-size: 1.3rem;
}

/* Mixtape screen */

.mixtape-screen {
  display: none;
  flex-direction: column;
  padding: 18px 16px 18px;
}

/* Decoraciones de fondo */

.background-decorations {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.flower {
  position: absolute;
  opacity: 0.5;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7));
}

/* Posición aproximada */
.sunflower {
  width: 96px;
  right: -10px;
  bottom: 42%;
}

.blue-rose {
  width: 110px;
  left: -18px;
  top: 55%;
}

/* Girasol */

.sunflower-center {
  fill: #5a3b10;
}

.sunflower-petals ellipse {
  fill: var(--yellow-sunflower);
}

/* Rosa azul */

.rose-petal {
  fill: url(#roseBlueGradient);
}

.rose-core {
  fill: var(--rose-blue-deep);
}

/* Fallback si no hay gradient definido */
.blue-rose .rose-petal {
  fill: var(--rose-blue);
}

/* Header */

.mixtape-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8px 12px 12px;
}

.mixtape-header h1 {
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-soft);
}

.tiny-detail {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--blue-light);
}

/* Casete */

.cassette-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 10px 0 18px;
}

.cassette {
  width: 92%;
  max-width: 360px;
  background: linear-gradient(145deg, #101631, #060b1b);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  padding: 12px 16px 14px;
  border: 1px solid rgba(117, 148, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.cassette::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 210deg, rgba(156, 190, 255, 0.12), transparent, rgba(43, 93, 255, 0.16), transparent, rgba(196, 212, 255, 0.1));
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: lightSweep 10s linear infinite;
}

.cassette-top {
  height: 8px;
  border-radius: 18px;
  background: radial-gradient(circle at top, #1f437c, #050711);
  margin-bottom: 10px;
}

.cassette-label {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(198, 212, 255, 0.14), rgba(31, 60, 135, 0.7));
  border-radius: 16px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid rgba(185, 207, 255, 0.55);
}

.label-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blue-light);
}

.label-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
}

.cassette-window {
  position: relative;
  margin-top: 12px;
  margin-bottom: 8px;
  background: radial-gradient(circle at top, #18285e, #020312);
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(90, 130, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.reel {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #cfd8ff;
  background: radial-gradient(circle, #fdfdff 0, #9caeff 40%, #38499b 70%, #0e1430 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: reelSpin 8s linear infinite;
}

.reel-inner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #050818;
  box-shadow: 0 0 0 3px rgba(212, 222, 255, 0.6);
}

.left-reel {
  animation-delay: -2s;
}

.tape-band {
  flex: 1;
  height: 4px;
  margin: 0 8px;
  border-radius: 999px;
  background-image: linear-gradient(90deg, rgba(189, 209, 255, 0.4), rgba(11, 39, 133, 0.8));
  position: relative;
  overflow: hidden;
}

.tape-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 4px);
  animation: tapeFlow 4s linear infinite;
  opacity: 0.7;
}

.cassette-bottom {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  padding-inline: 10px;
}

.screw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #9caeff;
  background: radial-gradient(circle, #fff 0, #7a8ee0 45%, #050818 100%);
}

/* Tabs de grupos */

.track-groups {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  margin-top: 4px;
}

.group-tab {
  flex: 1;
  max-width: 160px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(167, 191, 255, 0.6);
  background: radial-gradient(circle at top, rgba(126, 158, 255, 0.3), rgba(7, 10, 34, 0.95));
  color: var(--text-soft);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.group-tab.active {
  background: radial-gradient(circle at top, #4e7bff, #060b1b);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(81, 120, 255, 0.6);
  transform: translateY(-2px);
}

/* Contenedor de tracks */

.tracks-container {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  max-height: calc(100vh - 360px);
}

/* Tarjeta track */

.track-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 12px 12px 10px;
  margin-bottom: 10px;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.track-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.track-main-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.track-text {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.track-artist {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.track-note {
  font-size: 0.8rem;
  margin-top: 6px;
  color: var(--blue-light);
}

.track-tags {
  font-size: 0.7rem;
  margin-top: 4px;
  color: var(--text-soft);
  opacity: 0.9;
}

.track-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.spotify-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1db954, #1aa34a);
  border: none;
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.spotify-link span.icon {
  font-size: 0.8rem;
}

.spotify-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.6);
}

.group-pill {
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(184, 209, 255, 0.7);
  color: var(--text-soft);
}

/* Footer */

.mixtape-footer {
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  text-align: center;
  margin-top: 8px;
  color: var(--text-soft);
  opacity: 0.9;
}

/* Scroll */

.tracks-container::-webkit-scrollbar {
  width: 4px;
}

.tracks-container::-webkit-scrollbar-track {
  background: transparent;
}

.tracks-container::-webkit-scrollbar-thumb {
  background: rgba(125, 151, 255, 0.6);
  border-radius: 999px;
}

/* Animaciones */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lightSweep {
  0% {
    transform: translateX(-10%) rotate(0deg);
  }
  100% {
    transform: translateX(10%) rotate(360deg);
  }
}

@keyframes reelSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes tapeFlow {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Responsivo leve */

@media (min-width: 480px) {
  .screen {
    padding-inline: 30px;
  }
}
