/* ============================================================
   RESONANCIA NORTEÑA — CSS Principal
   Dark theme: oro zacatecano (#c8922a) + negro profundo
   ============================================================ */

/* ── Variables globales ───────────────────────────────────── */
:root {
  --gold:        #c8922a;
  --gold-light:  #e0a93e;
  --gold-dark:   #9e6d1a;
  --gold-muted:  #c8922a33;

  --bg-base:     #0a0a10;
  --bg-card:     #12121e;
  --bg-elevated: #1a1a2a;
  --bg-overlay:  #0d0d1aee;

  --text-primary:   #f0ede8;
  --text-secondary: #a09c94;
  --text-muted:     #6a6660;

  --border:      #2a2a3a;
  --border-light:#3a3a4a;

  --accent-red:  #e55;
  --accent-green:#4a9;
  --accent-blue: #5af;

  --player-h:    80px;
  --sidebar-w:   240px;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px #00000060;
  --shadow-card: 0 2px 12px #00000040;

  --font-main:   'Outfit', sans-serif;
  --font-display:'Bebas Neue', cursive;

  --transition:  .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background:  var(--bg-base);
  color:       var(--text-primary);
  min-height:  100vh;
  overflow-x:  hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  background:  var(--bg-elevated);
  color:       var(--text-primary);
  border:      1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:     10px 14px;
  width:       100%;
  transition:  border-color var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}
select option { background: var(--bg-elevated); }
ul { list-style: none; }

/* ── Tipografía ──────────────────────────────────────────── */
h1,h2,h3,h4 { line-height: 1.2; }
.display     { font-family: var(--font-display); letter-spacing: .04em; }

/* ── Utilidades ──────────────────────────────────────────── */
.container   { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm      { gap: 8px; }
.gap         { gap: 16px; }
.gap-lg      { gap: 24px; }
.grid        { display: grid; }
.w-full      { width: 100%; }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-secondary); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .75rem; }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: .72rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.badge-gold    { background: var(--gold-muted); color: var(--gold); border: 1px solid var(--gold-dark); }
.badge-green   { background: #4a923320; color: #4a9; border: 1px solid #4a9; }
.badge-red     { background: #e5555520; color: #e55; border: 1px solid #e55; }
.badge-gray    { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: .9rem; transition: all var(--transition);
  cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: #0a0a10;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold-muted); }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { filter: brightness(1.15); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-body  { padding: 16px; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}
.navbar .inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 100%; gap: 24px;
}
.navbar .logo {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: .06em;
  color: var(--gold); white-space: nowrap;
}
.navbar .logo span { color: var(--text-primary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: var(--bg-elevated); }
.nav-links a.active { color: var(--gold); }

.nav-search {
  flex: 1; max-width: 320px; position: relative;
}
.nav-search input {
  padding: 7px 14px 7px 38px; border-radius: 999px;
  font-size: .875rem;
}
.nav-search .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ── Hero Banner / Slider ────────────────────────────────── */
.hero {
  position: relative; height: 420px; overflow: hidden;
  margin-bottom: 32px;
}
.hero-centrado {
  border-radius: var(--radius-lg);
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: opacity .5s ease;
}
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, #0a0a10ee 40%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column;
  justify-content: center; padding: 0 48px; max-width: 600px;
}
.hero-content h1 {
  font-family: var(--font-display); font-size: 3.5rem;
  line-height: 1; color: var(--text-primary); margin-bottom: 12px;
}
.hero-content p {
  color: var(--text-secondary); margin-bottom: 24px; font-size: 1.05rem;
}
.hero-dots {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 8px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted); cursor: pointer;
  transition: background var(--transition);
}
.hero-dot.active { background: var(--gold); }

/* ── Section ─────────────────────────────────────────────── */
.section { margin-bottom: 40px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-size: 1.5rem;
  letter-spacing: .04em;
}
.section-title span { color: var(--gold); }

/* ── Song Row (lista de canciones) ──────────────────────── */
.song-list { display: flex; flex-direction: column; gap: 2px; }
.song-row {
  display: grid;
  grid-template-columns: 36px 52px 1fr auto 80px 60px;
  align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
}
.song-row:hover { background: var(--bg-elevated); }
.song-row:hover .song-play { opacity: 1; }
.song-row:hover .song-num  { opacity: 0; }
.song-num {
  text-align: center; font-size: .85rem;
  color: var(--text-muted); transition: opacity var(--transition);
}
.song-play {
  position: absolute; opacity: 0;
  transition: opacity var(--transition);
  color: var(--gold); font-size: 1rem;
}
.song-num-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.song-cover {
  width: 52px; height: 52px; border-radius: 4px;
  object-fit: cover; background: var(--bg-elevated);
}
.song-info { overflow: hidden; }
.song-title { font-weight: 600; font-size: .9rem; }
.song-artist { font-size: .8rem; color: var(--text-secondary); }
.song-likes  { color: var(--text-muted); font-size: .8rem; display: flex; align-items: center; gap: 4px; }
.song-duration{ font-size: .8rem; color: var(--text-muted); text-align: right; }

/* ── Card de Agrupación ──────────────────────────────────── */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.group-card { cursor: pointer; }
.group-card img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; border-radius: var(--radius);
  border: 2px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
}
.group-card:hover img { border-color: var(--gold); transform: scale(1.02); }
.group-card-body { padding: 8px 4px 4px; }
.group-card-name { font-weight: 700; font-size: .875rem; }
.group-card-meta { font-size: .75rem; color: var(--text-secondary); display: flex; gap: 6px; margin-top: 2px; }
.verified-icon   { color: var(--gold); font-size: .75rem; }

