:root {
  --bg: #0f0906;
  --bg-soft: #150d09;
  --panel: #1c130d;
  --panel-alt: #241811;
  --panel-border: #3a2419;
  --text: #f7ece4;
  --text-dim: #c2a696;
  --text-faint: #8a7568;

  --accent: #ff7a3d;
  --accent-strong: #ff5a1f;
  --fuerte: #ffb020;
  --muy-fuerte: #ff3d2e;
  --live: #37e07a;

  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

/* ---------- Sticky footer: el <main> de cada pagina crece para llenar
   el espacio entre el header y el footer, sin romper paginas largas ---------- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar { flex-shrink: 0; }

body > main {
  flex: 1 0 auto;
}

.site-footer { flex-shrink: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: relative;
  z-index: 1100;
  height: 62px;
  background: linear-gradient(180deg, #170e09 0%, #120b07 100%);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 36px;
}

.topbar-brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}

.topbar-nav {
  display: flex;
  gap: 28px;
  flex: 1;
}

.topbar-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}

.topbar-nav a:hover { color: var(--text); }

.topbar-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px var(--live);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 40px;
  border-top: 1px solid var(--panel-border);
  background: #0a0605;
  font-size: 12.5px;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px;
  }
}

/* ---------- Icono de perfil + mini ventana de login ---------- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-menu {
  position: relative;
}

.btn-perfil {
  background: var(--panel-alt);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-perfil:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.panel-login {
  position: absolute;
  top: 46px;
  right: 0;
  width: 240px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 2000;
}

.panel-login-title {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.panel-login form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-login input {
  background: #0d0806;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
}

.btn-entrar {
  background: linear-gradient(135deg, var(--accent-strong), var(--muy-fuerte));
  border: none;
  color: #fff;
  padding: 9px 10px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin-top: 4px;
}

.panel-login-registro {
  margin: 12px 0 0 0;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.panel-login-registro a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.panel-login-usuario {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 12px 0;
}

.panel-login-registro a:hover { text-decoration: underline; }
/* ---------- Atributo hidden siempre gana ---------- */
[hidden] { display: none !important; }

/* ---------- Boton de Google ---------- */
.btn-google {
  width: 100%;
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.btn-google:hover {
  border-color: var(--accent);
  background: rgba(255, 122, 61, 0.08);
}
/* ---------- Recuperar contrasena ---------- */
.link-olvide {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  text-align: center;
}
.link-olvide:hover { text-decoration: underline; }

.panel-login-ayuda {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.panel-login-msg {
  margin: 12px 0 0 0;
  font-size: 12px;
  color: var(--live);
  line-height: 1.4;
}
/* ---------- Eliminar cuenta ---------- */
.panel-login .btn-entrar,
.panel-login .btn-eliminar {
  width: 100%;
}

.btn-eliminar {
  display: block;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--muy-fuerte);
  color: var(--muy-fuerte);
  padding: 9px 10px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-eliminar:hover { background: rgba(255, 61, 46, 0.12); }

.btn-peligro {
  background: var(--muy-fuerte);
  border: none;
  color: #fff;
  padding: 9px 10px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin-top: 4px;
}
.btn-peligro:disabled { opacity: 0.5; cursor: not-allowed; }

.panel-login-error {
  margin: 10px 0 0 0;
  font-size: 12px;
  color: var(--muy-fuerte);
  line-height: 1.4;
}