/* ================================================================
   Zhao — Estilos globales (tema Discord)
   ================================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Fondos Discord dark mode */
  --bg-primary:        #313338;
  --bg-secondary:      #2b2d31;
  --bg-tertiary:       #1e1f22;
  --bg-accent:         #232428;
  --bg-floating:       #111214;
  --bg-input:          #383a40;

  /* Accent blurple */
  --accent:            #5865f2;
  --accent-hover:      #4752c4;
  --accent-soft:       rgba(88, 101, 242, 0.15);
  --accent-glow:       rgba(88, 101, 242, 0.4);

  /* Texto */
  --text:              #dbdee1;
  --text-muted:        #949ba4;
  --text-link:         #00a8fc;
  --text-interactive:  #b5bac1;
  --text-header:       #f2f3f5;

  /* Estado */
  --online:            #23a55a;
  --success:           #23a55a;
  --success-soft:      rgba(35, 165, 90, 0.15);
  --error:             #f23f43;
  --error-soft:        rgba(242, 63, 67, 0.15);
  --warning:           #f0b232;
  --warning-soft:      rgba(240, 178, 50, 0.15);

  /* Bordes */
  --border:            rgba(255, 255, 255, 0.06);
  --border-strong:     #1e1f22;

  /* Canal sidebar */
  --channel-text:      #949ba4;
  --channel-active-bg: rgba(255, 255, 255, 0.1);
  --channel-hover-bg:  rgba(255, 255, 255, 0.06);

  /* Misc */
  --radius:            4px;
  --radius-md:         8px;
  --radius-lg:         16px;
  --transition:        150ms ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { text-decoration: underline; }

/* ── Age Gate ─────────────────────────────────────────────── */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: none; /* oculto por defecto; JS lo muestra solo si es necesario */
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}

.age-gate-overlay.visible {
  display: flex;
  animation: ageGateFadeIn 0.2s ease;
}

@keyframes ageGateFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.age-gate-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.age-gate-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--error);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.age-gate-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.age-gate-text strong { color: var(--text-header); }

.age-gate-warning {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 1.75rem;
  font-style: italic;
}

.age-gate-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 400px) {
  .age-gate-buttons { flex-direction: row; justify-content: center; }
  .age-gate-buttons .btn { flex: 1; }
}

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), filter var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-outline:hover {
  border-color: var(--text-interactive);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: var(--text-header);
}

.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }

/* ── Formularios ─────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-label .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.form-input.error { border-color: var(--error); }

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  margin-top: 2px;
}

.checkbox-label { font-size: 0.88rem; cursor: pointer; user-select: none; }
.checkbox-label strong { color: var(--warning); }

/* ── Alertas ─────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}
.alert.show { display: block; }
.alert-error   { background: var(--error-soft);   color: #ff8589; border: 1px solid rgba(242,63,67,0.3); }
.alert-success { background: var(--success-soft);  color: #57f287; border: 1px solid rgba(35,165,90,0.3); }

/* ── Divisor ─────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.25rem 0;
}
.divider::before,
.divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
}
.spinner.show { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Páginas de autenticación ────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg-tertiary);
}

.auth-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2), 0 10px 40px rgba(0,0,0,0.35);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-header);
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.auth-footer a { color: var(--accent); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Landing ─────────────────────────────────────────────── */
.landing-page {
  min-height: 100vh;
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.landing-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-header);
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.landing-logo:hover { text-decoration: none; }
.landing-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.landing-title {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--text-header);
  margin-bottom: 1rem;
  max-width: 600px;
  line-height: 1.1;
}

.landing-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.landing-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.landing-cta .btn { min-width: 160px; }
.landing-cta .btn-primary { width: auto; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .landing-title { font-size: 2rem; }
  .auth-box { padding: 1.5rem; }
  .age-gate-card { padding: 1.75rem 1.25rem; }
}