/* ── Card de Álbum ───────────────────────────────────────── */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.album-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 6px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.album-card:hover img { transform: scale(1.03); box-shadow: 0 8px 32px #00000060; }
.album-title { font-weight: 600; font-size: .85rem; }
.album-artist { font-size: .78rem; color: var(--text-secondary); }

/* ── Géneros Pills / Grid ────────────────────────────────── */
.genre-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: .875rem; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.genre-pill:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-muted); }
.genre-pill.active{ background: var(--gold); color: #0a0a10; border-color: var(--gold); font-weight: 700; }

/* ── Evento Card ─────────────────────────────────────────── */
.event-card {
  display: flex; gap: 16px; padding: 16px;
  border-radius: var(--radius); background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}
.event-card:hover { border-color: var(--gold-dark); }
.event-date-box {
  text-align: center; min-width: 56px;
  background: var(--gold-muted); border-radius: var(--radius-sm);
  padding: 8px;
}
.event-date-box .day   { font-family: var(--font-display); font-size: 2rem; color: var(--gold); line-height:1; }
.event-date-box .month { font-size: .7rem; text-transform: uppercase; color: var(--text-secondary); }

/* ── Player flotante ─────────────────────────────────────── */
.player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--player-h);
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; gap: 20px;
}
.player-info {
  display: flex; align-items: center; gap: 12px;
  min-width: 200px; max-width: 260px;
}
.player-cover {
  width: 48px; height: 48px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
}
.player-song-title  { font-size: .875rem; font-weight: 600; }
.player-song-artist { font-size: .75rem; color: var(--text-secondary); }

.player-controls {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.player-btns {
  display: flex; align-items: center; gap: 16px;
}
.player-btn {
  color: var(--text-secondary); font-size: 1rem;
  transition: color var(--transition);
}
.player-btn:hover { color: var(--text-primary); }
.player-btn-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold); color: #0a0a10;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: transform var(--transition), background var(--transition);
}
.player-btn-play:hover { transform: scale(1.08); background: var(--gold-light); }

