/* sections.css — Section-level layouts */

/* ══ AUTH GATE ════════════════════════════════════════════════════ */
#view-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-8) var(--pad);
}

.auth-portal {
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeUp 0.6s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-rune-symbol {
  font-family: var(--font-ritual);
  font-size: 3.5rem;
  color: var(--color-bronze);
  opacity: 0.7;
  margin-bottom: var(--sp-2);
  display: block;
  animation: floatRune 4s ease-in-out infinite;
}
@keyframes floatRune {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-6px) rotate(3deg); }
}

.auth-brand {
  font-size: var(--text-3xl);
  letter-spacing: 0.25em;
  background: linear-gradient(135deg, var(--color-bronze), var(--color-ember), var(--color-bronze));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--sp-2);
}

.auth-tagline {
  font-family: var(--font-ritual);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--sp-8);
}

.auth-form {
  text-align: left;
  margin-bottom: var(--sp-4);
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

@media (min-width: 480px) {
  .input-row {
    flex-direction: row;
    align-items: stretch;
  }
  .input-row .ritual-input { flex: 1; }
}

.otp-container { animation: fadeUp 0.4s var(--ease) both; }

.otp-instruction {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
  line-height: 1.5;
}
.otp-phone-display {
  color: var(--color-amber);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.otp-form { display: flex; flex-direction: column; gap: var(--sp-3); }

.auth-footnote {
  margin-top: var(--sp-6);
  font-size: var(--text-xs);
  color: var(--color-text-dim);
  letter-spacing: 0.05em;
  font-family: var(--font-ritual);
}

/* ══ APP LAYOUT ═══════════════════════════════════════════════════ */
#view-app {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

#main {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ══ HERO SECTION ═════════════════════════════════════════════════ */
.section-hero {
  position: relative;
  padding: var(--sp-10) var(--pad) var(--sp-8);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.hero-rune-corner {
  position: absolute;
  font-family: var(--font-ritual);
  font-size: 1.5rem;
  color: var(--color-border-accent);
  opacity: 0.5;
  pointer-events: none;
  line-height: 1;
}
.hero-rune--tl { top: var(--sp-4); left: var(--sp-4); }
.hero-rune--tr { top: var(--sp-4); right: var(--sp-4); }
.hero-rune--bl { bottom: var(--sp-4); left: var(--sp-4); }
.hero-rune--br { bottom: var(--sp-4); right: var(--sp-4); }

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-ritual);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-bronze);
  margin-bottom: var(--sp-3);
}

.hero-drop-title {
  font-size: clamp(var(--text-xl), 6vw, var(--text-3xl));
  background: linear-gradient(135deg, var(--color-text), var(--color-amber), var(--color-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--sp-2);
}

.hero-drop-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto var(--sp-6);
  line-height: 1.6;
}

/* Scarcity: next drop mode */
.hero-eyebrow.securing {
  color: var(--color-fire);
  animation: pulse-text 2s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ══ DROPS SECTION ════════════════════════════════════════════════ */
.section-drops {
  padding: var(--sp-10) var(--pad);
  border-bottom: 1px solid var(--color-border);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 540px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

.no-drop-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--color-text-muted);
}
.no-drop-rune {
  font-family: var(--font-ritual);
  font-size: 4rem;
  color: var(--color-border-accent);
  display: block;
  margin-bottom: var(--sp-4);
}

/* ══ NIVEL SECTION ════════════════════════════════════════════════ */
.section-nivel {
  padding: var(--sp-10) var(--pad);
  border-bottom: 1px solid var(--color-border);
}

.nivel-dashboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}

@media (min-width: 540px) {
  .nivel-dashboard {
    flex-direction: row;
    align-items: flex-start;
  }
}

.nivel-ring-container {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nivel-stats { width: 100%; }

/* ══ FOOTER ═══════════════════════════════════════════════════════ */
.footer {
  padding: var(--sp-8) var(--pad);
  text-align: center;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.footer-runes {
  font-family: var(--font-ritual);
  letter-spacing: 0.5em;
  color: var(--color-border-accent);
  font-size: var(--text-lg);
}
.footer-copy { font-size: var(--text-xs); color: var(--color-text-dim); letter-spacing: 0.05em; }

/* ══ DIVIDER LINE ═════════════════════════════════════════════════ */
.ritual-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-bronze), transparent);
  margin: var(--sp-6) 0;
  opacity: 0.5;
}

/* ══ RESERVE SECTION (Fase 7) ═════════════════════════════════════ */
.section-reserve {
  padding: var(--sp-12) var(--pad);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.reserve-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeUp 0.5s var(--ease) both;
}

