/* ==========================================
   SCOUTLINK PREMIUM DESIGN SYSTEM
   ========================================== */

:root {
  color-scheme: dark;
  --bg-darker: #050608;
  --bg-dark: #0a0c10;
  --bg-card: rgba(14, 16, 23, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.02);
  --border-glass: rgba(255, 255, 255, 0.04);
  --border-glass-glow: rgba(0, 240, 118, 0.15);
  
  --primary: #00f076;         /* Verde césped deportivo HUD */
  --primary-glow: rgba(0, 240, 118, 0.35);
  --accent: #ff4700;          /* Naranja de fuego volcánico */
  --accent-glow: rgba(255, 71, 0, 0.35);
  
  --text-main: #f3f4f6;
  --text-muted: #858b99;
  --text-dark: #07090e;
  
  --sidebar-width: 320px;
  --navbar-height: 70px;
  
  --transition-smooth: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  --border-radius-lg: 14px;
  --border-radius-md: 8px;
  --border-radius-sm: 4px;
}

/* BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Grano Orgánico Texturizado Superior */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.04;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Capa de textura de rejilla táctica de campo de fútbol */
.app-container::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(0, 240, 118, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 118, 0.015) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 20px 20px;
  background-position: center;
  mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 50%, transparent 100%);
}

/* Orbe verde táctico de fondo */
body::before {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  width: 50vw;
  height: 50vh;
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, rgba(0, 240, 118, 0.04) 0%, transparent 70%);
  animation: orbFloat1 20s ease-in-out infinite alternate;
}

/* Orbe naranja táctico de fondo */
.app-container::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  width: 45vw;
  height: 45vh;
  bottom: -8%;
  right: -8%;
  background: radial-gradient(circle, rgba(255, 71, 0, 0.04) 0%, transparent 70%);
  animation: orbFloat2 24s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(4vw, 3vh) scale(1.08); }
  100% { transform: translate(2vw, -2vh) scale(0.95); }
}

@keyframes orbFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-3vw, -4vh) scale(1.06); }
  100% { transform: translate(2vw, -2vh) scale(0.92); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* NAVBAR */
.navbar {
  height: var(--navbar-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 1px 0 0 rgba(0,0,0,0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 12px; /* espacio mínimo entre los tres bloques */
}

/* Línea inferior de marca con degradado verde→naranja */
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 240, 118, 0.5) 25%,
    rgba(0, 240, 118, 0.3) 45%,
    rgba(255, 71, 0, 0.3) 65%,
    rgba(255, 71, 0, 0.5) 80%,
    transparent 100%
  );
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0; /* nunca se encoge: el logo siempre visible */
  min-width: 0;
}

.logo-svg {
  filter: drop-shadow(0 0 8px rgba(0, 240, 118, 0.3));
  transition: var(--transition-smooth);
}

.navbar-brand:hover .logo-svg {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 0 12px rgba(0, 240, 118, 0.6)) drop-shadow(0 0 12px rgba(255, 71, 0, 0.4));
}

