/* style.css: what every page of the site loads (profile, dashboard,
   /verificar): the variables, the base, and everything a public profile can
   show.

   GENERATED: do not edit public/style.css by hand. It is the files of
   estilos/perfil/ joined in name order by scripts/unir-estilos.mjs, one file
   per area of the profile, so a bio still downloads a single stylesheet.
   Edit the area's file there, then run `node scripts/unir-estilos.mjs`;
   functions/test/estilos-perfil.test.js fails when the two disagree.

   The dashboard's own styles are in the panel-*.css files, which
   dashboard.html loads after this file. A rule goes here only if a profile can use it.

   A few dashboard rules stay here on purpose (.logout-btn, the login and
   settings fields, the Discord dialog buttons): a shared rule of the same
   specificity further down (.action-btn, the keyboard focus ring) must keep
   winning over them, and the panel files load after this file. */

/* The two base fonts, served from this site (public/fuentes/, SIL Open Font
   License, the license files sit next to them): a font from Google meant one
   render-blocking stylesheet from fonts.googleapis.com and the files from
   fonts.gstatic.com, two more connections before the first paint on a phone.
   Variable files (every weight in one), the latin and latin-ext subsets of
   Google Fonts. The other picker fonts still load on demand from Google
   (fonts.js). A new version of a file gets a new name (the -vNN part):
   firebase.json caches them for a year. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/fuentes/outfit-latin-ext-v15.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/fuentes/outfit-latin-v15.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fuentes/plus-jakarta-sans-latin-ext-v12.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fuentes/plus-jakarta-sans-latin-v12.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Custom CSS System for guns.lol Style Bio Page */

/* Google Fonts: loaded by the <link> in each HTML template (no @import here,
   it fetched the same stylesheet a second time). */
:root {
  --primary-color: #e11d48;
  --secondary-color: #0f172a;
  --bg-color: #08090c;
  --card-bg-rgb: 13, 15, 23;
  --card-opacity: 0.9;
  --card-bg: rgba(var(--card-bg-rgb), var(--card-opacity));
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-color: #e11d48; /* Crimson by default, dynamic in JS */
  --accent-glow: rgba(225, 29, 72, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Cosmetic Settings */
  --card-blur: 16px;
  --card-border-width: 1px;
  --card-border-radius: 24px;
  --card-max-width: 480px;
  --bg-blur: 0px;
  --bg-brightness: 100%;
  
  /* Cursor variables */
  --cursor-x: 0px;
  --cursor-y: 0px;
}

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

body.custom-cursor-active * {
  cursor: none !important; /* Hide browser default cursor only when JS is active */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 9, 12, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Canvas background */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
  transition: filter 0.3s ease;
}

/* The user's background image, under the effects canvas. The background
   blur/brightness sliders act on it; it overhangs the viewport so a blur does
   not fade its edges. */
#bg-image-layer {
  position: fixed;
  inset: -40px;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
  transition: filter 0.3s ease;
}

/* The background video (public/fondo-video.js) fills the same layer, so the
   blur and brightness sliders apply to it; the layer's background (the first
   frame) shows while it loads. "bg-video-still" keeps it hidden: under
   reduced motion it plays only for its sound, behind the still. */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.bg-video.bg-video-still {
  visibility: hidden;
}

/* With an image, the sliders belong to the image: the effects stay sharp. */
body.has-bg-image #particles-canvas {
  filter: none;
}

/* Cursor Followers */
#custom-cursor {
  display: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent-color);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.08s ease-out, border-color 0.3s;
  /* A light edge so the ring still shows over its own color (a button of the
     accent color, a red background). */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45), 0 0 10px var(--accent-glow);
}

#custom-cursor-dot {
  display: none;
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99999;
  transition: width 0.2s, height 0.2s, background-color 0.3s;
}

body.custom-cursor-active #custom-cursor,
body.custom-cursor-active #custom-cursor-dot {
  display: block;
}

/* Native custom cursor mode (e.g. for .cur files) */
body.custom-cursor-native {
  cursor: var(--native-cursor-url), auto;
}

/* Ensure links, buttons, and interactive elements show the custom cursor too */
body.custom-cursor-native a,
body.custom-cursor-native button,
body.custom-cursor-native .social-btn,
body.custom-cursor-native .player-nav-btn,
body.custom-cursor-native .progress-container,
body.custom-cursor-native .checkbox-container {
  cursor: var(--native-cursor-url), pointer !important;
}

/* With a background image the effect canvas is drawn as usual (opaque base,
   trails) and made translucent as a whole, so the image shows through it.
   "No effect" clears the canvas instead (public/canvas-base.js). */
body.has-bg-image #particles-canvas {
  opacity: 0.6;
}

/* Cursor hover states */
body.link-hover #custom-cursor {
  width: 42px;
  height: 42px;
  background-color: rgba(225, 29, 72, 0.05);
  border-width: 2px;
}

body.link-hover #custom-cursor-dot {
  width: 10px;
  height: 10px;
}

/* Enter Screen Overlay */
#enter-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050608;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
  user-select: none;
}

#enter-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.enter-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
}

.enter-click {
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  animation: pulseGlow 2.5s infinite ease-in-out;
  transition: color 0.3s;
  font-weight: 600;
}

.enter-click:hover {
  color: var(--accent-color);
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.75;
    text-shadow: 0 0 0px rgba(255, 255, 255, 0);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 12px var(--accent-glow);
    color: #fff;
  }
}

/* Main Container Blur Transition */
#main-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  z-index: 1;
  transition: filter 1s ease;
}

#main-container.blurred {
  filter: blur(20px);
}