.reserve-rune {
  font-family: var(--font-ritual);
  font-size: 3rem;
  color: var(--color-fire);
  display: block;
  margin-bottom: var(--sp-4);
  animation: pulseGlow 2.5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 16px rgba(224, 104, 32, 0.35); }
  50%       { text-shadow: 0 0 40px rgba(224, 104, 32, 0.8), 0 0 80px rgba(224, 104, 32, 0.25); }
}

.reserve-eyebrow {
  font-family: var(--font-ritual);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-bronze);
  margin-bottom: var(--sp-2);
}

.reserve-product-name {
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--sp-8);
  line-height: 1.3;
}

.reserve-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.reserve-timer-digit {
  font-family: var(--font-ritual);
  font-size: clamp(3.5rem, 15vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-fire), var(--color-ember));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 2ch;
  display: inline-block;
  text-align: center;
}

.reserve-timer-sep {
  font-family: var(--font-ritual);
  font-size: clamp(2.5rem, 10vw, 4rem);
  color: var(--color-bronze);
  line-height: 1;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.reserve-copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-8);
}
.reserve-copy strong { color: var(--color-amber); }

.reserve-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ══ FOMO BANNER (Fase 7) ═════════════════════════════════════════ */
.fomo-banner {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 4, 2, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s var(--ease) both;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fomo-inner {
  text-align: center;
  padding: var(--sp-10) var(--sp-8);
  max-width: 360px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-lg);
  background: rgba(30, 8, 6, 0.97);
  box-shadow: 0 0 60px rgba(204, 64, 48, 0.35), 0 0 120px rgba(204, 64, 48, 0.1);
  animation: fadeUp 0.4s var(--ease) both;
}

.fomo-rune {
  font-family: var(--font-ritual);
  font-size: 3.5rem;
  color: var(--color-danger);
  display: block;
  margin-bottom: var(--sp-4);
}

.fomo-title {
  font-family: var(--font-ritual);
  font-size: var(--text-2xl);
  color: var(--color-danger);
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-3);
}

.fomo-body {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
}

/* ══ RITUAL COMPLETE (Fase 8) ═════════════════════════════════════ */
.section-ritual-complete {
  padding: var(--sp-12) var(--pad);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ritual-complete-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeUp 0.6s var(--ease) both;
}

.complete-rune {
  font-family: var(--font-ritual);
  font-size: 3.5rem;
  color: var(--color-amber);
  display: block;
  margin-bottom: var(--sp-4);
  animation: pulseGlow 3s ease-in-out infinite;
}

.complete-eyebrow {
  font-family: var(--font-ritual);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-bronze);
  margin-bottom: var(--sp-2);
}

.complete-title {
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--sp-6);
  line-height: 1.3;
}

.complete-xp-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: var(--sp-6);
  animation: xpPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.35s;
  opacity: 0;
}
@keyframes xpPop {
  from { opacity: 0; transform: scale(0.55); }
  to   { opacity: 1; transform: scale(1); }
}

.xp-plus {
  font-size: var(--text-2xl);
  color: var(--color-amber);
  font-weight: 900;
}

.xp-amount {
  font-family: var(--font-ritual);
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-amber), var(--color-bronze));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.xp-label {
  font-size: var(--text-xl);
  color: var(--color-amber);
  font-weight: 600;
}

.complete-progress-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.complete-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

.complete-progress-bar {
  height: 12px;
  background: var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.complete-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-bronze), var(--color-amber));
  border-radius: 6px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.complete-xp-display {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

#complete-total-xp { color: var(--color-amber); font-weight: 600; }

.complete-copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-8);
}
.complete-copy strong { color: var(--color-amber); }

/* ══ LIBRO DE SOMBRAS ══════════════════════════════════════════════ */
.section-libro {
  padding: var(--sp-8) var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
}

.libro-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.libro-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--sp-8) 0;
  line-height: 1.8;
}

.libro-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  transition: border-color var(--transition);
}
.libro-card:hover { border-color: var(--color-border-accent); }

.libro-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
}

.libro-card-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.status-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
}
.status--dim     { color: var(--color-text-muted); }
.status--amber   { color: var(--color-amber); }
.status--fire    { color: var(--color-fire); }
.status--success { color: var(--color-success); }
.status--danger  { color: var(--color-danger); }

.libro-items-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-3);
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-3);
}

.libro-item-row {
  display: flex;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--sp-1) 0;
}
.libro-item-product {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.libro-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-3);
}

.libro-totals {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.libro-total { font-weight: 600; color: var(--color-text); }
.libro-xp    { font-size: var(--text-xs); color: var(--color-amber); font-weight: 600; }

.libro-review-given {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.review-stars { color: var(--color-text-dim); font-size: var(--text-md); }
.star-display.star-on { color: var(--color-gold); }

.review-body-preview {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══ SECTION ENTRANCE ANIMATIONS ══════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
