/* ==========================================================================
   BonalPlay — Link in bio
   ========================================================================== */

:root {
  --bg: #0a0a12;
  --bg-2: #12101f;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f4fa;
  --muted: #9a9ab0;
  --accent: #9146ff;         /* Morado Twitch */
  --accent-soft: #b98bff;
  --radius: 16px;
  --maxw: 460px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  padding: 40px 20px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1100px 700px at 50% -10%, #2a1b4d 0%, transparent 55%),
              radial-gradient(900px 600px at 100% 100%, #1a1140 0%, transparent 50%),
              linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Aura animada de fondo */
body::before {
  content: "";
  position: fixed;
  inset: -30% -30% auto -30%;
  height: 70vh;
  background: radial-gradient(closest-side, rgba(145, 70, 255, 0.28), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: aura 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aura {
  0%   { transform: translate(-8%, -4%) scale(1);   opacity: 0.8; }
  100% { transform: translate(10%, 6%)  scale(1.15); opacity: 1;  }
}

/* --------------------------------------------------------------- Header -- */
#main-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  animation: rise 0.6s ease both;
}

.logo-container {
  position: relative;
  display: grid;
  place-items: center;
}

.logo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 4px rgba(145, 70, 255, 0.15),
              0 12px 40px -8px rgba(145, 70, 255, 0.55);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.04);
}

.title {
  text-align: center;
  margin: 0;
}

.title h1 {
  margin: 0;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fff, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(145, 70, 255, 0.35);
}

/* --------------------------------------------------------------- Layout -- */
main.content {
  width: 100%;
  display: flex;
  justify-content: center;
}

.main-container {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --------------------------------------------------------------- Links --- */
.links {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.links .button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, background 0.2s ease;
  animation: rise 0.5s ease both;
}

.links .button::after {
  content: "›";
  margin-left: auto;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.links .button:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand, var(--accent)) 55%, transparent);
  background: color-mix(in srgb, var(--brand, var(--accent)) 12%, var(--surface));
  box-shadow: 0 10px 34px -10px var(--brand, var(--accent));
}

.links .button:hover::after {
  transform: translateX(4px);
  color: var(--text);
}

.links .button:active {
  transform: translateY(-1px);
}

.icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Acento por marca */
.twitch   { --brand: #9146ff; }
.kick     { --brand: #53fc18; }
.tiktok   { --brand: #ff2d55; }
.twitter  { --brand: #1d9bf0; }
.youtube  { --brand: #ff0033; }
.discord  { --brand: #5865f2; }

/* ------------------------------------------------------ Código creador --- */
.creator-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(145, 70, 255, 0.10), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px -20px rgba(145, 70, 255, 0.5);
  animation: rise 0.6s ease both;
}

.creator-code-container .instruction {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.creator-code {
  margin: 4px 0;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  cursor: pointer;
  user-select: all;
  text-shadow: 0 0 16px rgba(145, 70, 255, 0.9),
               0 0 34px rgba(145, 70, 255, 0.5);
  transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.creator-code:hover {
  transform: scale(1.03);
  text-shadow: 0 0 20px rgba(145, 70, 255, 1),
               0 0 46px rgba(145, 70, 255, 0.7);
}

.creator-code-container .button {
  margin-top: 8px;
  padding: 12px 26px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6f2bd6);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px -8px var(--accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.creator-code-container .button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 30px -8px var(--accent);
}

.creator-code-container .button:active {
  transform: translateY(0);
}

/* -------------------------------------------------------- Toggle tema --- */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  z-index: 40;
}

.theme-toggle:hover {
  transform: scale(1.08) rotate(-8deg);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--surface-hover);
}

/* ------------------------------------------------------------ Compartir -- */
.share-btn {
  width: 100%;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------- Footer -- */
.site-footer {
  margin-top: 34px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- Toast --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 12px;
  background: rgba(20, 16, 34, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------ Animación -- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Retraso escalonado de los botones */
.links .button:nth-child(1) { animation-delay: 0.05s; }
.links .button:nth-child(2) { animation-delay: 0.10s; }
.links .button:nth-child(3) { animation-delay: 0.15s; }
.links .button:nth-child(4) { animation-delay: 0.20s; }
.links .button:nth-child(5) { animation-delay: 0.25s; }
.links .button:nth-child(6) { animation-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------- Claro --- */
body.light-mode {
  --bg: #eef0f6;
  --bg-2: #f6f4fc;
  --surface: rgba(20, 16, 40, 0.04);
  --surface-hover: rgba(20, 16, 40, 0.07);
  --border: rgba(20, 16, 40, 0.12);
  --text: #16121f;
  --muted: #5c5670;
  color: var(--text);
  background: radial-gradient(1100px 700px at 50% -10%, #dcd2ff 0%, transparent 55%),
              linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 60%);
}

body.light-mode .title h1 {
  background: linear-gradient(90deg, #2a1b4d, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------- Fondo transparente -- */
body.transparent-background {
  background: transparent;
}

body.transparent-background::before {
  display: none;
}

/* -------------------------------------------------------------- Responsive */
@media (max-width: 480px) {
  body { padding: 28px 16px 44px; }
  .logo { width: 92px; height: 92px; }
  .links .button { padding: 14px 16px; }
}