/* Profile Card */
#profile-card {
  width: 100%;
  max-width: var(--card-max-width, 480px);
  background: var(--card-bg);
  border: var(--card-border-width) solid var(--card-border);
  border-radius: var(--card-border-radius);
  padding: 32px 28px;
  backdrop-filter: blur(var(--card-blur)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(120%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 
              inset 0 0 20px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  /* clip cuts to the rounded corners like hidden, without making the card a
     scroll container (one would catch any scroll snap of its parts, as it
     did with "Por secciones"). hidden stays for browsers without clip. */
  overflow: hidden;
  overflow: clip;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#profile-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7),
              0 0 30px rgba(var(--accent-color), 0.05),
              inset 0 0 20px rgba(255, 255, 255, 0.03);
}

/* Profile Header elements */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.avatar-container {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 4px;
}

#profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
  position: relative;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-color);
  filter: blur(12px);
  opacity: 0.45;
  z-index: 1;
  transition: transform 0.5s, opacity 0.5s, background-color 0.3s;
}

/* "Decoración de Discord": Discord's decoration frame is 120% of the
   avatar, centered, above it and never in the way of a click. */
.avatar-decoration {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

.avatar-container:hover #profile-avatar {
  transform: scale(1.08) rotate(4deg);
  border-color: var(--accent-color);
}

.avatar-container:hover .avatar-glow {
  transform: scale(1.15);
  opacity: 0.7;
}

.name-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#profile-name {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--name-light, #ffffff) 40%, var(--name-accent, var(--accent-color)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: usernameGlow 4s infinite ease-in-out;
  padding-bottom: 2px;
  position: relative;
  display: inline-block;
}

@keyframes usernameGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
  }
  50% {
    filter: drop-shadow(0 0 8px var(--accent-glow));
  }
}

#profile-bio {
  font-size: 0.92rem;
  color: var(--bio-color, var(--text-secondary));
  font-weight: 400;
  line-height: 1.5;
  max-width: 90%;
}

/* Perfil → Lo básico → Ubicación (profileLocation), under the bio. */
.profile-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 90%;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.profile-location.hidden {
  display: none;
}

.profile-location-icon {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--icon-color, var(--accent-color));
}

/* Badges styling */
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.badge-icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.badge-verified {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.15);
}

.badge-developer {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}

.badge-premium {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.15);
}

.badge-staff {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15);
}

.badge-supporter {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
  border-color: rgba(20, 184, 166, 0.3);
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.15);
}

.badge-booster {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.3);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.15);
}

/* Badges added with the earned-badge system (public/insignias-catalogo.js) */
.badge-donor {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
  border-color: rgba(20, 184, 166, 0.3);
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.15);
}

.badge-partner {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.15);
}

.badge-bugHunter {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.15);
}

.badge-bugHunterGold {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.badge-winner {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.badge-early {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.15);
}

.badge-veteran {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.15);
}

.badge-complete {
  background: rgba(132, 204, 22, 0.15);
  color: #84cc16;
  border-color: rgba(132, 204, 22, 0.3);
  box-shadow: 0 0 8px rgba(132, 204, 22, 0.15);
}

.badge-views100 {
  background: rgba(205, 127, 50, 0.15);
  color: #cd7f32;
  border-color: rgba(205, 127, 50, 0.3);
  box-shadow: 0 0 8px rgba(205, 127, 50, 0.15);
}

.badge-views1k {
  background: rgba(203, 213, 225, 0.15);
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, 0.3);
  box-shadow: 0 0 8px rgba(203, 213, 225, 0.15);
}

.badge-views10k {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.3);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.15);
}

.badge-views100k {
  background: rgba(103, 232, 249, 0.15);
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.3);
  box-shadow: 0 0 8px rgba(103, 232, 249, 0.15);
}

.badge-booster {
  background: rgba(244, 127, 255, 0.15);
  color: #f47fff;
  border-color: rgba(244, 127, 255, 0.3);
  box-shadow: 0 0 8px rgba(244, 127, 255, 0.15);
}

/* Custom badges (functions/lib/custom-badges.js): the color the admin picked,
   set as --badge-color by decorateBadgeChip() in insignias-catalogo.js. */
.badge-custom {
  color: var(--badge-color, #94a3b8);
  background: color-mix(in srgb, var(--badge-color, #94a3b8) 15%, transparent);
  border-color: color-mix(in srgb, var(--badge-color, #94a3b8) 30%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--badge-color, #94a3b8) 15%, transparent);
}

.badge-icon-img {
  object-fit: contain;
}

/* A color the owner gave a badge (config.badgeColors, render.js). Two
   classes, so it wins over each badge's own .badge-<key> colors. */
.badge.badge-tinted {
  color: var(--badge-color);
  background: color-mix(in srgb, var(--badge-color) 15%, transparent);
  border-color: color-mix(in srgb, var(--badge-color) 30%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--badge-color) 15%, transparent);
}

/* The badge's text and icon moved until they read where the chip sits
   (public/texto-legible.js); its tint and border keep the chip's color. */
.badge.badge-readable {
  color: var(--badge-text);
}

.badges.badges-no-glow .badge {
  box-shadow: none;
}

/* The name and the Discord server tag next to it (public/insignias-discord.js). */
.name-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  max-width: 100%;
}

.guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-color, #f8fafc);
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.guild-tag img {
  width: 16px;
  height: 16px;
  display: block;
}

.guild-tag.hidden,
.discord-badges.hidden {
  display: none;
}

/* The Discord badges: Discord's own icons in one capsule. */
.discord-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
}

.discord-badge {
  position: relative;
  display: block;
  border-radius: 6px;
  outline: none;
}

.discord-badge img {
  width: 22px;
  height: 22px;
  display: block;
}

.discord-badge:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-color, #e11d48);
}

.discord-badge-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 5px 9px;
  border-radius: 8px;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f2f3f5;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.discord-badge:hover .discord-badge-tip,
.discord-badge:focus .discord-badge-tip {
  display: block;
}

/* Badges next to the name (badgePosition: "inline"). */
.name-container.badges-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 10px;
}

/* Icons only (badgeDisplay: "icons"): round chips, the name and description
   in a bubble on hover or keyboard/touch focus. */