.logo-path-d1 {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawStroke 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.logo-path-d2 {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawStroke 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

@keyframes drawStroke {
  to {
    stroke-dashoffset: 0;
  }
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
}

/* Ocultar el texto "Draftia" solo en móvil para liberar espacio horizontal */
.hide-logo-text-mobile {
  /* En desktop se muestra siempre */
  display: inline;
}

.logo-draftia {
  background: linear-gradient(135deg, #ffffff 25%, #00f076 70%, #ff4700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: 0.5px;
  filter: drop-shadow(0 0 12px rgba(0, 240, 118, 0.4));
}

.logo-play-arrow {
  transition: var(--transition-smooth);
}

.navbar-brand:hover .logo-play-arrow {
  transform: translateX(2px);
  filter: drop-shadow(0 0 6px rgba(0, 240, 118, 0.8));
}

.welcome-bg-text-draftia {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: loopDrawDraftia 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.navbar-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* El bloque de pestañas ocupa el espacio central de forma flexible sin sobreponerse */
  flex: 0 1 auto;
  justify-content: center;
  align-items: center;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.tab-text {
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  background: rgba(0, 240, 118, 0.08);
  border: 1px solid rgba(0, 240, 118, 0.3);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(0, 240, 118, 0.12);
}

/* La pestaña "Registrar Web" resalta en naranja */
.nav-tab.text-glow:not(.active) {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(255, 71, 0, 0.3);
}

.nav-tab.text-glow.active {
  background: rgba(255, 71, 0, 0.08);
  border: 1px solid rgba(255, 71, 0, 0.35);
  box-shadow: 0 0 12px rgba(255, 71, 0, 0.15);
  color: var(--accent);
}

/* ACCIONES NAVBAR (carpetas + auth): grupo pill elegante */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 4px 6px;
  flex-shrink: 0; /* nunca se encoge: siempre visible */
  min-width: 0;
}

/* Divisor vertical entre botones */
.navbar-actions-divider {
  width: 1px;
  height: 20px;
  background: var(--border-glass);
  flex-shrink: 0;
}

.btn-watchlist-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-watchlist-toggle:hover {
  background: rgba(0, 240, 118, 0.08);
  color: var(--primary);
  box-shadow: none;
}

/* DROPDOWN DE PERFIL */
#user-nav-block-mobile {
  display: none;
}

.profile-dropdown-container {
  position: relative;
  display: inline-block;
}

.btn-profile-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-profile-trigger.logged-in {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(0, 240, 118, 0.2);
}

.btn-profile-trigger.guest:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-profile-trigger.logged-in:hover {
  background: rgba(0, 240, 118, 0.08);
}

.btn-profile-trigger .arrow-icon {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.profile-dropdown-container.active .arrow-icon {
  transform: rotate(180deg);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(16, 16, 20, 0.98);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1010;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.profile-dropdown-container.active .profile-dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.profile-dropdown-menu.align-left {
  right: auto !important;
  left: 0 !important;
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 4px;
}

.dropdown-user-info i {
  color: var(--primary);
  font-size: 14px;
}

.dropdown-user-info .username {
  font-weight: 700;
  color: var(--primary);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.dropdown-item.login:hover {
  background: rgba(0, 240, 118, 0.08);
  color: var(--primary);
}

.dropdown-item.logout {
  color: rgba(239, 68, 68, 0.8);
}

.dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* APP CONTAINER */
.app-container {
  margin-top: var(--navbar-height);
  padding: 30px 40px;
  min-height: calc(100vh - var(--navbar-height));
  width: 100%;
}

/* TAB CONTENT */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SECCIÓN 1: BUSCADOR (LAYOUT) */
.search-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 30px;
  align-items: start;
}

/* FILTER SIDEBAR */
.filters-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 0;
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
  max-height: calc(100vh - var(--navbar-height) - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 12px 24px;
  position: relative;
  flex-shrink: 0;
}

/* Línea divisoria con el degradado marca */
.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(0, 240, 118, 0.4) 0%,
    rgba(255, 71, 0, 0.25) 100%
  );
}

.filters-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 24px 24px 24px;
}

/* ACTIVE FILTERS BADGES */
.filter-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.filter-badge i {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  transition: var(--transition-smooth);
}

.filter-badge i:hover {
  color: var(--accent);
}

.sidebar-header h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text-only {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-text-only:hover {
  filter: brightness(1.2);
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* INPUTS Y SELECTS */
.input-with-icon {
  position: relative;
  width: 100%;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.input-with-icon input {
  padding-left: 40px !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

select {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300ff88' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px 40px 12px 14px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

select:hover {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.05);
}

select option {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 12px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(0, 240, 118, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.range-double-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-double-inputs input {
  text-align: center;
}

.range-double-inputs span {
  color: var(--text-muted);
  font-size: 13px;
}

.filter-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.range-display {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

/* CUSTOM SLIDER */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
  margin-top: 8px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-glow);
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* TOGGLE / SWITCH */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  margin-bottom: 0 !important;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border-glass);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--primary-glow);
  border-color: var(--primary);
}

input:checked + .switch-slider:before {
  transform: translateX(22px);
  background-color: var(--primary);
}

.toggle-label {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-color {
  color: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary-glow));
}

/* RESULTS AREA */
.results-area {
  width: 100%;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 14px;
  position: relative;
}

/* Línea de sección con el degradado marca */
.results-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    var(--primary) 0%,
    var(--accent) 100%
  );
  opacity: 0.7;
}

.results-header h2 {
  font-size: 22px;
}

.view-modes .legend {
  font-size: 13px;
  color: var(--text-muted);
}

/* PLAYERS GRID */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 25px;
}

.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  color: var(--text-muted);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading-state i {
  font-size: 32px;
  color: var(--primary);
}

.empty-state i {
  font-size: 44px;
  color: var(--text-muted);
}

/* PLAYER CARD */
.player-card {
  background: rgba(10, 12, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px 4px 18px 18px; /* Esquina asimétrica táctica HUD */
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 480px;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 240, 118, 0.35) 0%, transparent 40%, transparent 60%, rgba(255, 71, 0, 0.35) 100%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0.2;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.player-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(14, 17, 26, 0.98);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.65),
    0 0 1px 1px rgba(0, 240, 118, 0.2);
}

.player-card:hover::before {
  opacity: 0.85;
}

