/* ==========================================================================
   SYNTH ENGINE - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Dark Obsidian, Neon Accents, Glassmorphism, Modern Typography
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #090a10;
  --bg-card: rgba(18, 20, 32, 0.75);
  --bg-card-hover: rgba(26, 29, 48, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;

  /* Neon Accents */
  --neon-cyan: #00f3ff;
  --neon-magenta: #ff0077;
  --neon-gold: #ffb700;
  --neon-purple: #9d4edd;
  --neon-green: #00ff88;
  --neon-orange: #ff6600;

  /* Platform Colors */
  --youtube-red: #ff0033;
  --youtube-glow: rgba(255, 0, 51, 0.4);
  --spotify-green: #1db954;
  --spotify-glow: rgba(29, 185, 84, 0.4);

  /* Fonts */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Background Ambient Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
}

.bg-glow-1 {
  top: -10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--neon-cyan), transparent);
}

.bg-glow-2 {
  top: 40%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--neon-magenta), transparent);
}

/* Header & Hero */
.hero-header {
  position: relative;
  padding: 4rem 0 3rem 0;
  border-bottom: 1px solid var(--border-card);
  background: linear-gradient(180deg, rgba(15, 17, 28, 0.9) 0%, rgba(9, 10, 16, 1) 100%);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid rgba(0, 243, 255, 0.3);
  color: var(--neon-cyan);
  font-family: var(--font-display);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.highlight-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.sub-title {
  display: block;
  font-size: 0.45em;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.4rem;
  letter-spacing: 0;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 2rem;
}

/* Metrics Bar */
.metrics-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  background: rgba(15, 18, 30, 0.6);
  border: 1px solid var(--border-card);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  max-width: 800px;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  line-height: 1;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.metric-divider {
  width: 1px;
  height: 30px;
  background-color: var(--border-card);
}

/* Sticky Controls Section */
.controls-section {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 10, 16, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  padding: 1rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.search-filter-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: rgba(18, 22, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.9rem 3rem 0.9rem 3.2rem;
  color: var(--text-bright);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
  background: rgba(24, 29, 50, 0.9);
}

.clear-search-btn {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.clear-search-btn:hover {
  color: var(--text-bright);
}

/* Filter Buttons Grid (2 Filas x 6 Columnas en escritorio, carrusel horizontal limpio en móvil para no tapar el contenido) */
.filter-tabs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

@media (max-width: 1100px) {
  .filter-tabs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .controls-section {
    padding: 0.65rem 0;
  }

  .search-filter-wrapper {
    gap: 0.65rem;
  }

  .filter-tabs-grid {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-cyan) transparent;
  }

  .filter-tabs-grid::-webkit-scrollbar {
    height: 3px;
  }
  .filter-tabs-grid::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 3px;
  }

  .filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.775rem;
    padding: 0.45rem 0.85rem;
    min-height: 36px;
  }
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: 30px;
  padding: 0.55rem 0.8rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: rgba(0, 243, 255, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
}

.fav-filter-btn.active {
  background: rgba(255, 0, 119, 0.15);
  color: var(--neon-magenta);
  border-color: var(--neon-magenta);
  box-shadow: 0 0 12px rgba(255, 0, 119, 0.25);
}

/* Movement Sections */
.movement-block {
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
  scroll-margin-top: 180px;
}

@media (max-width: 768px) {
  .movement-block {
    scroll-margin-top: 120px;
  }
}

.movement-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-card);
  position: relative;
}

.movement-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.movement-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
}

.movement-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.movement-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}

.movement-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 850px;
}

/* Grid of Artist Cards */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Artist Card Component */
.artist-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.artist-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--card-accent, var(--neon-cyan));
  opacity: 0.7;
}

.artist-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 243, 255, 0.1);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.artist-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
}

.artist-origin {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.fav-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0.2rem;
}

.fav-btn:hover, .fav-btn.is-fav {
  color: var(--neon-magenta);
  transform: scale(1.15);
  text-shadow: 0 0 10px var(--neon-magenta);
}

.card-sound {
  background: rgba(0, 0, 0, 0.3);
  border-left: 2px solid var(--card-accent, var(--neon-cyan));
  padding: 0.75rem 0.9rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}

.sound-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--card-accent, var(--neon-cyan));
  margin-bottom: 0.25rem;
}

.sound-text {
  font-size: 0.875rem;
  color: var(--text-main);
  line-height: 1.4;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag-pill {
  font-size: 0.725rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  color: var(--text-muted);
}

.card-key-tracks {
  margin-bottom: 1.25rem;
}

.key-tracks-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.track-chips {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.track-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.track-name {
  color: var(--text-bright);
  font-weight: 500;
}

.track-actions {
  display: flex;
  gap: 0.4rem;
}

.media-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.media-link-yt {
  background: rgba(255, 0, 51, 0.15);
  border: 1px solid rgba(255, 0, 51, 0.4);
  color: #ff4d6d;
}

.media-link-yt:hover {
  background: var(--youtube-red);
  color: #fff;
  box-shadow: 0 0 15px var(--youtube-glow);
}

.media-link-sp {
  background: rgba(29, 185, 84, 0.15);
  border: 1px solid rgba(29, 185, 84, 0.4);
  color: #1ed760;
}

.media-link-sp:hover {
  background: var(--spotify-green);
  color: #000;
  box-shadow: 0 0 15px var(--spotify-glow);
}

.card-footer-action {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
}

.detail-trigger-btn {
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
}

.detail-trigger-btn:hover {
  color: #fff;
  transform: translateX(3px);
}

/* No Results Box */
.no-results-box {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.reset-search-btn {
  margin-top: 1.5rem;
  background: var(--neon-cyan);
  color: #000;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.reset-search-btn:hover {
  box-shadow: 0 0 20px var(--neon-cyan);
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 6, 12, 0.85);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: #111422;
  border: 1px solid rgba(0, 243, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 243, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  color: var(--text-main);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-bright);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--neon-magenta);
  color: #fff;
}

.modal-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-bright);
  margin-top: 0.2rem;
}

.modal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal-section {
  margin-bottom: 1.25rem;
}

.modal-section h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--neon-cyan);
  margin-bottom: 0.4rem;
}

.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* Site Footer */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-card);
  background: #06070b;
  padding: 3rem 0 2rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-family: var(--font-display);
  color: var(--text-bright);
  font-size: 1.25rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: var(--font-display);
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .metrics-bar {
    gap: 1rem;
  }

  .metric-divider {
    display: none;
  }

  .artists-grid {
    grid-template-columns: 1fr;
  }

  .synth-keys {
    grid-template-columns: repeat(2, 1fr);
  }
}