.badges.badges-icons {
  gap: 5px;
}

.badges.badges-icons .badge {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  cursor: default;
  outline: none;
}

.badges.badges-icons .badge .badge-icon {
  width: 14px;
  height: 14px;
}

/* The bubble: a real element (.badge-tip, built with textContent in
   render.js) in the profile's colors, or each badge's (badgeTipStyle). The
   --tip-* colors come from render.js, already checked for contrast against
   the card (public/contraste.js). */
.badges.badges-icons .badge .badge-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: 200px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--tip-border, rgba(255, 255, 255, 0.25));
  background: var(--tip-bg, #0d0f17);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: var(--tip-text, #fff);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.badges.badges-icons .badge .badge-tip strong {
  color: var(--tip-title, inherit);
  font-weight: 700;
}

.badges.badges-icons .badge:hover .badge-tip,
.badges.badges-icons .badge:focus-visible .badge-tip,
.badges.badges-icons .badge:focus .badge-tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.badges.badges-icons .badge:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 70%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .badges.badges-icons .badge .badge-tip {
    transition: none;
    transform: translate(-50%, 0);
  }
}

.badge-bugHunterGold,
.badge-views100k {
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
}

/* Music Player Styling */
.music-player {
  background: var(--box-veil, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.3s;
}

.music-player:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.player-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-volume-icon {
  width: 20px;
  height: 20px;
  fill: var(--accent-color);
  flex-shrink: 0;
  opacity: 0.8;
}

.player-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

#music-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--player-title-color, var(--text-primary));
  font-family: var(--font-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#music-artist {
  font-size: 0.68rem;
  color: var(--player-muted-color, var(--text-muted));
}

.player-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-time {
  font-size: 0.68rem;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--player-muted-color, var(--text-muted));
  min-width: 34px;
  text-align: center;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.player-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  padding: 0;
}

.player-nav-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.player-nav-btn:hover {
  color: var(--accent-color);
  transform: scale(1.15);
}

#play-pause-btn {
  background: var(--accent-color);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 0 12px var(--accent-glow);
}

#play-pause-btn:hover {
  filter: brightness(1.15);
  transform: scale(1.1);
  box-shadow: 0 0 18px var(--accent-glow);
}

#play-pause-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.progress-container {
  flex-grow: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  border-radius: 10px;
  box-shadow: 0 0 6px var(--accent-color);
  transition: width 0.1s linear, background-color 0.3s;
}

.hidden {
  display: none !important;
}

/* Social Links Grid */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.social-btn {
  background: transparent;
  border: none;
  border-radius: 12px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: visible;
}

.social-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
  z-index: 2;
}

.social-btn:hover {
  transform: translateY(-5px) scale(1.15);
  color: #fff;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

/* "Imagen propia" socials (public/estampitas.js): the owner's own images, often
   animated GIFs, in a row of 40x40 with no box, like old 88x31 web buttons. */
.socials-imagenes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px 9px;
}

.socials-grid:not(.hidden) + .socials-imagenes {
  margin-top: 14px;
}

.social-imagen {
  display: block;
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.social-imagen img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.social-imagen:hover,
.social-imagen:focus-visible {
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .social-imagen,
  .social-imagen:hover,
  .social-imagen:focus-visible {
    transition: none;
    transform: none;
  }
}

/* Discord Custom Widget Styling */
/* Live Discord status (public/discord-presence.js) */
.presence-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.2);
  text-align: left;
  --presence-color: #80848e;
}
.presence-card[data-status="online"] { --presence-color: #23a55a; }
.presence-card[data-status="idle"] { --presence-color: #f0b232; }
.presence-card[data-status="dnd"] { --presence-color: #f23f43; }
.presence-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.35);
}
.presence-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}
.presence-status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--presence-color);
  border: 3px solid rgb(var(--card-bg-rgb, 13, 15, 23));
}
.presence-card[data-status="online"] .presence-status-dot {
  animation: presencePulse 2.4s ease-in-out infinite;
}
@keyframes presencePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(35, 165, 90, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(35, 165, 90, 0); }
}
.presence-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.presence-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.presence-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presence-username {
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presence-status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--presence-color);
}
.presence-activity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
}
.presence-activity-image {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.presence-activity-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.presence-activity-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #94a3b8);
}
.presence-activity[data-kind="spotify"] .presence-activity-label {
  color: #1ed760;
}
.presence-activity-label:empty,
.presence-activity-title:empty,
.presence-activity-detail:empty {
  display: none;
}
.presence-activity-title,
.presence-activity-detail {
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presence-activity-detail {
  color: var(--text-secondary, #94a3b8);
}

/* The owner's own line when Discord reports nothing (discordIdleText). */
.presence-activity[data-kind="idle"] .presence-activity-title {
  color: var(--text-secondary, #94a3b8);
  font-style: italic;
  white-space: normal;
}

/* Only in the dashboard's live preview: the bot does not see the linked
   account (discord-presence.js, renderNotMonitored()). */
.presence-card.presence-warning {
  --presence-color: #f0b232;
  border-color: rgba(240, 178, 50, 0.45);
  background: rgba(240, 178, 50, 0.08);
}

.presence-card.presence-warning .presence-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 178, 50, 0.16);
}

.presence-card.presence-warning .presence-avatar-wrap::before {
  content: "!";
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 900;
  color: #f0b232;
}

.presence-card.presence-warning .presence-status-dot {
  display: none;
}

.presence-card.presence-warning .presence-status-text {
  font-weight: 500;
  color: var(--text-secondary, #94a3b8);
}

.discord-card {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.3s;
}

.discord-card:hover {
  background: rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.4);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.15);
}

.discord-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-guild-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.discord-member-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.discord-member-count::before {
  content: "·";
  margin-right: 6px;
}

.discord-widget-avatars {
  display: flex;
  margin-top: 4px;
}

.discord-widget-avatars img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--card-bg, #0d0f17);
  object-fit: cover;
}