/* CARD HEADER */
.card-header {
  padding: 20px 20px 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.card-title-group {
  flex: 1;
  min-width: 0; /* Permite que el contenedor se encoja para truncar el texto */
}

.card-title-group h3 {
  font-size: 18px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 2px;
}

.card-club {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.disciplinary-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-disciplinary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  line-height: 1;
}

.card-disciplinary.yellow-card i {
  color: #ffd700;
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

.card-disciplinary.red-card i {
  color: #ff4d4d;
  filter: drop-shadow(0 0 3px rgba(255, 77, 77, 0.5));
}


.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0; /* Evita que los distintivos se encojan */
}

.badge-position {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* BADGE COLOURS */
.player-card[data-position="Delantero"] .badge-position,
.player-card[data-position="Extremo"] .badge-position,
.player-card[data-position="Extremo Izquierdo"] .badge-position,
.player-card[data-position="Extremo Derecho"] .badge-position {
  border-color: rgba(255, 71, 0, 0.4);
  color: var(--accent);
}
.player-card[data-position="Centrocampista"] .badge-position,
.player-card[data-position="Mediapunta"] .badge-position,
.player-card[data-position="Mediocentro Defensivo"] .badge-position,
.player-card[data-position="Mediocentro Ofensivo"] .badge-position,
.player-card[data-position="Pivote"] .badge-position {
  border-color: rgba(0, 240, 118, 0.4);
  color: var(--primary);
}

.badge-verified {
  color: var(--primary);
  font-size: 14px;
  filter: drop-shadow(0 0 4px var(--primary-glow));
}

/* CARD CHART AREA */
.card-chart-area {
  height: 180px;
  position: relative;
  margin: 10px 20px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius-md);
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-chart-area canvas {
  max-height: 100% !important;
  max-width: 100% !important;
}

/* CARD STATS */
.card-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 20px;
}

.card-stat-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 10px 4px;
  text-align: center;
  transition: all 0.3s ease;
}

.card-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.card-stat-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* En hover, el primer stat box (goles) destaca en naranja */
.player-card:hover .card-stat-box:first-child {
  border-color: rgba(255, 71, 0, 0.3);
  background: rgba(255, 71, 0, 0.06);
}
.player-card:hover .card-stat-box:first-child .card-stat-num {
  color: var(--accent);
}

.player-card:hover .card-stat-box {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

/* CARD TAGS */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
  flex-grow: 1;
  align-content: flex-start;
}

.style-tag {
  background: rgba(0, 240, 118, 0.03);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--primary);
  border: 1px solid rgba(0, 240, 118, 0.12);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.player-card:hover .style-tag {
  border-color: rgba(0, 240, 118, 0.35);
  color: #fff;
  background: rgba(0, 240, 118, 0.08);
  box-shadow: 0 0 8px rgba(0, 240, 118, 0.1);
}

/* CARD ACTIONS */
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 15px 20px 20px 20px;
  border-top: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.08);
}