.player-progress {
  display: flex; align-items: center; gap: 8px; width: 100%;
}
.player-time { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.progress-bar {
  flex: 1; height: 4px; background: var(--border); border-radius: 999px;
  position: relative; cursor: pointer;
}
.progress-fill {
  height: 100%; background: var(--gold); border-radius: 999px;
  pointer-events: none; transition: width .1s linear;
}
.progress-bar:hover .progress-fill { background: var(--gold-light); }

.player-volume {
  display: flex; align-items: center; gap: 8px;
  min-width: 120px;
}
.volume-slider {
  -webkit-appearance: none; width: 80px; height: 4px;
  background: var(--border); border-radius: 999px; cursor: pointer;
  border: none; padding: 0;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: var(--gold); border-radius: 50%;
}

/* ── Flash messages ──────────────────────────────────────── */
.flash { padding: 12px 20px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.flash-success { background: #4a922220; color: #4a9; border: 1px solid #4a9; }
.flash-error   { background: #e5555520; color: #e55; border: 1px solid #e55; }
.flash-info    { background: #5aaffb20; color: #5af; border: 1px solid #5af; }

/* ── Formularios ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-hint  { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Auth card */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 440px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo a { font-family: var(--font-display); font-size: 2rem; color: var(--gold); }

/* ── Paginación ──────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 32px; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition); cursor: pointer;
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--gold); color: #0a0a10; border-color: var(--gold); font-weight: 700; }

/* ── Admin Sidebar ───────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-card); border-right: 1px solid var(--border);
  position: fixed; top: 0; bottom: 0; left: 0;
  overflow-y: auto; z-index: 50;
  display: flex; flex-direction: column;
}
.admin-sidebar-logo {
  padding: 20px; font-family: var(--font-display);
  font-size: 1.15rem; color: var(--gold); border-bottom: 1px solid var(--border);
  letter-spacing: .04em;
}
.admin-sidebar-logo span { display: block; font-size: .7rem; color: var(--text-muted); font-family: var(--font-main); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.admin-nav { padding: 12px 0; flex: 1; }
.admin-nav-group { margin-bottom: 8px; }
.admin-nav-group-title {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 6px 16px; margin-top: 8px;
}
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: .875rem; color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.admin-nav a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.admin-nav a.active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-muted); }
.admin-nav a svg, .admin-nav a i { width: 16px; opacity: .7; }

.admin-main {
  margin-left: var(--sidebar-w); flex: 1;
  display: flex; flex-direction: column;
}
.admin-topbar {
  height: 56px; background: var(--bg-card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 40;
}
.admin-content { padding: 24px; flex: 1; }
.admin-page-title { font-family: var(--font-display); font-size: 2rem; margin-bottom: 20px; letter-spacing: .04em; }

/* Admin Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.stat-value {
  font-family: var(--font-display); font-size: 2.2rem;
  color: var(--gold); line-height: 1;
}
.stat-label { font-size: .8rem; color: var(--text-secondary); margin-top: 4px; }
.stat-card .icon { font-size: 1.4rem; margin-bottom: 8px; opacity: .6; }

/* Admin Tabla */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); padding: 10px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px; font-size: .875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-elevated); }

/* Checkbox/Toggle */
.toggle {
  position: relative; display: inline-block;
  width: 40px; height: 22px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--border); cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; left: 3px; top: 3px;
  transition: transform var(--transition);
}
input:checked + .toggle-slider { background: var(--gold); }
input:checked + .toggle-slider::after { transform: translateX(18px); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px; font-size: .875rem; font-weight: 600;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-btn:hover  { color: var(--text-primary); }

/* Imagen preview */
.img-preview {
  width: 100px; height: 100px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* ── Perfil Agrupación ───────────────────────────────────── */
.profile-hero { position: relative; height: 280px; overflow: hidden; border-radius: var(--radius-lg); margin-bottom: -60px; }
.profile-hero img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-base) 10%, transparent 60%); }
.profile-info { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 20px; padding: 0 20px 20px; }
.profile-logo { width: 100px; height: 100px; border-radius: var(--radius); border: 3px solid var(--gold); object-fit: cover; flex-shrink: 0; }

/* ── Reproductor embed ───────────────────────────────────── */
.play-btn-float {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #00000060; opacity: 0; transition: opacity var(--transition);
  border-radius: var(--radius);
}
.song-cover-wrap { position: relative; }
.song-cover-wrap:hover .play-btn-float { opacity: 1; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .form-row      { grid-template-columns: 1fr; }
  .hero          { height: 280px; }
  .hero-content  { padding: 0 24px; }
  .hero-content h1 { font-size: 2.2rem; }
  .group-grid    { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .nav-links     { display: none; }
  .song-row      { grid-template-columns: 36px 48px 1fr 60px; }
  .song-likes    { display: none; }
}
@media (max-width: 640px) {
  .admin-sidebar { width: 56px; }
  .admin-sidebar-logo span, .admin-nav a span, .admin-nav-group-title { display: none; }
  .admin-main    { margin-left: 56px; }
  .player-volume { display: none; }
  .player-info   { min-width: 0; max-width: 150px; }
}

/* ── Scrollbar personalizado ─────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-card); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ── Animaciones ─────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.animate-in { animation: fadeIn .3s ease forwards; }
.spin       { animation: spin 1s linear infinite; }
