:root {
  --teal: #22C5AD;
  --text-dark: #053B35;
  --text-light: #ffffff;
  --tagline: #b7c4c1;
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.22);
  --card-bg: rgba(0, 0, 0, 0.55);
  --card-border: rgba(255, 255, 255, 0.12);
  /* Intensidad global de atenuación; ajustable */
  --overlay-opacity: 0.25;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-light);
  background: #000;
}

/* Superposición clara configurable para atenuar fondos oscuros */
.has-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, var(--overlay-opacity));
  z-index: 0;
}
.has-overlay * { position: relative; z-index: 1; }

.topbar { position: absolute; top: 12px; right: 12px; z-index: 10; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px; border-radius: 10px;
  background: var(--glass-bg); color: #fff; border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; font-weight: 600; font-size: 12px;
}
.lang-btn .flag { font-size: 16px; }
.lang-menu { position: absolute; right: 0; margin-top: 8px; display: none; }
.lang-menu.open { display: block; }
.lang-menu { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,0.45); }
.lang-option { display: flex; align-items: center; gap: 8px; width: 160px; height: 36px; padding: 0 12px; background: transparent; color: #fff; border: 0; cursor: pointer; font-size: 13px; }
.lang-option .flag { font-size: 16px; }
.lang-option:hover { background: rgba(255,255,255,0.08); }

.screen {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 32px 20px 28px;
  overflow: hidden;
}

/* Fondo: si deseas usar la imagen adjunta, colócala en assets/bg.jpg */
.bg { position: absolute; inset: 0; z-index: -3; }
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.vignette::before {
  content: "";
  position: absolute;
  inset: -2%;
  background: radial-gradient(120% 140% at 50% 40%, rgba(0,0,0,0.0) 35%, rgba(0,0,0,0.45) 100%),
              linear-gradient(to top, rgba(0,0,0,0.35), rgba(0,0,0,0.0));
  z-index: -2;
}

.particles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.particles .dot {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.8);
  filter: blur(0.6px);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0px); opacity: 0.9; }
  50% { transform: translateY(-4px); opacity: 0.6; }
  100% { transform: translateY(0px); opacity: 0.9; }
}

.brand { text-align: center; margin-top: 8px; }
.logo { margin: 0; font-size: clamp(28px, 6.2vw, 44px); font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; }
.logo .ride { color: var(--teal); }
.logo .moto { color: #fff; }
.logo .brand-link { color: inherit; text-decoration: none; }
.logo .brand-link:focus-visible { outline: 2px solid rgba(255,255,255,0.45); outline-offset: 2px; border-radius: 8px; }
.subtitle { margin-top: 6px; font-size: 12px; letter-spacing: 3px; color: #fff; opacity: 0.95; }
.actions { display: grid; gap: 14px; align-self: end; justify-items: center; }

.btn {
  width: min(560px, 92vw);
  height: 56px;
  border-radius: 14px;
  border: 0;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { background: var(--teal); color: var(--text-dark); }
.btn-primary:focus-visible { outline: 3px solid rgba(34,197,173,0.35); outline-offset: 2px; }
.btn-glass {
  background: var(--glass-bg);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
}
.btn-glass:focus-visible { outline: 2px solid rgba(255,255,255,0.45); outline-offset: 2px; }

.tagline { margin-top: 6px; font-size: 12px; color: var(--tagline); text-align: center; }
.credits { margin-top: 2px; font-size: 11px; color: var(--tagline); text-align: center; }
.credits a { color: var(--tagline); text-decoration: none; font-weight: 600; }
.credits a:hover { text-decoration: underline; }

/* Sign In overlay */
.signin-overlay { position: fixed; inset: 0; display: none; }
.signin-overlay.open { display: grid; place-items: center; padding: 20px; }
.overlay-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.card {
  position: relative;
  width: min(560px, 92vw);
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 22px 20px 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
.card-title { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
form { display: grid; gap: 10px; }
label { font-size: 12px; opacity: 0.9; }
input {
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: #fff;
  padding: 0 14px;
  font-size: 15px;
}
input::placeholder { color: #cbd5d1; }
.signin-overlay .btn { width: 100%; height: 48px; }
.signin-overlay .card { max-width: 560px; }
.forgot { text-align: center; color: var(--tagline); text-decoration: none; font-size: 13px; padding-top: 2px; }
.forgot:hover { text-decoration: underline; }

/* Desktop: mantener proporciones cinematográficas */
@media (min-width: 900px) {
  .screen { padding: 40px 28px; }
  .actions { gap: 16px; }
}

/* Floating User Menu (global) */
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; justify-items: end; }
.fab-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.16); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,0.35); cursor: pointer; display: grid; place-items: center; font-size: 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--glass-border); }
.fab-menu { display: none; background: var(--card-bg); color: #fff; border: 1px solid var(--card-border); border-radius: 12px; box-shadow: 0 14px 28px rgba(0,0,0,0.45); padding: 8px; }
.fab.open .fab-menu { display: grid; gap: 6px; }
.fab-item { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 8px; background: transparent; color: #fff; border: 0; cursor: pointer; text-decoration: none; font-weight: 600; }
.fab-item:hover { background: rgba(255,255,255,0.12); }

/* Botón estilo enlace para acciones secundarias en overlay */
.signin-overlay .link-btn {
  display: inline-block;
  margin-top: 8px;
  background: none;
  border: none;
  color: #0a7;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}
.signin-overlay .link-btn:focus {
  outline: 2px solid #0a7;
  outline-offset: 2px;
}

/* Utilidad visual para contenedores (mejora de div) */
.surface {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
  padding: 14px;
}
.surface:hover { box-shadow: 0 10px 22px rgba(0,0,0,0.42); }