.btn-card-link {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 10px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-card-link:hover {
  background: var(--text-main);
  color: var(--bg-darker);
  border-color: var(--text-main);
}

.btn-card-action {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-card-action:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-card-action.active-compare {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-darker);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* SECCIÓN 2: COMPARADOR (COMPARE PANEL) */
.compare-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.btn-clear-compare {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 10px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-clear-compare:hover {
  background: #ef4444;
  color: white;
}

.compare-empty-state {
  text-align: center;
  padding: 100px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.compare-empty-state i {
  font-size: 64px;
  color: var(--border-glass);
}

.compare-empty-state h3 {
  font-size: 22px;
  color: var(--text-main);
}

.compare-empty-state button {
  margin-top: 10px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 30px;
  align-items: start;
}

.compare-chart-card, .compare-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.compare-chart-card h3, .compare-table-card h3 {
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
}

.compare-chart-wrapper {
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* COMPARE TABLE */
.table-responsive {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.compare-table th, .compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 14px;
}

.compare-table th {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
}

.compare-table th:first-child, .compare-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.1);
  border-right: 1px solid var(--border-glass);
}

.compare-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.compare-player-header {
  text-align: center;
}

.compare-player-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  display: block;
}

.compare-player-pos {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* SECCIÓN 3: REGISTRO (EXTRACTOR / SCRAPER) */
.register-container {
  max-width: 1100px;
  margin: 0 auto;
}

.header-banner {
  padding: 30px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, rgba(0, 240, 118, 0.05) 0%, rgba(255, 71, 0, 0.02) 100%);
  border-color: rgba(0, 240, 118, 0.15) !important;
}

.header-banner h2 {
  font-size: 26px;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-banner p {
  color: var(--text-muted);
  font-size: 15px;
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.register-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.register-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.register-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 15px;
}

/* MOCK HELPER BADGES */
.mock-urls-helper {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border-glass);
  padding: 14px;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
  font-size: 12px;
}

.mock-urls-helper strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.mock-url-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: 50px;
  margin-right: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mock-url-badge:hover {
  background: rgba(0, 240, 118, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* SCRAPE FLOW BUTTON */
.scrape-form-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 15px;
  margin-bottom: 20px;
}

.btn-accent {
  background: var(--accent);
  border: none;
  color: white;
  padding: 12px 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: var(--transition-smooth);
}

.btn-accent:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(255, 71, 0, 0.6);
}

/* CRAWLER CONSOLE */
.scraper-console {
  background: #000;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: expandHeight 0.4s ease-out;
}

@keyframes expandHeight {
  from { max-height: 0; }
  to { max-height: 300px; }
}

.console-header {
  background: #111;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

.console-spinner {
  margin-left: auto;
  font-size: 14px;
  color: var(--primary);
}

.console-body {
  height: 180px;
  padding: 15px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  color: #39ff14; /* Verde terminal */
  line-height: 1.8;
}

.console-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
}

.console-line.err {
  color: #ef4444;
}

.console-line.success {
  color: var(--primary);
}

/* LASER SCANNING ANIMATION */
.scraper-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 8px var(--primary);
  animation: laserScan 2s infinite linear;
  display: none;
}

@keyframes laserScan {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

/* FORM STEP (STEP 2) */
.disabled-step {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.5);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
}

.step-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.step-badge.ready {
  background: rgba(255, 71, 0, 0.12);
  color: var(--accent);
  border-color: rgba(255, 71, 0, 0.4);
  box-shadow: 0 0 8px rgba(255, 71, 0, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.form-section-title {
  font-size: 15px;
  margin-bottom: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Los iconos de sección del formulario en naranja */
.form-section-title i {
  color: var(--accent);
  filter: drop-shadow(0 0 5px rgba(255, 71, 0, 0.3));
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.stats-subgrid {
  grid-template-columns: 1fr 1fr 1.2fr;
}

.form-control {
  margin-bottom: 15px;
}

.form-control label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  border-top: 1px solid var(--border-glass);
  padding-top: 20px;
  flex-wrap: wrap;
}

/* Botón de auth en la navbar: encaja en el grupo pill, verde cuando no hay sesión */
.btn-navbar-auth-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 7px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-navbar-auth-btn:hover {
  background: rgba(0, 240, 118, 0.1);
  box-shadow: none;
}

/* BUTTONS */
.btn-primary {
  background: var(--primary);
  border: none;
  color: var(--bg-darker);
  padding: 12px 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(0, 240, 118, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* SLIDING DETAIL SIDEBAR & WATCHLIST PANEL */
.detail-sidebar, .watchlist-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1100;
  visibility: hidden;
  transition: visibility 0.4s;
}

.detail-sidebar.active, .watchlist-sidebar.active {
  visibility: visible;
}

.detail-sidebar-overlay, .watchlist-sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 1;
}

.detail-sidebar.active .detail-sidebar-overlay,
.watchlist-sidebar.active .watchlist-sidebar-overlay {
  opacity: 1;
}

.detail-sidebar-content, .watchlist-sidebar-content {
  position: absolute;
  top: 0;
  right: -500px;
  width: 480px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-glass);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  padding: 30px;
  overflow-y: auto;
  transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 2;
}

.detail-sidebar.active .detail-sidebar-content,
.watchlist-sidebar.active .watchlist-sidebar-content {
  right: 0;
}

/* CLOSING BUTTONS */
.btn-close-sidebar, .btn-close-watchlist {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.btn-close-sidebar:hover, .btn-close-watchlist:hover {
  color: white;
}

/* DETAIL PANEL DETAILS */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.detail-badge-verified {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-player-hero {
  text-align: center;
  margin-bottom: 30px;
}

.detail-player-name {
  font-size: 24px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.detail-player-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.detail-radar-chart-container {
  height: 250px;
  margin-bottom: 30px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.detail-stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 14px 10px;
  text-align: center;
  border-radius: var(--border-radius-md);
}

.detail-stat-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}

.detail-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.detail-info-list {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 30px;
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-glass);
  font-size: 13px;
}

.detail-info-row:last-child {
  border-bottom: none;
}

.detail-info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-info-val {
  color: var(--text-main);
  font-weight: 700;
}

.detail-style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 35px;
}

.detail-style-tag {
  background: rgba(0, 240, 118, 0.08);
  border: 1px solid var(--border-glass-glow);
  color: var(--primary);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: 600;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.btn-large-link {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  font-size: 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-large-link:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(255, 71, 0, 0.6);
}

.btn-large-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-large-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* WATCHLIST PANEL */
.watchlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.watchlist-create-row {
  display: grid;
  grid-template-columns: 1fr 50px;
  gap: 10px;
  margin-bottom: 30px;
}

.watchlist-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.watchlist-folder {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 18px;
}

.watchlist-folder-title {
  font-size: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.watchlist-folder-title i {
  color: var(--primary);
}

.watchlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.watchlist-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.watchlist-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.watchlist-item-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.watchlist-item-pos {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 6px;
  text-transform: uppercase;
}

.btn-watchlist-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.btn-watchlist-action:hover {
  color: #ef4444;
}

.watchlist-item-notes {
  font-size: 11px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-glass);
  padding: 8px;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  outline: none;
  resize: vertical;
}

.watchlist-item-notes:focus {
  border-color: var(--primary);
  color: var(--text-main);
}

.watchlist-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50000 !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

/* Lower sidebars z-index when a modal is active to prevent mobile stacking overlap bugs */
body.modal-open .detail-sidebar,
body.modal-open .watchlist-sidebar,
body.modal-open .filters-sidebar,
body:has(.modal.active) .detail-sidebar,
body:has(.modal.active) .watchlist-sidebar,
body:has(.modal.active) .filters-sidebar {
  z-index: 100 !important;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  width: 500px;
  max-width: 90%;
  padding: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.btn-modal-close:hover {
  color: white;
}

.modal-body {
  margin-bottom: 24px;
}

.modal-body p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.modal-body textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  border-right: 1px solid var(--border-glass);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 15px 20px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-main);
  animation: slideInLeft 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  min-width: 300px;
  max-width: 400px;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast-icon {
  font-size: 18px;
  color: var(--primary);
}

.toast.error .toast-icon {
  color: #ef4444;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.9); }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1220px) {
  .search-layout {
    grid-template-columns: 1fr;
  }
  
  .filters-sidebar {
    position: static;
  }
  
  .compare-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Ocultar texto del logo para mostrar solo iniciales mM */
  .hide-logo-text-mobile {
    display: none !important;
  }

  /* Ocultar partes del texto de las pestañas para simplificar */
  .hide-mobile {
    display: none !important;
  }

  /* Ocultar texto en los botones de acciones de la barra superior */
  .hide-on-mobile {
    display: none !important;
  }

  /* Ocultar el divisor en tabletas/móviles para que no ocupen espacio */
  .navbar-actions-divider {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  
  /* NAVBAR ADAPTADO A MÓVIL (ESTILO APP NATIVA) */
  .navbar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 60px !important;
    padding: 0 12px !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    border-bottom: 1px solid var(--border-glass) !important;
    box-sizing: border-box !important;
  }

  .navbar-brand {
    flex-shrink: 0 !important;
  }

  /* En móvil las tabs van al bottom bar, el top bar es brand + actions */
  .navbar-tabs {
    /* Sigue siendo position:fixed al bottom, pero se anula el flex del desktop */
    flex: none !important;
    min-width: unset !important;
    overflow: visible !important;
  }
  
  .navbar-brand .logo-text {
    font-size: 17px;
  }

  .navbar-brand svg {
    width: 28px;
    height: 28px;
  }

  /* Ocultar texto del logo en móvil para liberar espacio al pill de acciones */
  .hide-logo-text-mobile {
    display: none !important;
  }

  /* En móviles, la píldora externa se vuelve transparente y sin bordes */
  .navbar-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    min-width: unset !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1001 !important;
  }

  /* Ocultar texto en móvil, solo iconos */
  .hide-on-mobile {
    display: none !important;
  }

  /* El botón de perfil se convierte en un círculo táctil elegante en móviles */
  .btn-profile-trigger {
    padding: 0 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-glass) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
  }

  .btn-profile-trigger.logged-in {
    color: var(--primary) !important;
    background: rgba(0, 240, 118, 0.06) !important;
    border-color: rgba(0, 240, 118, 0.2) !important;
  }

  .btn-profile-trigger:hover,
  .btn-profile-trigger:active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
  }

  .btn-profile-trigger.logged-in:hover,
  .btn-profile-trigger.logged-in:active {
    background: rgba(0, 240, 118, 0.12) !important;
  }

  .btn-profile-trigger i {
    font-size: 18px !important;
  }

  /* Ocultar botones de la barra superior en móvil para ahorrar espacio */
  .btn-watchlist-toggle,
  .navbar-actions-divider,
  #user-nav-block {
    display: none !important;
  }

  /* Contenedor del perfil en móvil */
  #user-nav-block-mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    height: 100% !important;
    margin-right: 24px !important;
  }

  #user-nav-block-mobile .profile-dropdown-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    position: relative;
  }

  /* Botón trigger del perfil en el menú de pestañas inferior */
  #btn-profile-trigger-mobile {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    gap: 4px;
    transition: var(--transition-smooth);
    padding: 0;
    width: 100%;
    height: 100%;
  }

  #btn-profile-trigger-mobile:active,
  #btn-profile-trigger-mobile.active,
  #profile-dropdown-container-mobile.active #btn-profile-trigger-mobile {
    color: var(--primary) !important;
  }
  
  #btn-profile-trigger-mobile i {
    font-size: 16px;
  }

  /* ── MENÚ DE PERFIL MÓVIL (hijo directo de body) ── */
  #mobile-profile-menu {
    display: none;
    position: fixed;
    bottom: 70px;
    right: 16px;
    background: rgba(16, 16, 20, 0.98);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 8px;
    width: 200px;
    z-index: 100000;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  #mobile-profile-menu.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }
  
  /* Pestañas principales movidas al bottom (Estilo Instagram / Twitter) */
  .navbar-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 62px;
    background: rgba(8, 8, 10, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    border-bottom: none;
    border-radius: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    overflow: visible !important;
  }
  
  .nav-tab {
    flex: 1;
    height: 100%;
    border-radius: 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    padding: 6px 0;
    color: var(--text-muted);
    background: transparent !important;
    box-shadow: none !important;
  }
  
  .nav-tab i {
    font-size: 16px;
  }
  
  .nav-tab.active {
    color: var(--primary);
  }

  .nav-tab.active i {
    filter: drop-shadow(0 0 6px var(--primary-glow));
  }
  
  /* CONTENEDOR PRINCIPAL AJUSTADO */
  .app-container {
    margin-top: 60px !important;
    margin-bottom: 70px !important;
    padding: 20px 16px !important;
  }
  
  /* DIALOGO DE DETALLE Y WATCHLIST FULL WIDTH */
  .detail-sidebar, .watchlist-sidebar {
    z-index: 12000 !important;
  }
  .detail-sidebar-content, .watchlist-sidebar-content {
    width: 100% !important;
    padding: 20px 20px 100px 20px !important;
    z-index: 12002 !important;
  }
  .detail-sidebar-overlay, .watchlist-sidebar-overlay {
    z-index: 12001 !important;
  }
  
  /* FILTROS CONVERTIDOS EN CAJÓN SLIDE-IN EN MÓVIL */
  body.filters-open {
    overflow: hidden !important;
  }

  .filters-sidebar .sidebar-header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin: 0;
    padding: 24px 24px 12px 24px;
    border-bottom: 1px solid var(--border-glass);
  }

  .filters-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 12px 24px 30px 24px !important;
  }

  #btn-toggle-filters {
    display: flex !important;
    background: linear-gradient(135deg, rgba(0, 240, 118, 0.16) 0%, rgba(0, 240, 118, 0.04) 100%) !important;
    border: 1px solid rgba(0, 240, 118, 0.4) !important;
    color: var(--primary) !important;
    padding: 12px 20px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(0, 240, 118, 0.15) !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
  }

  #btn-toggle-filters:active {
    background: rgba(0, 240, 118, 0.25) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 20px rgba(0, 240, 118, 0.3) !important;
  }

  #btn-close-filters-panel {
    display: block !important;
  }

  .filters-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 62px !important;
    left: -100vw; /* Escondido por defecto */
    width: 100vw;
    height: auto !important;
    z-index: 9999 !important;
    background: rgba(14, 16, 23, 0.95); /* Fondo medio transparente */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: none;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
    transition: left 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
  }

  .filters-sidebar.active {
    left: 0 !important; /* Muestra el cajón */
  }

  /* REJILLA DE JUGADORES */
  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
  }
  
  /* FORMULARIO DE REGISTRO EN MÓVIL */
  .scrape-form-row {
    grid-template-columns: 1fr !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .stats-subgrid {
    grid-template-columns: 1fr 1fr !important;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .form-actions > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .register-notice-info {
    max-width: 100% !important;
  }

  .honesty-warning {
    flex-direction: column;
    gap: 10px;
  }

  .register-card {
    padding: 16px !important;
  }

  .form-section-title {
    font-size: 14px;
  }

  .header-banner {
    padding: 20px !important;
  }

  .header-banner h2 {
    font-size: 20px !important;
  }

  /* COMPARADOR EN MÓVIL */
  .compare-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .compare-chart-card {
    padding: 16px;
  }

  .compare-chart-wrapper {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .players-grid {
    grid-template-columns: 1fr !important;
  }
  
  .player-card {
    height: auto !important;
    min-height: 460px;
  }
  
  .welcome-title {
    font-size: 38px;
  }
  
  .welcome-username {
    font-size: 26px;
  }
}

/* ==========================================
   ADMIN PANEL & MODERATION STYLING
   ========================================== */

.register-notice-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 240, 118, 0.05);
  border: 1px solid rgba(0, 240, 118, 0.15);
  padding: 10px 15px;
  border-radius: var(--border-radius-md);
  font-size: 12px;
  color: var(--primary);
  margin-right: auto;
  max-width: 500px;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* LOGIN BOX */
.login-box {
  max-width: 480px;
  margin: 80px auto;
  text-align: center;
  padding: 40px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.login-icon-big {
  font-size: 54px;
  color: var(--accent);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.login-box h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.login-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 30px;
}

.login-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.login-form-row input {
  font-size: 15px;
  text-align: center;
}

.login-hint {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

.login-hint code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
}

/* ADMIN PANEL VIEW */
.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 20px;
}

.admin-panel-header h2 {
  font-size: 24px;
  color: var(--text-main);
}

.admin-panel-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* SUMMARY CARDS */
.admin-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.admin-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-summary-card.pending-card {
  border-left: 4px solid var(--accent);
}

.admin-summary-card.approved-card {
  border-left: 4px solid var(--primary);
}

.admin-summary-card .card-icon {
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.pending-card .card-icon {
  background: rgba(255, 71, 0, 0.1);
  color: var(--accent);
}

.approved-card .card-icon {
  background: rgba(0, 240, 118, 0.1);
  color: var(--primary);
}

.admin-summary-card .card-info {
  display: flex;
  flex-direction: column;
}

.admin-summary-card .num {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.admin-summary-card .lbl {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 600;
}

/* ADMIN TABLES */
.admin-sections-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.admin-list-section {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
}

.section-title-row h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-count-badge {
  background: rgba(255, 71, 0, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
}

.status-count-badge.approved {
  background: rgba(0, 240, 118, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, .admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 13px;
  vertical-align: middle;
}

.admin-table th {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
}

.admin-table td a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-table td a:hover {
  text-decoration: underline;
}

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.admin-actions-cell {
  display: flex;
  gap: 8px;
}

.btn-admin-action {
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-admin-action.approve-btn {
  background: rgba(0, 240, 118, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-admin-action.approve-btn:hover {
  background: var(--primary);
  color: var(--bg-darker);
}

.btn-admin-action.delete-btn {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-admin-action.delete-btn:hover {
  background: #ef4444;
  color: white;
}

.btn-admin-action.edit-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.btn-admin-action.verify-toggle-btn {
  background: rgba(255, 255, 255, 0.02);
}

.btn-admin-action.verify-toggle-btn.verified {
  background: rgba(0, 240, 118, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

.text-glow-orange {
  color: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.text-glow-green {
  color: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary-glow));
}

/* MODAL LARGE EDIT STYLING */
.modal-content-large {
  width: 780px !important;
  max-width: 95% !important;
}

.modal-body-scroll {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 10px;
  margin-bottom: 20px;
}

.form-grid-modal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.full-width-modal {
  grid-column: 1 / -1;
}

/* SCROLLBAR PERSONALIZADO */
.modal-body-scroll::-webkit-scrollbar,
.console-body::-webkit-scrollbar,
.filters-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-track,
.console-body::-webkit-scrollbar-track,
.filters-scroll-area::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
}

.modal-body-scroll::-webkit-scrollbar-thumb,
.console-body::-webkit-scrollbar-thumb,
.filters-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover,
.console-body::-webkit-scrollbar-thumb:hover,
.filters-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* AUTH MODAL TABS STYLE */
.auth-tabs .nav-tab {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  flex: 1;
}
.auth-tabs .nav-tab.active {
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* PANTALLA DE BIENVENIDA OVERLAY */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 8, 10, 0.7); /* Transparente para que se vea la web de fondo */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-overlay.active {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.welcome-content {
  position: relative;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 500px;
  min-height: 450px;
  padding: 60px;
}

.welcome-overlay.active .welcome-content {
  transform: scale(1);
}

.welcome-logo-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1300px, 98vw);
  height: auto;
  margin: 0;
  z-index: 1;
  opacity: 0.12;
  pointer-events: none;
  transition: all 0.5s ease;
}

.welcome-logo {
  width: 100%;
  height: 100%;
}

.welcome-overlay.active .welcome-logo {
  animation: welcomeLogoPulse 3s ease-in-out infinite alternate;
}

.welcome-overlay.active .welcome-bg-text-draftia {
  animation: drawWelcomeDraftia 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawWelcomeDraftia {
  0% {
    stroke-dashoffset: 600;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes welcomeLogoPulse {
  0% {
    transform: scale(0.95);
    filter: drop-shadow(0 0 25px rgba(0, 240, 118, 0.3)) drop-shadow(0 0 25px rgba(255, 71, 0, 0.15));
  }
  100% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 45px rgba(0, 240, 118, 0.6)) drop-shadow(0 0 45px rgba(255, 71, 0, 0.4));
  }
}

.welcome-title {
  position: relative;
  z-index: 2; /* Encima del logo */
  font-family: 'Outfit', sans-serif;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  animation: welcomeFadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.welcome-username {
  position: relative;
  z-index: 2; /* Encima del logo */
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow), 0 4px 15px rgba(0, 0, 0, 0.8);
  animation: welcomeFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes welcomeFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes welcomeFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ESTILOS DE ETIQUETAS DE ESTILO VISUALES (PILLS) */
.style-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.style-tag-pill {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  user-select: none;
}

.style-tag-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.style-tag-pill.active {
  background: rgba(0, 240, 118, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(0, 240, 118, 0.15);
}

/* NUBE DE ETIQUETAS EN FILTROS */
.filter-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 8px;
}

.filter-tags-cloud::-webkit-scrollbar {
  width: 4px;
}

.filter-tags-cloud::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.filter-tags-cloud::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.filter-tags-cloud::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.custom-tag-adder input {
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  font-size: 13px;
}

.custom-tag-adder button {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DOCK DE PREFERENCIAS DE SESIÓN Y ALMACENAMIENTO */
.app-alert-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: 90%;
  max-width: 680px;
  background: rgba(13, 13, 17, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-glow);
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 118, 0.04);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
}

.app-alert-dock.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.dock-info-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
}

.dock-info-content i {
  color: var(--primary);
  font-size: 18px;
  filter: drop-shadow(0 0 4px var(--primary-glow));
}

.dock-btn-group {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-dock-ok {
  background: var(--primary);
  border: none;
  color: #000;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dock-ok:hover {
  background: #00e074;
  box-shadow: 0 0 10px rgba(0, 240, 118, 0.3);
}

.btn-dock-no {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dock-no:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

/* Ajustes de responsive para evitar tapar el bottom navigation bar de móvil */
@media (max-width: 768px) {
  .app-alert-dock {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    bottom: 80px;
    width: 95%;
  }
  .dock-btn-group {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================
   HERO PORTADA / LANDING SECTION
   ========================================== */
.hero-section {
  position: relative;
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 40px;
  overflow: hidden;
  z-index: 1;
  /*
    Fondo visible propio del hero: no depende de los orbes del body.
    Gradiente radial desde azul-verde oscuro en el centro hasta casi-negro en los bordes.
  */
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%,
      rgba(0, 35, 25, 0.95) 0%,
      rgba(5, 15, 30, 0.92) 45%,
      rgba(9, 9, 16, 1) 100%
    );
}

/* Cuadrícula decorativa + orbes propios del hero, independientes del body */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Cuadrícula verde muy sutil */
  background-image:
    linear-gradient(rgba(0, 240, 118, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 118, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* Orbe verde en la parte superior del hero (propio, no depende del body::before) */
.hero-section::after {
  content: '';
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0, 240, 118, 0.12) 0%,
    rgba(0, 180, 90, 0.04) 50%,
    transparent 75%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: heroOrbPulse 6s ease-in-out infinite alternate;
}

@keyframes heroOrbPulse {
  0%   { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1;   transform: translateX(-50%) scale(1.15); }
}

/* ── LOGO mM DE FONDO EN EL HERO ── */
.hero-bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 94vw);
  height: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: heroLogoFadeIn 0.8s ease-out 0.3s forwards;
}

@keyframes heroLogoFadeIn {
  to { opacity: 1; }
}

.hero-bg-svg {
  width: 100%;
  height: auto;
  max-height: 200px;
  overflow: visible;
}

/* Animación del texto completo "Draftia" de fondo: trazo en bucle y reversa */
.hero-bg-text-draftia {
  stroke-dasharray: 650;
  stroke-dashoffset: 650;
  --bg-op: 0.11;
  opacity: var(--bg-op);
  animation:
    loopDrawDraftia 9s cubic-bezier(0.4, 0, 0.2, 1) infinite,
    heroBgBreathe 4s ease-in-out infinite alternate;
}

@keyframes loopDrawDraftia {
  0%, 5% {
    stroke-dashoffset: 650;
  }
  40%, 60% {
    stroke-dashoffset: 0;
  }
  95%, 100% {
    stroke-dashoffset: 650;
  }
}

@keyframes heroBgBreathe {
  0%   { opacity: var(--bg-op, 0.13); }
  100% { opacity: calc(var(--bg-op, 0.13) * 1.7); }
}

/* Asegurar que los elementos del hero están por encima */
.hero-section > *:not(.hero-bg-logo):not(.hero-scroll-hint) {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 71, 0, 0.1);
  border: 1px solid rgba(255, 71, 0, 0.25);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
  animation: heroBadgePulse 3s ease-in-out infinite;
}

@keyframes heroBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 0, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(255, 71, 0, 0.06); }
}

/* Todos los hijos directos del hero por encima del fondo */
.hero-section > *:not(.hero-bg-logo):not(.hero-scroll-hint) {
  position: relative;
  z-index: 1;
}

.hero-badge i {
  color: var(--accent);
  font-size: 10px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text-main);
}

/* "Draftia" en gradiente de marca */
.hero-title .brand-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #00c060 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #00d97a 100%);
  border: 1px solid rgba(0, 240, 118, 0.4);
  color: #050608;
  padding: 16px 36px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px; /* Cambiado de 50px a 8px */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 240, 118, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-hero-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 240, 118, 0.4), 0 0 15px rgba(0, 240, 118, 0.2);
}

.btn-hero-secondary {
  background: rgba(255, 71, 0, 0.02);
  border: 1px solid rgba(255, 71, 0, 0.35);
  color: #ff601c;
  padding: 16px 36px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px; /* Cambiado de 50px a 8px */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  backdrop-filter: blur(5px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 71, 0, 0.08);
  border-color: #ff7830;
  color: #ff7830;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 71, 0, 0.15), 0 0 10px rgba(255, 71, 0, 0.1);
}

/* Estadísticas animadas debajo de los CTAs */
.hero-stats-row {
  display: flex;
  gap: 50px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Scroll indicator pulsante */
.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: scrollHintBounce 2s ease-in-out infinite;
  cursor: pointer;
}

.hero-scroll-hint i {
  font-size: 18px;
  color: var(--accent);
}

@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ==========================================
   AVISO DE HONESTIDAD EN EL FORMULARIO
   ========================================== */
.honesty-warning {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255, 71, 0, 0.07) 0%, rgba(255, 71, 0, 0.03) 100%);
  border: 1px solid rgba(255, 71, 0, 0.3);
  border-left: 3px solid var(--accent);
  border-radius: var(--border-radius-md);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.honesty-warning i {
  color: var(--accent);
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 71, 0, 0.35));
}

.honesty-warning-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.honesty-warning-text strong {
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
  font-size: 13.5px;
}

/* Responsive móvil del hero */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 20px;
    min-height: calc(100vh - var(--navbar-height) - 60px);
  }
  .hero-stats-row {
    gap: 30px;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-hero-primary,
  .btn-hero-secondary {
    justify-content: center;
    padding: 14px 24px;
  }
}

/* ==========================================
   CYBER HUD CORNER MARKERS (PLAYER CARDS)
   ========================================== */
.hud-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 5;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hud-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.hud-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.hud-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.hud-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.player-card:hover .hud-corner {
  border-color: var(--primary);
  transform: scale(1.1);
}
.player-card:hover .hud-corner.tr, .player-card:hover .hud-corner.bl {
  border-color: var(--accent);
}

/* HELP BUTTON AND HELP MODAL */
.btn-help-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  padding: 6px;
  border-radius: 50%;
}

.btn-help-icon:hover {
  color: var(--primary);
  background: rgba(0, 240, 118, 0.08);
  box-shadow: 0 0 10px rgba(0, 240, 118, 0.2);
}

.help-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .help-sections-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.help-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.help-section-card h4 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.help-section-card ul {
  padding-left: 16px;
  font-size: 13px;
  color: var(--text-main);
}

.help-section-card li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.help-section-card li strong {
  color: #ffffff;
}
