/* GetURLShort — temas globales (default / moderno / halloween)
   Tipografía proporcional: sin stretch, sin tracking extremo. */

:root {
  --brand-a: #667eea;
  --brand-b: #764ba2;
  --brand-deep: #2a2458;
  --brand-ink: #3b3a8e;
  --brand-soft: #f0f1fe;
  --brand-line: #e0e3fd;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.theme-default {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Pacifico", cursive;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.theme-moderno,
body.theme-halloween {
  --font-body: "Manrope", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Moderno: identidad propia (no se parece al default) */
body.theme-moderno {
  background:
    radial-gradient(1000px 500px at 0% 0%, rgba(102, 126, 234, 0.16), transparent 55%),
    radial-gradient(800px 420px at 100% 10%, rgba(118, 75, 162, 0.14), transparent 50%),
    linear-gradient(180deg, #eef0ff 0%, #f7f8ff 40%, #ffffff 100%);
}

body.theme-moderno .logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 10px 28px -10px rgba(102, 126, 234, 0.85);
}

body.theme-moderno .brand-wordmark {
  font-size: 1.35rem;
  font-weight: 800;
}

body.theme-moderno .auth-card {
  position: relative;
  overflow: visible;
  margin-top: 1.75rem;
  border: none;
  border-radius: 1.25rem;
  box-shadow:
    0 0 0 1px rgba(102, 126, 234, 0.18),
    0 28px 60px -32px rgba(42, 36, 88, 0.45);
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f6ff 100%);
}

/* Sombrero de copa en login/registro (Moderno) */
body.theme-moderno .auth-card::before {
  content: "🎩";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  font-size: 2.75rem;
  line-height: 1;
  filter: drop-shadow(0 8px 12px rgba(42, 36, 88, 0.35));
  animation: top-hat-tip 3s ease-in-out infinite;
  z-index: 3;
}

@keyframes top-hat-tip {
  0%, 100% { transform: translateX(-50%) rotate(-6deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(6deg) translateY(-4px); }
}

body.theme-moderno nav.nav-shell,
body.theme-moderno .nav-modern {
  border-bottom: none !important;
  box-shadow: 0 10px 40px -28px rgba(42, 36, 88, 0.45);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-synthesis: none;
  font-stretch: normal;
  letter-spacing: normal;
  word-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Evitar tipografías “achatadas” / excesivamente condensadas */
body.theme-moderno *,
body.theme-halloween *,
body.theme-default * {
  font-stretch: normal !important;
}

body.theme-moderno .tracking-tight,
body.theme-halloween .tracking-tight,
body.theme-moderno .tracking-tighter,
body.theme-halloween .tracking-tighter {
  letter-spacing: 0.01em !important;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-stretch: normal;
}

.font-pacifico,
.brand-wordmark {
  font-family: var(--font-brand);
  font-stretch: normal;
  letter-spacing: 0.01em;
}

body.theme-moderno .font-pacifico,
body.theme-halloween .font-pacifico {
  font-family: var(--font-brand);
  font-weight: 700;
  font-style: normal;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo:hover { opacity: 0.92; }

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-a), var(--brand-b));
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -8px rgba(102, 126, 234, 0.75);
}

.logo-mark.sm { width: 32px; height: 32px; border-radius: 10px; }
.logo-mark.lg { width: 48px; height: 48px; border-radius: 14px; }

.brand-wordmark {
  font-weight: 700;
  color: var(--brand-ink);
  line-height: 1.15;
  white-space: nowrap;
}

.brand-wordmark .accent { color: var(--brand-a); }

body.theme-default .brand-wordmark {
  color: #312e81;
  font-weight: 400;
}

/* Nav / botones modernos */
body.theme-moderno .nav-shell,
body.theme-halloween .nav-shell {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brand-line);
}

body.theme-moderno .btn-brand,
body.theme-halloween .btn-brand {
  background: var(--brand-a);
  color: #fff;
  border-color: var(--brand-a);
}

body.theme-moderno .btn-brand:hover,
body.theme-halloween .btn-brand:hover {
  background: #5558d4;
}

body.theme-moderno .text-brand,
body.theme-halloween .text-brand {
  color: var(--brand-a);
}

/* Halloween: rico y jugoso, misma paleta de marca */
body.theme-halloween {
  background:
    radial-gradient(900px 420px at 10% -5%, rgba(102, 126, 234, 0.18), transparent 55%),
    radial-gradient(700px 360px at 95% 0%, rgba(118, 75, 162, 0.22), transparent 50%),
    #f0f1fe;
}

body.theme-halloween .logo-mark {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.35), 0 0 24px rgba(118, 75, 162, 0.45);
  animation: hw-glow 2.8s ease-in-out infinite;
}

@keyframes hw-glow {
  0%, 100% { filter: brightness(1); transform: rotate(-2deg); }
  50% { filter: brightness(1.08); transform: rotate(2deg); }
}

.hw-floaters {
  pointer-events: none;
  position: fixed;
  inset: 0 0 auto 0;
  height: 0;
  z-index: 50;
  overflow: visible;
}

.hw-floater {
  position: absolute;
  top: 58px;
  font-size: 2.75rem;
  line-height: 1;
  opacity: 0.95;
  animation: hw-bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(42, 36, 88, 0.35));
  z-index: 45;
}

.hw-floater.hw-pumpkin { font-size: 3.25rem; }
.hw-floater.hw-ghost { font-size: 3rem; }

@keyframes hw-bob {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  50% { transform: translateY(14px) rotate(8deg) scale(1.08); }
}