.discord-widget-avatars img + img {
  margin-left: -6px;
}

.discord-logo svg {
  width: 28px;
  height: 28px;
  color: #5865F2;
}

.discord-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#discord-guild-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.discord-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #23a55a;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #23a55a;
}

#discord-online-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.discord-join-btn {
  background: #5865F2;
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-title);
  text-align: center;
}

.discord-join-btn:hover {
  background: #4752c4;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
  transform: scale(1.04);
}

/* Card Footer Stats */
.card-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--card-border);
  padding-top: 18px;
  margin-top: 4px;
}

.footer-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-title);
}

/* The footer over the card's colors (footerColors() in contraste.js). */
#footer-local-time .stat-label { color: var(--footer-time-label, var(--text-muted)); }
#footer-local-time .stat-val { color: var(--footer-time-value, var(--text-secondary)); }
#footer-views .stat-label { color: var(--footer-views-label, var(--text-muted)); }
#footer-views .stat-val { color: var(--footer-views-value, var(--text-secondary)); }

/* Isolation for admin components from profile custom style tokens */

#confirm-screen {
  --primary-color: #e11d48;
  --secondary-color: #0f172a;
  --bg-color: #08090c;
  --accent-color: #e11d48;
  --accent-glow: rgba(225, 29, 72, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --card-border: rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
}

/* Login Screen Overlay */
#confirm-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 5, 8, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(13, 15, 23, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 
              0 0 40px rgba(225, 29, 72, 0.05);
  text-align: center;
  backdrop-filter: blur(16px);
}

.login-card h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff 40%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.input-field input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: all 0.25s;
}

.logout-btn {
  width: auto;
  max-width: 160px;
  margin: 0 auto;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 8px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.discord-dialog-actions button {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.settings-group select,
.settings-group textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: all 0.2s;
}

.settings-group textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.checkbox-container:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.checkbox-container input[type="checkbox"] {
  accent-color: var(--accent-color);
  width: 14px;
  height: 14px;
}

/* Action buttons */
.action-btn {
  font-family: var(--font-title);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  transition: all 0.2s;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-btn[hidden] {
  display: none;
}

.action-btn.primary {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.action-btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px var(--accent-glow);
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Inside the preview frame the profile is shown unlocked: no enter screen. */
body.preview-frame #enter-screen {
  display: none;
}

/* Hide custom cursor on mobile/touch screens and restore native cursor style */

@media (pointer: coarse), (hover: none) {
  #custom-cursor, #custom-cursor-dot {
    display: none !important;
  }
  * {
    cursor: auto !important;
  }
}

/* Custom Cursor Image Mode */
#custom-cursor.image-mode {
  border: none !important;
  box-shadow: none !important;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Profile Card Banner Header */
.profile-banner {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  border-bottom: 1px solid var(--card-border);
}

#profile-card.has-banner {
  padding-top: 140px;
}

/* 1. Toggle Glow. "Brillo" and "Animaciones" off reach every element, so
   they stop at the dashboard and its login (the same page, where render.js
   also sets these classes): :where() keeps them at the specificity the
   rules below were written against. */
body.no-glow:where(:not(.dashboard-open, .login-open)) * {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.no-glow .avatar-glow {
  display: none !important;
}

/* 2. Toggle Rounded Socials (Square mode) */
body.socials-square .social-btn {
  border-radius: 12px !important;
}

/* 3. Toggle Animations (Off mode) */
body.no-animations:where(:not(.dashboard-open, .login-open)) *,
body.no-animations:where(:not(.dashboard-open, .login-open)) *::before,
body.no-animations:where(:not(.dashboard-open, .login-open)) *::after {
  animation: none !important;
  transition: none !important;
}

/* 4. Username Sparkle Effect */

@keyframes sparkleShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.sparkle-text {
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-color) 25%, #ffffff 50%, var(--accent-color) 75%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sparkleShimmer 3.5s linear infinite !important;
}

/* 5. Avatar Decoration Ring */
.avatar-deco-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--deco-1, var(--accent-color)), var(--deco-2, var(--primary-color)), var(--deco-3, #3b82f6), var(--deco-1, var(--accent-color)));
  background-size: 400% 400%;
  z-index: -1;
  animation: decoRotate 5s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 15px var(--accent-glow);
}

body.avatar-deco-active .avatar-deco-ring {
  opacity: 1;
}

@keyframes decoRotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 6. Theme Colored Icons */
body.theme-icons-active .social-btn {
  color: var(--icon-color);
}

body.theme-icons-active .social-btn:hover {
  border-color: var(--accent-color);
}

/* Typing Cursor blink effect */
.typing-cursor {
  color: var(--accent-color);
  font-weight: bold;
  margin-left: 2px;
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { color: transparent }
  50% { color: var(--accent-color); }
}

.action-btn.small {
  padding: 8px 16px;
  font-size: 0.8rem;
  height: 34px;
}

/* ==========================================================================
   PUBLIC PROFILE PAGE COMPONENT STYLES
   ========================================================================== */

/* Custom Links Component */
.custom-links-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 5px;
}

.custom-links-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.profile-custom-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 16px;
  /* --box-veil: a darker or lighter box where no text color reads on the
     card (public/texto-legible.js). */
  background: var(--box-veil, rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.profile-custom-link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transition: all 0.6s ease;
}

.profile-custom-link-card:hover::before {
  left: 100%;
}

