/* ── Variables ── */
:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #ede9fe;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --danger: #ef4444;
  --text: #1e1b4b;
  --text-muted: #6b7280;
  --bg: #f8f7ff;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.1);
  --radius: 16px;
  --radius-sm: 8px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #a855f7 100%);
  color: white;
  padding: 60px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero-icon { font-size: 64px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-top: 8px; }

/* Countdown */
.countdown { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.countdown-label { font-size: 0.95rem; opacity: 0.85; }
.countdown-boxes { display: flex; gap: 8px; }
.countdown-box {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 60px;
  text-align: center;
}
.countdown-box span { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1; }
.countdown-box small { font-size: 0.65rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }

/* Admin float btn */
.btn-admin-float {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white; font-size: 1.3rem;
  width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-admin-float:hover { background: rgba(255,255,255,0.3); transform: rotate(30deg); }

/* ── Sections ── */
.section { padding: 56px 24px; }
.container { max-width: 900px; margin: 0 auto; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 28px; color: var(--primary-dark); }

/* ── Colecta ── */
.colecta-section { background: var(--white); }
.colecta-stats { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; margin-bottom: 28px; }
.stat-card { text-align: center; padding: 16px 32px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.stat-divider { width: 1px; height: 48px; background: var(--border); }

.progress-container { max-width: 600px; margin: 0 auto; }
.progress-bar { height: 20px; background: var(--primary-light); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%; transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.progress-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.85rem; }
.progress-labels span { font-weight: 600; color: var(--primary); }
.update-date { color: var(--text-muted); font-weight: 400; font-size: 0.78rem; }

/* ── Noticias ── */
.noticias-section { background: var(--bg); }
.noticias-list { display: flex; flex-direction: column; gap: 16px; }
.noticia-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
  transition: transform .2s;
}
.noticia-card.destacada { border-left-color: var(--accent); background: linear-gradient(135deg, var(--white), var(--accent-light)); }
.noticia-card:hover { transform: translateY(-2px); }
.noticia-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); background: var(--accent-light); padding: 2px 8px; border-radius: 999px; display: inline-block; margin-bottom: 8px; }
.noticia-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.noticia-card p { color: var(--text-muted); white-space: pre-wrap; }
.noticia-fecha { font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; }

/* ── Sugerencias ── */
.sugerencias-section { background: var(--white); }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  padding: 10px 20px; border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--white); color: var(--text-muted);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all .2s;
}
.tab.active { background: var(--primary); border-color: var(--primary); color: white; }
.tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sug-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .2s, box-shadow .2s;
}
.sug-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sug-card h4 { font-weight: 700; margin-bottom: 6px; color: var(--primary-dark); }
.sug-card p { font-size: 0.88rem; color: var(--text-muted); }
.sug-precio { margin-top: 10px; font-size: 0.82rem; font-weight: 600; color: var(--success); background: #d1fae5; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.sug-contacto { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }

/* ── Contacto ── */
.contacto-section { background: linear-gradient(135deg, var(--primary-light), var(--accent-light)); }
.contacto-box { text-align: center; padding: 32px; }
.contacto-box p { font-size: 1.05rem; color: var(--text); margin-bottom: 20px; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: white;
  padding: 12px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.4); }

/* ── Footer ── */
.footer { text-align: center; padding: 24px; color: var(--text-muted); font-size: 0.85rem; }

/* ── Empty state ── */
.empty-state { color: var(--text-muted); text-align: center; padding: 32px; font-style: italic; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(30,27,75,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius);
  width: 100%; max-width: 540px; max-height: 90vh;
  overflow-y: auto; padding: 32px;
  position: relative;
  transform: translateY(20px); transition: transform .25s;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.modal h4 { font-size: 1rem; font-weight: 700; margin: 20px 0 12px; color: var(--primary-dark); }
.modal-hint { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--border); border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: #d1d5db; }
hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Admin tabs */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--text-muted);
  transition: all .15s;
}
.admin-tab.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: 0.95rem;
  font-family: inherit; background: var(--bg); color: var(--text);
  transition: border-color .15s;
  outline: none;
}
.input:focus { border-color: var(--primary); }
.textarea { resize: vertical; min-height: 90px; }
.checkbox-group { display: flex; align-items: center; gap: 8px; }
.checkbox-group label { text-transform: none; letter-spacing: 0; font-size: 0.9rem; color: var(--text); margin-bottom: 0; }
.checkbox-group input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.btn { display: inline-block; padding: 11px 24px; border-radius: 999px; font-size: 0.95rem; font-weight: 700; cursor: pointer; border: none; transition: all .2s; font-family: inherit; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.success-msg { color: var(--success); font-size: 0.85rem; margin-top: 10px; min-height: 20px; }
.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 10px; min-height: 20px; }

/* Admin list items */
.admin-list-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border); gap: 8px;
}
.admin-list-item:last-child { border-bottom: none; }
.admin-list-item span { font-size: 0.88rem; flex: 1; }
.btn-delete { background: none; border: 1.5px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); padding: 4px 10px; font-size: 0.78rem; font-weight: 700; cursor: pointer; flex-shrink: 0; transition: all .15s; }
.btn-delete:hover { background: var(--danger); color: white; }

/* ── Colecta sin meta ── */
.update-date-nometa { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Playlist ── */
.playlist-section { background: var(--bg); }
.playlist-intro { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; }

.playlist-form { margin-bottom: 28px; }
.playlist-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.playlist-form-row .input { flex: 1; min-width: 160px; }
.btn-accent { background: var(--accent); color: #1c1917; font-weight: 700; white-space: nowrap; }
.btn-accent:hover { background: #d97706; transform: translateY(-1px); }

.playlist-list { display: flex; flex-direction: column; gap: 10px; }
.playlist-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px 18px; border: 1px solid var(--border);
}
.pl-num { font-size: 1rem; font-weight: 800; color: var(--primary-light); background: var(--primary); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pl-info { flex: 1; }
.pl-cancion { font-weight: 700; font-size: 0.95rem; }
.pl-artista { font-size: 0.82rem; color: var(--text-muted); margin-top: 1px; }

/* Responsive */
@media (max-width: 600px) {
  .stat-card { padding: 12px 20px; }
  .stat-value { font-size: 1.5rem; }
  .stat-divider { display: none; }
  .colecta-stats { gap: 16px; }
  .modal { padding: 24px 20px; }
}