body.theme-halloween .auth-card {
  position: relative;
  overflow: visible;
  margin-top: 1.5rem;
  border: 2px solid #c7cbfb;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #667eea, #764ba2) border-box;
  border: 2px solid transparent;
  box-shadow: 0 22px 50px -28px rgba(70, 68, 176, 0.55);
}

/* Calabaza en login/registro (Halloween) */
body.theme-halloween .auth-card::before {
  content: "🎃";
  position: absolute;
  top: -28px;
  right: 14px;
  font-size: 3rem;
  line-height: 1;
  animation: hw-peek 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(42, 36, 88, 0.35));
  z-index: 3;
}

@keyframes hw-peek {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(6px) rotate(8deg); }
}

body.theme-halloween .auth-title::after {
  content: " · truco o registro";
  font-size: 0.75em;
  color: var(--brand-b);
  font-weight: 600;
}

@media (max-width: 640px) {
  .hw-floater { font-size: 2rem; opacity: 0.9; }
  .hw-floater.hw-pumpkin { font-size: 2.35rem; }
  body.theme-halloween .auth-title::after { content: ""; }
}

/* Auth cards (halloween overrides above) */
body.theme-halloween .auth-card {
  border-radius: 1.25rem;
}

body.theme-moderno .auth-title,
body.theme-halloween .auth-title,
body.theme-navidad .auth-title {
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ========== NAVIDAD ========== */
body.theme-navidad {
  background:
    radial-gradient(900px 420px at 8% 0%, rgba(102, 126, 234, 0.2), transparent 55%),
    radial-gradient(700px 380px at 95% 5%, rgba(118, 75, 162, 0.18), transparent 50%),
    linear-gradient(180deg, #eef1ff 0%, #f8f9ff 45%, #ffffff 100%);
}

body.theme-navidad .logo-mark {
  box-shadow: 0 0 0 3px rgba(224, 227, 253, 0.9), 0 10px 28px -10px rgba(102, 126, 234, 0.85);
}

.xmas-stage {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 48;
  overflow: hidden;
}

.xmas-snow {
  position: absolute;
  inset: 0;
}

.xmas-flake {
  position: absolute;
  top: -10%;
  color: #667eea;
  animation-name: xmas-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

@keyframes xmas-fall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); }
  100% { transform: translateY(110vh) translateX(40px) rotate(360deg); }
}

.xmas-sleigh-wrap {
  position: absolute;
  top: 72px;
  left: 0;
  width: 100%;
  height: 90px;
}

.xmas-sleigh {
  position: absolute;
  left: -20%;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  animation: xmas-sleigh-fly 14s linear infinite;
  filter: drop-shadow(0 10px 16px rgba(42, 36, 88, 0.35));
}

.xmas-sleigh-emoji {
  font-size: 3rem;
  line-height: 1;
  white-space: nowrap;
}

.xmas-gift {
  font-size: 1.6rem;
  opacity: 0;
  animation: xmas-drop 14s linear infinite;
}

.xmas-gift.g1 { animation-delay: 0s; }
.xmas-gift.g2 { animation-delay: 0.35s; font-size: 1.35rem; }
.xmas-gift.g3 { animation-delay: 0.7s; font-size: 1.2rem; }

@keyframes xmas-sleigh-fly {
  0% { left: -22%; transform: translateY(0); }
  45% { transform: translateY(8px); }
  55% { transform: translateY(-4px); }
  100% { left: 118%; transform: translateY(2px); }
}

@keyframes xmas-drop {
  0%, 18% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  22% { opacity: 1; transform: translate(-6px, 10px) scale(1); }
  40% { opacity: 0.95; transform: translate(-18px, 48px) scale(1); }
  55% { opacity: 0; transform: translate(-28px, 90px) scale(0.9); }
  100% { opacity: 0; transform: translate(-28px, 90px) scale(0.9); }
}

/* Login / registro: gorro y calcetines */
body.theme-navidad .auth-card {
  position: relative;
  overflow: visible !important;
  margin-top: 2.2rem;
  border-radius: 1.25rem;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #667eea, #764ba2) border-box;
  box-shadow: 0 24px 50px -28px rgba(70, 68, 176, 0.55);
}

/* Gorro de Papá Noel (misma paleta: índigo/púrpura + blanco) */
body.theme-navidad .auth-card::before {
  content: "";
  position: absolute;
  top: -34px;
  left: 18px;
  width: 64px;
  height: 46px;
  background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
  border-radius: 50% 50% 8% 8% / 70% 70% 20% 20%;
  box-shadow:
    0 10px 0 0 #fff,
    18px -18px 0 -8px #fff,
    22px -28px 0 -14px #764ba2;
  z-index: 3;
}

/* Calcetines colgando */
body.theme-navidad .auth-card::after {
  content: "🧦  🧦";
  position: absolute;
  top: -8px;
  right: 16px;
  font-size: 1.85rem;
  letter-spacing: 0.35rem;
  filter: hue-rotate(220deg) saturate(1.2);
  animation: xmas-sock 2.8s ease-in-out infinite;
  z-index: 3;
}

@keyframes xmas-sock {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

body.theme-navidad .auth-title::after {
  content: " · ¡ho ho ho!";
  font-size: 0.75em;
  color: var(--brand-b);
  font-weight: 600;
}

@media (max-width: 640px) {
  .xmas-sleigh-emoji { font-size: 2.35rem; }
  .xmas-gift { font-size: 1.2rem; }
  body.theme-navidad .auth-card::before {
    width: 52px;
    height: 38px;
    top: -28px;
  }
  body.theme-navidad .auth-card::after { font-size: 1.5rem; }
  body.theme-navidad .auth-title::after { content: ""; }
}
