:root {
  --bg:        #1a1f18;   /* verde oscuro casi negro, como tierra húmeda */
  --surface:   #242920;   /* cards — verde musgo oscuro */
  --surface-2: #2e3429;   /* inputs — un paso más claro */
  --line:      #3d4436;   /* borders — oliva oscuro */
  --text:      #edf0e4;   /* texto — blanco verdoso suave */
  --muted:     #a8b09a;   /* texto secundario — sage gris */
  --accent:    #c8b84a;   /* amarillo ocre — acción principal */
  --accent-2:  #72b87a;   /* verde suave — connect/success */
  --danger:    #e06b5a;   /* terracota rojo — skip/reject */
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 8px 30px rgba(0,0,0,0.40);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.28);
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  padding: 32px 20px 60px;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* ---------- Navigation ---------- */
nav {
  background-color: rgba(20, 18, 25, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  padding: 14px 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 6px;
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius);
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

/* hide the literal "|" separators visually but keep markup intact */
nav { font-size: 0; }              /* collapse whitespace text nodes */
nav a, nav img, nav br { font-size: 15px; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .18s ease, background-color .18s ease;
  white-space: nowrap;
}

nav a:hover {
  color: var(--text);
  background-color: var(--surface-2);
  text-decoration: none;
}

nav img {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover;
  border-radius: 50% !important;
  border: 2px solid var(--accent);
  margin-left: 8px;
}
nav br { display: none; }

/* ---------- Headings & text ---------- */
h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 22px;
}

h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 14px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px;
}

p { font-size: 1.05rem; color: var(--text); margin: 0 0 18px; }
em { color: var(--muted); font-style: normal; font-weight: 600; }
a { color: var(--accent); }

/* ---------- Forms ---------- */
form {
  background-color: var(--surface);
  padding: 28px 30px;
  border-radius: var(--radius);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  text-align: left;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background-color: var(--surface-2);
  color: var(--text);
  font-size: 16px;            /* 16px = no iOS zoom on focus */
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder, textarea::placeholder { color: #7c7888; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

input[type="file"] {
  width: 100%;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
button,
button[type="submit"] {
  background-color: var(--accent);
  color: #fff;
  padding: 13px 26px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, filter .18s ease;
}

button[type="submit"] { width: 100%; }

button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 3px solid rgba(124,92,255,.5); outline-offset: 2px; }

/* ---------- Tags (artists / genres) ---------- */
.artist-tag, .genre-tag, .tag {
  display: inline-block;
  background-color: var(--surface-2);
  color: var(--text);
  padding: 7px 14px;
  margin: 4px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.genre-tag { border-color: rgba(124,92,255,.4); color: #cdbcff; }

/* index.html popular-artists list (it has inline flex already) */
.artist-list {
  background-color: var(--surface);
  color: var(--text);
  max-width: 520px;
  margin: 0 auto 36px;
  padding: 20px;
  border-radius: var(--radius);
  list-style-type: none;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  text-align: left;
}

.artist-list li {
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.artist-list li:last-child { border-bottom: none; }

.artist-container {
  max-width: 600px;
  margin: 0 auto 36px;
  padding: 20px;
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---------- Match cards ---------- */
.match-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px auto;
  max-width: 560px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease;
  text-align: left;
}
.match-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background-color: var(--surface);
}
.match-image {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  margin-right: 16px;
  flex-shrink: 0;
}
.match-info { display: flex; align-items: center; gap: 16px; }
.genre-count { color: var(--accent-2); font-weight: 700; margin-top: 6px; }

/* ---------- Connection / user cards ---------- */
.user-card {
  background-color: var(--surface);
  color: var(--text);
  padding: 20px;
  border-radius: var(--radius);
  margin: 16px auto;
  max-width: 560px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  text-align: left;
}

/* buttons inside cards (accept / reject) sit on one tidy row */
.user-card form {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
.user-card form button { width: auto; flex: 1; }
.user-card form button[value="accept"] { background-color: var(--accent-2); }
.user-card form button[value="reject"] { background-color: var(--danger); }

/* ---------- Swipe card ---------- */
.card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  margin: 26px auto;
  max-width: 420px;
  box-shadow: var(--shadow);
  text-align: left;
}
.card img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 18px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.card h2 { margin-top: 0; text-align: left; }

.button-group {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}
.button-group button { flex: 1; padding: 14px; font-size: 1.05rem; }
.skip    { background-color: var(--danger) !important; }
.connect { background-color: var(--accent-2) !important; color: #fff !important; }

/* ---------- Sections ---------- */
.recommendations { width: 100%; max-width: 600px; }
.recommendations h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

/* ---------- Flash messages ---------- */
ul { list-style: none; padding: 0; max-width: 440px; width: 100%; }
ul li {
  background-color: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  text-align: left;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  body { padding: 18px 12px 48px; }
  nav  { padding: 10px 12px; margin-bottom: 26px; gap: 2px 4px; }
  nav a, nav img, nav br { font-size: 14px; }
  nav a { padding: 7px 11px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.25rem; }
  form { padding: 22px 18px; }
  .match-info { flex-direction: column; align-items: flex-start; text-align: left; }
  .match-image { margin: 0 0 12px 0; width: 100%; height: auto; aspect-ratio: 16/10; }
}

@media (max-width: 420px) {
  h1 { font-size: 1.65rem; }
  nav a, nav img, nav br { font-size: 13px; }
  .button-group { flex-direction: row; }
}