.profile-custom-link-card:hover {
  background: var(--box-veil, rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.profile-custom-link-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.profile-custom-link-icon-wrapper {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.2s, color 0.2s;
}

.profile-custom-link-card:hover .profile-custom-link-icon-wrapper {
  transform: scale(1.1);
  color: var(--text-primary);
  background: var(--accent-color);
}

.profile-custom-link-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

.profile-custom-link-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.profile-custom-link-title {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--link-title-color, var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colors made readable where each card sits (texto-legible.js); the URL is
   then drawn solid, since its faded copy is what read poorly. */
.profile-custom-link-url {
  font-size: 0.7rem;
  color: var(--link-url-color, var(--text-secondary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.profile-custom-link-card[style*="--link-url-color"] .profile-custom-link-url {
  opacity: 1;
}

.profile-custom-link-arrow {
  color: var(--text-secondary);
  opacity: 0.5;
  display: flex;
  align-items: center;
  transition: all 0.25s;
  flex-shrink: 0;
}

.profile-custom-link-card:hover .profile-custom-link-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--accent-color);
}

.profile-custom-link-arrow svg {
  width: 16px;
  height: 16px;
}

/* Media Embeds Component */
.media-embeds-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 5px;
}

.media-embeds-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.profile-media-embed-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-media-embed-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.profile-media-embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.profile-media-embed-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.profile-media-embed-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-media-embed-header-icon {
  display: flex;
  align-items: center;
  color: var(--accent-color);
}

.profile-media-embed-header-icon svg {
  width: 18px;
  height: 18px;
}

.profile-media-embed-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-title);
  letter-spacing: 0.02em;
}

.profile-media-embed-chevron {
  color: var(--text-secondary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
}

.profile-media-embed-chevron svg {
  width: 14px;
  height: 14px;
}

.profile-media-embed-card.collapsed .profile-media-embed-chevron {
  transform: rotate(-90deg);
}

.profile-media-embed-content {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  overflow: hidden;
  max-height: 400px;
  opacity: 1;
}

.profile-media-embed-card.collapsed .profile-media-embed-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, visibility 0s 0.4s;
}

.iframe-aspect-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.iframe-aspect-ratio iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.spotify-embed-wrapper {
  width: 100%;
  height: 80px;
  background: #000;
}

.spotify-embed-wrapper iframe {
  width: 100%;
  height: 80px;
  border: 0;
}

.sparkle-card-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ==========================================
   USERNAME TEXT EFFECTS (CSS RULES)
   ========================================== */

/* Target both #profile-name and #username-preview-text with specific ID specificity */

/* Default style overrides for effects */
#profile-name.effect-none {
  background: linear-gradient(135deg, var(--name-light, #ffffff) 40%, var(--name-accent, var(--accent-color)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: usernameGlow 4s infinite ease-in-out !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Typing cursor style */
.typing-cursor {
  font-weight: 300;
  margin-left: 2px;
  animation: cursorBlink 0.8s step-end infinite;
  display: inline-block;
  -webkit-text-fill-color: var(--text-color, #ffffff);
  text-shadow: none !important;
}

@keyframes cursorBlink {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

/* Rainbow Effect */
.effect-rainbow,
#profile-name.effect-rainbow {
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
  background-size: 400% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowShift 6s linear infinite !important;
  text-shadow: none !important;
  filter: none !important;
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

/* Fuzzy Glitch Effect */
.effect-fuzzy,
#profile-name.effect-fuzzy {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8), -2px -1px 0 rgba(255, 0, 0, 0.7), 2px 1px 0 rgba(0, 0, 255, 0.7) !important;
  animation: fuzzyGlitch 0.15s steps(2) infinite !important;
  filter: none !important;
  display: inline-block !important; /* skew needs display inline-block (beats .effect-card-icon in the panel) */
}

@keyframes fuzzyGlitch {
  0% { transform: skew(1.5deg); filter: blur(0.2px); }
  50% { transform: skew(-1.5deg); filter: blur(0.5px); text-shadow: 0 0 4px rgba(255, 255, 255, 0.8), -2px 1px 0 rgba(255, 0, 0, 0.8), 2px -1px 0 rgba(0, 0, 255, 0.8); }
  100% { transform: skew(0deg); filter: blur(0.1px); }
}

/* "Animaciones" and "Brillo" off reach the name effects too: their
   animation and the fuzzy shadow carry !important (they must beat a CSS
   animation's own values), so these switch rules need a more specific
   selector than body.no-animations * and body.no-glow *. */
body.no-animations #profile-name {
  animation: none !important;
}

body.no-glow #profile-name.effect-fuzzy {
  text-shadow: none !important;
}

/* Typing and Shuffle overrides */
.effect-typing,
#profile-name.effect-typing,
.effect-shuffle,
#profile-name.effect-shuffle {
  background: linear-gradient(135deg, var(--name-light, #ffffff) 40%, var(--name-accent, var(--accent-color)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: usernameGlow 4s infinite ease-in-out !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Sparkle override (keeps standard text gradient but allows canvas particles) */
.effect-sparkle,
#profile-name.effect-sparkle {
  background: linear-gradient(135deg, var(--name-light, #ffffff) 40%, var(--name-accent, var(--accent-color)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: usernameGlow 4s infinite ease-in-out !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Sparkle Canvas Element */
.username-sparkle-canvas {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Brand Colored Social Buttons ("Colores Originales de Redes"): each
   network sets its color as "r, g, b" in --brand-rgb (and --brand-bg when its
   box is not the color at 8%); the two rules after the list draw them all.
   The hover glow has no !important, so "Brillo" off (body.no-glow *)
   removes it like every other glow. TikTok has its own colors, after these.
   The networks of public/iconos-redes-mas.js carry .marca-propia and their
   --brand-rgb set by public/perfil-enlaces.js. */
body.brand-colors-active .social-btn[title="GITHUB"] { --brand-rgb: 255, 255, 255; --brand-bg: rgba(255, 255, 255, 0.05); }
body.brand-colors-active .social-btn[title="STEAM"] { --brand-rgb: 0, 173, 239; --brand-bg: rgba(23, 26, 33, 0.4); }
body.brand-colors-active .social-btn[title="INSTAGRAM"] { --brand-rgb: 225, 48, 108; }
body.brand-colors-active .social-btn[title="TWITTER"] { --brand-rgb: 29, 161, 242; }
body.brand-colors-active .social-btn[title="X"] { --brand-rgb: 255, 255, 255; --brand-bg: rgba(255, 255, 255, 0.05); }
body.brand-colors-active .social-btn[title="TWITCH"] { --brand-rgb: 145, 70, 255; }
body.brand-colors-active .social-btn[title="YOUTUBE"] { --brand-rgb: 255, 0, 0; }
body.brand-colors-active .social-btn[title="DISCORD"] { --brand-rgb: 88, 101, 242; }
body.brand-colors-active .social-btn[title="SPOTIFY"] { --brand-rgb: 29, 185, 84; }
body.brand-colors-active .social-btn[title="SOUNDCLOUD"] { --brand-rgb: 255, 85, 0; }
body.brand-colors-active .social-btn[title="KICK"] { --brand-rgb: 83, 252, 24; }
body.brand-colors-active .social-btn[title="TELEGRAM"] { --brand-rgb: 0, 136, 204; }
body.brand-colors-active .social-btn[title="REDDIT"] { --brand-rgb: 255, 69, 0; }
body.brand-colors-active .social-btn[title="THREADS"] { --brand-rgb: 255, 255, 255; --brand-bg: rgba(255, 255, 255, 0.05); }
body.brand-colors-active .social-btn[title="NAMEMC"] { --brand-rgb: 0, 173, 239; }
body.brand-colors-active .social-btn[title="PERSONAL"] { --brand-rgb: 255, 255, 255; --brand-bg: rgba(255, 255, 255, 0.05); }
body.brand-colors-active .social-btn[title="SHOP"] { --brand-rgb: 250, 204, 21; }

body.brand-colors-active .social-btn:is([title="GITHUB"], [title="STEAM"], [title="INSTAGRAM"], [title="TWITTER"], [title="X"], [title="TWITCH"], [title="YOUTUBE"], [title="DISCORD"], [title="SPOTIFY"], [title="SOUNDCLOUD"], [title="KICK"], [title="TELEGRAM"], [title="REDDIT"], [title="THREADS"], [title="NAMEMC"], [title="PERSONAL"], [title="SHOP"], .marca-propia) {
  color: rgb(var(--brand-rgb));
  border-color: rgba(var(--brand-rgb), 0.15);
  background: var(--brand-bg, rgba(var(--brand-rgb), 0.08));
}

body.brand-colors-active .social-btn:is([title="GITHUB"], [title="STEAM"], [title="INSTAGRAM"], [title="TWITTER"], [title="X"], [title="TWITCH"], [title="YOUTUBE"], [title="DISCORD"], [title="SPOTIFY"], [title="SOUNDCLOUD"], [title="KICK"], [title="TELEGRAM"], [title="REDDIT"], [title="THREADS"], [title="NAMEMC"], [title="PERSONAL"], [title="SHOP"], .marca-propia):hover {
  border-color: rgb(var(--brand-rgb));
  box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.3);
}

/* TikTok's colors are black, white, cyan and red: a light box like the
   others (not a dark one that turned the card's color maroon) and a glow in
   the logo's cyan and red. */
body.brand-colors-active .social-btn[title="TIKTOK"] {
  color: #ffffff;
  border-color: rgba(37, 244, 238, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

body.brand-colors-active .social-btn[title="TIKTOK"]:hover {
  border-color: #25f4ee;
  box-shadow: -5px 0 14px rgba(37, 244, 238, 0.28), 5px 0 14px rgba(254, 44, 85, 0.28);
}

/* TikTok: the plain note in the icon color, or with "Colores Originales de
   Redes" the app's own logo (black square, white note, cyan and red edges). */

.tiktok-app { display: none; }

body.brand-colors-active .social-btn .tiktok-app { display: inline; }

body.brand-colors-active .social-btn .tiktok-plain { display: none; }

/* =========================================================
   CASCADING ENTRANCE ANIMATION (Guns.lol style)
   ========================================================= */

@keyframes cascadeSlideUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes headerPopBounce {
  0% { opacity: 0; transform: scale(0.6) translateY(80px); }
  50% { opacity: 1; transform: scale(1.08) translateY(-15px); }
  75% { transform: scale(0.96) translateY(5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Prepare elements to be hidden initially */
#main-container.blurred .profile-header,
#main-container.blurred .music-player,
#main-container.blurred .discord-card,
#main-container.blurred .social-btn,
#main-container.blurred .socials-imagenes,
#main-container.blurred .profile-custom-link-card,
#main-container.blurred .profile-media-embed-card {
  opacity: 0;
  pointer-events: none;
}

/* Apply staggered animation when enter screen is clicked */
#main-container:not(.blurred) .profile-header { animation: headerPopBounce 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.1s; opacity: 0; }

#main-container:not(.blurred) .music-player { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.20s; opacity: 0; }

#main-container:not(.blurred) .presence-card { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.2s; opacity: 0; }

#main-container:not(.blurred) .discord-card { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.25s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(1) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.35s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(2) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.40s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(3) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.45s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(4) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.50s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(5) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.55s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(6) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.60s; opacity: 0; }

#main-container:not(.blurred) .social-btn:nth-child(n+7) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.65s; opacity: 0; }

#main-container:not(.blurred) .socials-imagenes { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.65s; opacity: 0; }

#main-container:not(.blurred) .profile-custom-link-card:nth-child(1) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.5s; opacity: 0; }

#main-container:not(.blurred) .profile-custom-link-card:nth-child(2) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.6s; opacity: 0; }

#main-container:not(.blurred) .profile-custom-link-card:nth-child(3) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.7s; opacity: 0; }

#main-container:not(.blurred) .profile-custom-link-card:nth-child(n+4) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.8s; opacity: 0; }

#main-container:not(.blurred) .profile-media-embed-card:nth-child(1) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.85s; opacity: 0; }

#main-container:not(.blurred) .profile-media-embed-card:nth-child(2) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.95s; opacity: 0; }

#main-container:not(.blurred) .profile-media-embed-card:nth-child(n+3) { animation: cascadeSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 1.05s; opacity: 0; }

/* Disable cascading animation after it has finished running once */
#main-container.cascade-finished .profile-header,
#main-container.cascade-finished .music-player,
#main-container.cascade-finished .presence-card,
#main-container.cascade-finished .discord-card,
#main-container.cascade-finished .social-btn,
#main-container.cascade-finished .socials-imagenes,
#main-container.cascade-finished .profile-custom-link-card,
#main-container.cascade-finished .profile-media-embed-card {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.verify-card {
  text-align: center;
}

.verify-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  color: var(--accent-color);
}

.verify-card h2 {
  margin: 0 0 10px;
}

.verify-card p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.verify-card strong {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.verify-waiting {
  font-size: 0.85rem !important;
}

.verify-waiting .verify-spinner {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
}

.verify-spinner {
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: verify-spin 0.9s linear infinite;
}

@keyframes verify-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .verify-spinner {
    animation: none;
  }
}

.verify-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.verify-actions .action-btn {
  flex: 1 1 160px;
}

/* /verificar (functions/verificar.html): the button is a link there */
#confirm-screen .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#confirm-screen .action-btn.hidden {
  display: none;
}

/* ==========================================================================
   ACCESIBILIDAD — Tanda A (color-scheme, foco visible, reduced motion)
   ========================================================================== */

/* Modo oscuro nativo: arregla scrollbars, inputs y controles del sistema */
html {
  color-scheme: dark;
}

/* Foco visible por teclado en todos los elementos interactivos.
   Solo se muestra con teclado (:focus-visible), no al hacer clic con ratón. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.action-btn:focus-visible {
  outline: 2px solid var(--accent-color, #e11d48);
  outline-offset: 2px;
  border-radius: 6px;
}

/* The enter screen covers the whole viewport, so an outside ring would be
   off screen: draw it inside. */
#enter-screen:focus-visible {
  outline: 3px solid var(--accent-color, #e11d48);
  outline-offset: -8px;
  border-radius: 0;
}

/* Respeta la preferencia del sistema de reducir movimiento.
   Neutraliza animaciones y transiciones CSS para personas con
   sensibilidad al movimiento (trastornos vestibulares). */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Números que no "bailan" al actualizarse (reloj, contadores, tiempos) */
#local-time,
.player-time,
.stat-val {
  font-variant-numeric: tabular-nums;
}

/* <select> nativos legibles en modo oscuro (fallback de baja especificidad) */
select {
  background-color: #0d0f17;
  color: #f8fafc;
}

select option {
  background-color: #0d0f17;
  color: #f8fafc;
}

.footer-stat-end {
  align-items: flex-end;
  text-align: right;
}

/* The profile card's gradient options (render.js, updateCardBackgroundLive):
   colors that move slowly, a border in the gradient's colors, and the name
   painted with them. */
#profile-card.card-gradient-animated {
  background-size: 220% 220%;
  animation: cardGradientShift 14s ease-in-out infinite alternate;
}

/* The gradient border is a ring drawn on top (::before), not a second
   background layer: a layer under the card's own background showed through
   it whenever the card was see-through, filling the card with the gradient
   and ignoring its opacity. The real border goes to 0 so the ring sits on
   the card's edge; the card keeps its own background, opacity and blur. */
#profile-card.card-gradient-border,
#profile-card.card-gradient-border:hover {
  border-width: 0;
}

#profile-card.card-gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: var(--card-border-width);
  border-radius: inherit;
  background: var(--card-border-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

@keyframes cardGradientShift {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #profile-card.card-gradient-animated {
    animation: none;
    background-size: auto;
  }
}

#profile-name.name-gradient:not(.effect-rainbow):not(.effect-fuzzy) {
  background: var(--name-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ajustes de brillo (public/brillo.js): the name's pulsing glow can be
   turned off (the rainbow and fuzzy effects keep their own animation), the
   social icons can glow in their color, and under reduced motion the name
   glows steadily instead of pulsing. */
#profile-name.name-no-glow:not(.effect-rainbow):not(.effect-fuzzy) {
  animation: none !important;
  filter: none !important;
}

body.socials-glow .social-btn svg {
  filter: drop-shadow(0 0 5px currentColor);
}

@media (prefers-reduced-motion: reduce) {
  #profile-name:not(.name-no-glow):not(.effect-rainbow):not(.effect-fuzzy) {
    animation: none !important;
    filter: drop-shadow(0 0 8px var(--accent-glow)) !important;
  }
}

/* "Intercambiar colores de las cajas" (render.js, applyBoxColors): the accent
   as the background of the boxes, with white or black text (whichever reads
   better on it). The Discord join button keeps its own colors. Every box of
   the bio carries the class caja-bio (profile.html, perfil-enlaces.js), so a
   new kind of box gets this and "Luz en el borde" without a list to update:
   the media embeds were once left out, see-through next to solid boxes. */
body.boxes-accent .caja-bio {
  background: var(--box-accent-bg);
  border-color: color-mix(in srgb, var(--box-accent-text) 18%, transparent);
  color: var(--box-accent-text);
}

/* The text and icons inside every box take the readable color; the status
   dot of the Discord server and the player's progress bar keep their own. */
body.boxes-accent .caja-bio :is(span, p, div, strong, svg, button):not(.status-dot, .progress-bar, .progress-container) {
  color: var(--box-accent-text) !important;
}

body.boxes-accent .presence-card .presence-username,
body.boxes-accent .presence-card .presence-activity-detail,
body.boxes-accent .discord-card .discord-member-count,
body.boxes-accent .music-player .player-time {
  opacity: 0.8;
}

body.boxes-accent .music-player .progress-container {
  background: color-mix(in srgb, var(--box-accent-text) 25%, transparent);
}

body.boxes-accent .music-player .progress-bar {
  background: var(--box-accent-text);
}

/* Visitor volume (player.js, config.showVolume). */
.player-volume-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.player-volume-row .player-nav-btn svg {
  width: 18px;
  height: 18px;
}

.player-volume {
  width: min(160px, 50%);
  accent-color: var(--accent-color);
  cursor: pointer;
}

body.boxes-accent .player-volume {
  accent-color: var(--box-accent-text);
}

body.boxes-accent .music-player #play-pause-btn {
  background: var(--box-accent-text);
  color: var(--box-accent-bg) !important;
  box-shadow: none;
}

body.boxes-accent .music-player #play-pause-btn svg {
  color: var(--box-accent-bg) !important;
}

/* Diseño (Apariencia → Diseño; body classes from layoutClasses() in
   config-schema.js, the same the SSR writes, functions/lib/perfil-diseno.js).
   Mostrar tarjeta off ("no-card"): the profile sits straight on the
   background, without the card's color, border, shadow, blur or tilt
   (effects.js skips the tilt; fondo-tarjeta.js measures the text on the page
   background). Por secciones ("layout-sections", 18-secciones.css) has no
   card either. */
body.no-card #profile-card,
body.no-card #profile-card:hover,
body.layout-sections #profile-card,
body.layout-sections #profile-card:hover {
  background: none;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
}

body.no-card #profile-card.card-gradient-border::before,
body.layout-sections #profile-card.card-gradient-border::before {
  display: none;
}

body.no-card #profile-card.card-gradient-animated,
body.layout-sections #profile-card.card-gradient-animated {
  animation: none;
}

/* Without the card the text sits on the background itself (an image, a
   video or the animated effect), which the contrast checks cannot measure:
   a soft shadow keeps the small text readable over light patches. Brillo
   general off (body.no-glow) removes it, as every other shadow. */
body.no-card #profile-bio,
body.no-card #profile-card .profile-location,
body.no-card #profile-card .card-footer,
body.layout-sections #profile-bio,
body.layout-sections #profile-card .profile-location,
body.layout-sections #profile-card .card-footer {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 10px rgba(0, 0, 0, 0.45);
}

/* Mostrar avatar off. */
body.no-avatar #profile-card .avatar-container {
  display: none;
}

/* Disposición: Horizontal. From 640 px: a big avatar on the left and the
   name, badges, bio and location on its right, the social icons lined up
   under that text. Narrower screens keep the one centered column. Every
   rule names #profile-card: render.js also sets these classes on the
   dashboard's own body, whose previews share some class names. */
@media (min-width: 640px) {
  body.layout-horizontal {
    --layout-avatar: 128px;
    --layout-gap: 24px;
  }

  body.layout-horizontal #profile-card {
    max-width: max(var(--card-max-width, 480px), 640px);
  }

  body.layout-horizontal #profile-card .profile-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--layout-gap);
    row-gap: 8px;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  body.layout-horizontal #profile-card .avatar-container {
    grid-row: 1 / span 3;
    width: var(--layout-avatar);
    height: var(--layout-avatar);
    margin: 0;
  }

  body.layout-horizontal #profile-card .name-container,
  body.layout-horizontal #profile-card .name-container.badges-inline {
    align-items: flex-start;
    justify-content: flex-start;
  }

  body.layout-horizontal #profile-card .name-row,
  body.layout-horizontal #profile-card .badges,
  body.layout-horizontal #profile-card .discord-badges,
  body.layout-horizontal #profile-card .profile-location {
    justify-content: flex-start;
  }

  body.layout-horizontal #profile-bio,
  body.layout-horizontal #profile-card .profile-location {
    max-width: none;
  }

  body.layout-horizontal #profile-card .socials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  body.layout-horizontal #profile-card .socials-grid .social-btn {
    width: 52px;
  }

  body.layout-horizontal:not(.no-avatar) #profile-card .socials-section {
    padding-left: calc(var(--layout-avatar) + var(--layout-gap));
  }

  body.layout-horizontal.no-avatar #profile-card .profile-header {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Apariencia → Redes y cajas → "Luz en el borde" (borderLight, body class
   border-light from bodyClasses()): a light, near white with an accent tail and a
   fading tail, runs around the border of each box (.caja-bio). Pure CSS: a conic
   gradient whose angle is animated through a registered property, shown only
   on a 2 px ring by the mask (the content box is cut out). Without
   @property support the light just stays still. Reduced motion and
   "Animaciones" off stop it (14-accesibilidad.css, 09-interruptores.css). */
@property --luz-angulo {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes luzBorde {
  to {
    --luz-angulo: 360deg;
  }
}

body.border-light .caja-bio {
  position: relative;
}

body.border-light .caja-bio::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  /* The head is near white: the box itself is often the accent color, where
     an accent-colored light would not show. */
  background: conic-gradient(
    from var(--luz-angulo),
    transparent 0deg 230deg,
    color-mix(in srgb, var(--border-light-color, var(--accent-color)) 60%, transparent) 300deg,
    color-mix(in srgb, var(--border-light-color, var(--accent-color)) 45%, white) 345deg,
    white 354deg,
    transparent 360deg
  );
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--border-light-color, var(--accent-color)) 50%, white));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  animation: luzBorde 4s linear infinite;
}

/* Each kind of box starts at another point, so they do not all turn in step. */
body.border-light .discord-card::after {
  animation-delay: -1s;
}

body.border-light .profile-custom-link-card::after {
  animation-delay: -2s;
}

body.border-light .profile-media-embed-card::after {
  animation-delay: -2.5s;
}

body.border-light .music-player::after {
  animation-delay: -3s;
}

@media (prefers-reduced-motion: reduce) {
  body.border-light .caja-bio::after {
    animation: none;
  }
}
/* Por secciones: full screens only with public/perfil-secciones.css. */
.bio-seccion {
  display: contents;
}

.bio-seccion-pista,
.bio-puntos,
.bio-seccion-cancion {
  display: none;
}
