/* Fuentes auto-hospedadas — eliminan la dependencia de Google Fonts y funcionan offline */

/* Outfit (variable font — cubre todos los pesos con un solo archivo) */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit-latin.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;
}

/* Inter */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/inter-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-700.woff2') format('woff2');
}

:root {
  --bg-color: #0f1115;
  --bg-color-deep: #090a0d;
  --card-bg: rgba(26, 29, 36, 0.75);
  --card-border: 1px solid rgba(40, 45, 55, 0.6);
  --neon-green: #9eff00;
  --neon-green-solid: #8aff00;
  --neon-green-glow: rgba(158, 255, 0, 0.25);
  --red-alert: #ff4d4d;
  --red-alert-bg: rgba(255, 77, 77, 0.15);
  --green-success: #4caf50;
  --green-success-bg: rgba(76, 175, 80, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #8a92a6;
  --text-muted: #5e6471;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Cursores pointer interactivos y reset global de punteros */
button,
a,
input[type="submit"],
input[type="button"],
input[type="reset"],
select,
label,
[role="button"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
a.disabled {
  cursor: not-allowed !important;
}

html, body {
  height: 100%;
  background-color: var(--bg-color-deep);
  color: var(--text-primary);
  font-family: 'Outfit', 'Inter', sans-serif;
  overflow: hidden;
}

/* Centrar el frame móvil en PC, pantalla completa en celular */
body {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenedor principal que simula un móvil en PC, pero se expande en pantallas grandes */
.app-shell {
  width: 100%;
  height: 100%;
  max-width: 480px;
  max-height: 960px;
  background-color: var(--bg-color);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: none;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transition: max-width 0.3s ease, height 0.3s ease, border-radius 0.3s ease;
}

/* Teléfonos móviles pequeños/medianos - ancho completo */
@media (max-width: 480px) {
  .app-shell {
    max-width: 100% !important;
    max-height: 100% !important;
    border: none;
    border-radius: 0;
  }
}

/* Teléfonos móviles grandes, Tablets y PCs - Pantalla Completa */
@media (min-width: 481px) {
  body {
    display: block !important;
  }
  .app-shell {
    max-width: 100% !important;
    max-height: 100vh !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Tablets - Centrado de Encabezado */
@media (min-width: 768px) {
  .app-header {
    padding: 0 calc((100% - 768px) / 2 + 20px);
  }
}

/* Escritorio / PC - Centrado de Encabezado */
@media (min-width: 1025px) {
  .app-header {
    padding: 0 calc((100% - 1200px) / 2 + 20px);
  }
}

/* Encabezado superior fijo */
.app-header {
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: var(--card-border);
  z-index: 10;
}

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

.group-badge {
  width: 38px;
  height: 38px;
  background: var(--neon-green-solid);
  border-radius: 50%;
  color: #0c0c0e;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  padding: 4px;
}

.header-icon-btn:active {
  opacity: 0.6;
}

.header-icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Área de contenido con scroll */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.app-content.with-nav {
  padding-bottom: 96px; /* Espacio extra para que no tape la Bottom Nav Bar */
}

/* Ocultar barra de scroll en navegadores modernos */
.app-content::-webkit-scrollbar {
  display: none;
}
/* Barra de navegación inferior fija */
.app-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 8px; /* Ajuste para el home indicator de iOS */
  background: rgba(26, 29, 36, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: none; /* Quita explícitamente cualquier borde de todos los lados */
  border-top: var(--card-border); /* Aplica el borde únicamente arriba */
  border-radius: 20px 20px 0 0; /* Bordes redondeados en las esquinas superiores */
  z-index: 10;
}

@media (min-width: 768px) {
  .app-nav {
    justify-content: center;
    gap: 80px;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  transition: color 0.2s;
  flex: 1;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform 0.2s;
}

.nav-item:active svg {
  transform: scale(0.9);
}

.nav-item.active {
  color: var(--neon-green);
}

.nav-item.active svg {
  stroke: var(--neon-green);
  filter: drop-shadow(0 0 5px var(--neon-green-glow));
}

/* Estilos de Tarjetas (Cards) */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.card.active-neon {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px var(--neon-green-glow), inset 0 0 10px rgba(158, 255, 0, 0.05);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Listado de Miembros Horizontal */
.member-list-horizontal {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.member-list-horizontal::-webkit-scrollbar {
  display: none;
}

.member-card {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(30, 35, 45, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  padding: 12px 8px;
  scroll-snap-align: start;
  transition: all 0.2s ease;
  cursor: pointer;
}

.member-card.active {
  border-color: var(--neon-green-solid);
  background: rgba(158, 255, 0, 0.05);
  box-shadow: 0 4px 15px rgba(158, 255, 0, 0.1);
}

.avatar-container {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #232731;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.member-card.active .avatar-container {
  border-color: var(--neon-green-solid);
  box-shadow: 0 0 10px var(--neon-green-glow);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  font-size: 16px;
  font-weight: 800;
  color: var(--neon-green);
  letter-spacing: 0.5px;
}

.member-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-rating {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}

.star-icon {
  color: var(--neon-green);
  font-size: 10px;
}

/* Botones con estilo Neón */
.btn-neon {
  background: var(--neon-green-solid);
  color: #0c0c0e;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(138, 255, 0, 0.25);
  text-decoration: none;
}

.btn-neon:hover {
  background: var(--neon-green);
  box-shadow: 0 6px 20px rgba(138, 255, 0, 0.4);
}

.btn-neon:active {
  transform: scale(0.97);
}

.btn-outline-neon {
  background: transparent;
  border: 1px solid var(--neon-green-solid);
  color: var(--neon-green);
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}

.btn-outline-neon:hover {
  background: rgba(158, 255, 0, 0.05);
  box-shadow: 0 0 12px var(--neon-green-glow);
}

.btn-outline-neon:active {
  transform: scale(0.97);
}

/* Controles de Formulario */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.date-input-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.date-input-container:focus-within {
  border-color: var(--neon-green);
}

.date-input-container svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  margin-right: 12px;
}

.date-input-container input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  outline: none;
}

/* El Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2b2e38;
  transition: 0.3s ease;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.3s ease;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--neon-green-solid);
}

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

/* Checkbox Grid para Jugadores */
.player-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.player-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
}

.player-checkbox-item input {
  display: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.player-checkbox-item:hover .checkbox-custom {
  border-color: var(--text-primary);
}

.player-checkbox-item input:checked + .checkbox-custom {
  background: var(--neon-green-solid);
  border-color: var(--neon-green-solid);
  box-shadow: 0 0 8px var(--neon-green-glow);
}

.checkbox-custom:after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid #0c0c0e;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
  display: none;
}

.player-checkbox-item input:checked + .checkbox-custom:after {
  display: block;
}

.player-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #232731;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--neon-green);
  overflow: hidden;
}

/* Solicitudes Pendientes */
.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.request-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.request-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.request-details {
  display: flex;
  flex-direction: column;
}

.request-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.request-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.btn-action {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--border-radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-action-accept {
  background: var(--green-success-bg);
  color: var(--green-success);
}

.btn-action-accept:hover {
  background: var(--green-success);
  color: #000000;
}

.btn-action-decline {
  background: var(--red-alert-bg);
  color: var(--red-alert);
}

.btn-action-decline:hover {
  background: var(--red-alert);
  color: #ffffff;
}

/* Landing Page Hero y Mockups */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 10px 0;
}

.logo-hero {
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px var(--neon-green-glow));
  animation: float 2s ease-in-out infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 24px;
  padding: 0 20px;
}

.mockup-container {
  width: 100%;
  position: relative;
  margin-top: 10px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.mockup-image-frame {
  width: 82%;
  max-width: 280px;
  border-radius: 28px;
  border: 4px solid #1a1d24;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 30px var(--neon-green-glow);
  display: block;
}

/* Estilo para los divisores */
.divider {
  height: 1px;
  background: var(--card-border);
  margin: 20px 0;
}

/* Clases de utilidad para evitar estilos en línea */
.navbar-logo {
  height: 38px;
}

.hero-cta-wrapper {
  width: 100%;
  padding: 0 10px;
  margin-bottom: 8px;
}

.card-subtitle-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-green-solid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 20px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-step-number {
  width: 28px;
  height: 28px;
  background: rgba(158, 255, 0, 0.1);
  border: 1.5px solid var(--neon-green-solid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--neon-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feature-step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Estilos para Formularios de Autenticación Unificados */
.auth-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: 380px;
  transition: min-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auth-form {
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.auth-form.login-form {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.auth-form.register-form {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

/* Clases de activación por JS */
.auth-wrapper.show-register .auth-form.login-form {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.auth-wrapper.show-register .auth-form.register-form {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* Inputs de formulario estilizados */
.form-control-neon {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-neon:focus {
  border-color: var(--neon-green-solid);
  box-shadow: 0 0 10px var(--neon-green-glow);
}

.form-control-neon::placeholder {
  color: var(--text-muted);
}

.form-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-footer-link a {
  color: var(--neon-green);
  text-decoration: none;
  font-weight: 700;
  margin-left: 4px;
}

.form-footer-link a:hover {
  text-decoration: underline;
}

/* Input file para foto personalizado */
.file-upload-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-upload-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--text-secondary);
  border-radius: var(--border-radius-md);
  padding: 14px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-btn:hover {
  border-color: var(--neon-green-solid);
  color: var(--neon-green);
  background: rgba(158, 255, 0, 0.02);
}

.file-upload-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

/* Estilo para fila de recordar y recuperar */
.auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
}

.checkbox-label-neon {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
}

.checkbox-label-neon input {
  display: none;
}

.checkbox-box-custom {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label-neon input:checked + .checkbox-box-custom {
  background: var(--neon-green-solid);
  border-color: var(--neon-green-solid);
  box-shadow: 0 0 6px var(--neon-green-glow);
}

.checkbox-box-custom:after {
  content: "";
  width: 5px;
  height: 8px;
  border: solid #0c0c0e;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 1.5px;
  display: none;
}

.checkbox-label-neon input:checked + .checkbox-box-custom:after {
  display: block;
}

/* Clases de utilidad para el formulario de Login/Registro */
.auth-hero {
  padding: 10px 0 20px 0;
}

.auth-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 26px;
}

.auth-card-title {
  margin-bottom: 20px;
  font-size: 20px;
}

.form-group-spaced {
  margin-bottom: 20px;
}

.form-group-photo {
  margin-bottom: 24px;
}

.forgot-password-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.form-row-double {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.form-col-half {
  flex: 1;
}

/* Contenedor de errores de autenticación */
.auth-error-container {
  background: var(--red-alert-bg);
  border: 1px solid rgba(255, 77, 77, 0.25);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: slideDown 0.3s ease-out;
}

.auth-error-message {
  color: var(--red-alert);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-error-message .error-icon {
  font-size: 16px;
}

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

/* Estilos para el Explorador de Grupos */
.search-container {
  margin-bottom: 24px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
  pointer-events: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.search-input-wrapper .form-control-neon {
  padding-left: 48px;
}

.groups-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.group-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-card:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 255, 0, 0.3);
  box-shadow: 0 6px 24px rgba(158, 255, 0, 0.08);
}

.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.group-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 8px;
}

.group-card-creator {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.group-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.group-card-action {
  margin-top: 4px;
}

/* Badges y Estados */
.badge-status {
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
  width: 100%;
}

.badge-status-creator {
  background: rgba(158, 255, 0, 0.1);
  color: var(--neon-green);
  border: 1px solid var(--neon-green-solid);
}

.badge-status-member {
  background: rgba(76, 175, 80, 0.1);
  color: var(--green-success);
  border: 1px solid var(--green-success);
}

.badge-status-requested {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.btn-join-group {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
}

/* Carga y Mensajes */
.load-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.loading-spinner {
  color: var(--neon-green);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-spinner::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--neon-green-glow);
  border-top-color: var(--neon-green-solid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.no-results-message {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.no-results-message svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.clickable-group-card:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 20, 26, 0.95);
  border: 1px solid rgba(40, 45, 55, 0.8);
  border-radius: var(--border-radius-md);
  padding: 12px 24px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
  pointer-events: none;
  text-align: center;
  min-width: 280px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-success {
  border-color: var(--neon-green-solid);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px var(--neon-green-glow);
}
.toast-error {
  border-color: var(--red-alert);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 77, 77, 0.15);
}

/* Tarjetas de Solicitud en Panel de Admin */
.request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.request-card:last-child {
  margin-bottom: 0;
}

.request-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.request-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.request-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.request-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-nickname {
  font-size: 11px;
  color: var(--text-secondary);
}

.request-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Botones Circulares de Acción */
.btn-request-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.btn-request-accept {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.2);
  color: var(--green-success);
}

.btn-request-accept:hover {
  background: var(--green-success);
  color: #050608;
  border-color: var(--green-success);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
}

.btn-request-decline {
  background: rgba(255, 77, 77, 0.1);
  border-color: rgba(255, 77, 77, 0.2);
  color: var(--red-alert);
}

.btn-request-decline:hover {
  background: var(--red-alert);
  color: #ffffff;
  border-color: var(--red-alert);
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.4);
}

/* Contenedor del Ranking */
.ranking-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Fila de Ranking */
.ranking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.ranking-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Efecto de Luces (Backdrop Filters y Bordes Neon para los Top) */
.ranking-row.rank-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.05);
}

.ranking-row.rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-color: rgba(192, 192, 192, 0.25);
}

.ranking-row.rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-color: rgba(205, 127, 50, 0.2);
}

/* Información del Jugador */
.ranking-player-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.ranking-position {
  font-size: 16px;
  font-weight: 800;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.rank-1 .ranking-position {
  color: #ffd700;
}

.rank-2 .ranking-position {
  color: #c0c0c0;
}

.rank-3 .ranking-position {
  color: #cd7f32;
}



.ranking-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ranking-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-nickname {
  font-size: 11px;
  color: var(--text-muted);
}

/* Winrate Badge / Pill */
.ranking-winrate-pill {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.rank-1 .ranking-winrate-pill {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.05);
  border-color: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.rank-2 .ranking-winrate-pill {
  color: #c0c0c0;
  background: rgba(192, 192, 192, 0.04);
  border-color: rgba(192, 192, 192, 0.15);
}

.rank-3 .ranking-winrate-pill {
  color: #cd7f32;
  background: rgba(205, 127, 50, 0.03);
  border-color: rgba(205, 127, 50, 0.1);
}

/* ==========================================================================
   Sección de Perfil de Usuario
   ========================================================================== */

.profile-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 10px;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.profile-photo-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.profile-avatar-container {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #1e222b;
    border: 3px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    position: relative;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-initials {
    font-size: 36px;
    font-weight: 800;
    color: var(--neon-green);
    letter-spacing: 1px;
}

/* Pencil button on the side - green color like the rest */
.profile-photo-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--neon-green-solid);
    border: 3px solid var(--bg-color);
    color: #0c0c0e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(158, 255, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.profile-photo-edit-btn:hover, .profile-photo-edit-btn:active {
    transform: scale(1.1);
    background: var(--neon-green);
}

.profile-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-nickname-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--neon-green);
    background: rgba(158, 255, 0, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(158, 255, 0, 0.15);
}

.profile-nickname-badge.text-muted {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Options List */
.profile-options-list {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 30px;
}

.profile-option-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-option-item:last-child {
    border-bottom: none;
}

.profile-option-item:not(.option-non-clickable):hover,
.profile-option-item:not(.option-non-clickable):active {
    background: rgba(255, 255, 255, 0.03);
}

.option-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.option-icon {
    width: 22px;
    height: 22px;
    color: var(--neon-green);
    stroke-width: 2;
}

.option-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.profile-option-item:hover .option-arrow {
    transform: translateX(3px);
}

.option-non-clickable {
    cursor: default;
}

/* Switch Toggle Premium style */
.switch-premium {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

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

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

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

.switch-premium input:checked + .switch-slider {
    background-color: rgba(158, 255, 0, 0.15);
    border-color: var(--neon-green-solid);
}

.switch-premium input:checked + .switch-slider:before {
    transform: translateX(20px);
    background-color: var(--neon-green-solid);
    box-shadow: 0 0 8px var(--neon-green-glow);
}

/* Log out button - Red at the bottom */
.profile-logout-container {
    margin-top: auto;
    padding-bottom: 20px;
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: var(--border-radius-md);
    background: transparent;
    border: 1px solid var(--red-alert);
    color: var(--red-alert);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.05);
}

.btn-logout:hover, .btn-logout:active {
    background: var(--red-alert-bg);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.15);
}

.logout-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
}

/* Modal Styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 13, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.show {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-color);
    border: var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-card-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.4;
}

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

.form-control-neon {
    width: 100%;
    background: #1a1d24;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    transition: all 0.2s ease;
}

.form-control-neon:focus {
    outline: none;
    border-color: var(--neon-green-solid);
    box-shadow: 0 0 10px var(--neon-green-glow);
}

.input-error-msg {
    display: block;
    font-size: 12px;
    color: var(--red-alert);
    margin-top: 6px;
}

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

.btn-modal-cancel {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: color 0.2s;
}

.btn-modal-cancel:hover {
    color: var(--text-primary);
}

.btn-modal-save {
    background: var(--neon-green-solid);
    border: none;
    color: #0c0c0e;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 12px var(--neon-green-glow);
    transition: all 0.2s ease;
}

.btn-modal-save:hover, .btn-modal-save:active {
    background: var(--neon-green);
    box-shadow: 0 4px 15px rgba(158, 255, 0, 0.4);
    transform: translateY(-1px);
}

/* Ajustes de Notificaciones */
.notification-settings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notification-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.notification-setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.setting-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.setting-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Menú Desplegable y Contador de Notificaciones en Header */
.notifications-menu-container {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--neon-green-solid);
    color: #0b0c10;
    font-size: 9px;
    font-weight: 800;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px var(--neon-green-glow);
    border: 1.5px solid #1f2833;
    pointer-events: none;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 290px;
    background: rgba(18, 20, 26, 0.96);
    border: 1px solid rgba(40, 45, 55, 0.85);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85);
    z-index: 1010;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.notifications-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notifications-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-clear-notifications {
    background: none;
    border: none;
    color: var(--neon-green-solid);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}

.btn-clear-notifications:hover {
    opacity: 0.8;
}

.notifications-dropdown-list {
    max-height: 250px;
    overflow-y: auto;
}

.notifications-dropdown-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.notifications-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.notifications-dropdown-item:last-child {
    border-bottom: none;
}

.notification-item-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.notification-item-body {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notifications-empty {
    padding: 20px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* Neon green button loading spinner */
@keyframes spin-loader {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(12, 12, 14, 0.2);
    border-top-color: #0c0c0e;
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
    pointer-events: none;
    z-index: 5;
    box-sizing: border-box;
}
.btn-neon.btn-loading,
.btn-outline-neon.btn-loading {
    position: relative !important;
    overflow: hidden !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.85;
}
.btn-neon.btn-loading .btn-text,
.btn-outline-neon.btn-loading .btn-text {
    opacity: 0 !important;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   DISEÑO RESPONSIVO (TABLETS Y ESCRITORIO)
   ========================================================================== */

/* Breakpoint para Tablets y PC */
@media (min-width: 768px) {
  /* Grilla de grupos en Explorador */
  .groups-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 28px !important;
  }
  
  .search-container {
    max-width: 500px;
  }

  /* Centrado y límite de ancho para vistas secundarias y formularios */
  .app-content > .card,
  .app-content > form > .card,
  .app-content > div:not(.dashboard-grid-layout):not(.groups-section):not(.chat-container-layout):not(.chat-header-nav):not(.dashboard-header-nav):not(.modal-backdrop):not(#matchmakingLoadingModal):not(#confirmModal),
  .card:has(form),
  .card:has(#membersRemoveList),
  .card:has(#membersScoresList),
  .profile-container {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Asegurar que los modals y backdrops a pantalla completa ignoren la restricción de ancho */
  .app-content > #matchmakingLoadingModal,
  .app-content > #confirmModal,
  .app-content > .modal-backdrop,
  .modal-backdrop {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
  }

  /* Centrar y limitar el botón Comenzar Ahora de Index */
  .app-content > a.btn-neon {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: flex !important;
    justify-content: center;
    width: 100%;
  }

  /* Centrar y limitar el header de navegación en vistas secundarias */
  .app-content:not(:has(.dashboard-grid-layout)):not(:has(.groups-section)) .dashboard-header-nav {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Centrado e inclinación específica para tarjetas de login/registro */
  .card:has(.auth-wrapper) {
    max-width: 460px !important;
    margin-top: 20px;
    margin-bottom: 40px;
  }

  .app-content:has(.auth-wrapper) .auth-hero {
    margin-top: 40px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Limitar el ancho de las vistas principales en Tablet */
  .dashboard-grid-layout {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  .groups-section {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  .app-content:has(.dashboard-grid-layout) .dashboard-header-nav {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Centrar y limitar la lista de chats */
  .app-content:has(#chatGroupsListContainer) .groups-section {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Botones del Dashboard en fila horizontal para PC/Tablet */
  .actions-container {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 12px;
  }
  .actions-container > button,
  .actions-container > a {
    flex: 1;
    min-width: 200px;
    width: auto !important;
  }
}

/* Breakpoint para Escritorios Grandes / PC */
@media (min-width: 1025px) {
  /* Grilla de grupos en Explorador a 3 columnas */
  .groups-list {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Ajustar el límite de ancho para PC (Explorer ancho, Dashboard contenido) */
  .groups-section {
    max-width: 1200px !important;
  }
}

/* Grid del Dashboard de Grupo (Siempre en columna por diseño y visibilidad del ranking) */
.dashboard-grid-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-col-left,
.dashboard-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Estilos de barra de navegación de escritorio */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 20px;
  margin-right: 16px;
}
.desktop-nav a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, filter 0.2s ease;
}
.desktop-nav a svg {
  stroke: currentColor;
}
.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--neon-green-solid);
  filter: drop-shadow(0 0 6px var(--neon-green-glow));
}

.app-footer-desktop {
  display: none;
  height: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: var(--card-border);
  background: transparent;
  width: 100%;
  padding: 0;
  line-height: 1;
}
.app-footer-desktop span {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 1025px) {
  .app-nav {
    display: none !important;
  }
  .desktop-nav {
    display: flex;
  }
  .app-content {
    display: flex;
    flex-direction: column;
  }
  .app-footer-desktop {
    display: flex;
    margin-top: auto !important;
    padding: 20px 0;
    height: auto;
    min-height: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .app-content.with-nav {
    padding-bottom: 0 !important;
  }
  .chat-input-area {
    bottom: 20px !important; /* Dado que el footer hace scroll, el input del chat se ubica cómodamente abajo de todo */
  }
  .app-content:has(.chat-container-layout) .app-footer-desktop {
    display: none !important;
  }
}





/* ── Hover Glow Options for Home Page ── */
.hover-glow {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}

.hover-glow:hover {
    border-color: var(--neon-green-solid) !important;
    transform: translateY(-2px) scale(1.025);
    box-shadow: 0 4px 20px var(--neon-green-glow);
    background: rgba(158, 255, 0, 0.02) !important;
}
/* ── iOS PWA Installation Guide (Namespaced under .ios-install-body) ── */
.ios-install-body {
    background: #0b0d11 !important;
    color: #ffffff !important;
    min-height: 100% !important;
    font-family: 'Outfit', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    display: block !important;
    overflow-y: auto !important;
}

.ios-install-body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: 50%;
    translate: -50% 0;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(158,255,0,.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ios-install-body .page {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 60px;
}

.ios-install-body .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 0;
}

.ios-install-body .btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(22, 25, 33, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .2s, border-color .2s;
}

.ios-install-body .btn-back:hover  { background: rgba(158,255,0,.1); border-color: #9eff00; }
.ios-install-body .btn-back:active { transform: scale(.92); }

.ios-install-body .btn-back svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ios-install-body .hero {
    text-align: center;
    padding: 36px 24px 28px;
    display: block !important;
}

.ios-install-body .hero-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1a1d24, #0f1115);
    border: 1px solid rgba(158,255,0,.25);
    box-shadow: 0 0 32px rgba(158, 255, 0, 0.22), 0 8px 24px rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.ios-install-body .hero-logo img { width: 52px; height: 52px; }

.ios-install-body .hero h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 10px;
    color: #ffffff !important;
}

.ios-install-body .hero h1 span { color: #9eff00; }

.ios-install-body .hero p {
    font-size: 15px;
    color: #8a92a6;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.ios-install-body .safari-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 20px 8px;
    padding: 14px 16px;
    background: rgba(255, 149, 0, .08);
    border: 1px solid rgba(255, 149, 0, .25);
    border-radius: 14px;
}

.ios-install-body .safari-badge svg { flex-shrink: 0; }

.ios-install-body .safari-badge p {
    font-size: 13px;
    color: #ffb340;
    line-height: 1.4;
    font-weight: 500;
}

.ios-install-body .safari-badge strong { font-weight: 700; }

.ios-install-body .appstore-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 20px 28px;
    padding: 14px 16px;
    background: rgba(167, 139, 250, .07);
    border: 1px solid rgba(167, 139, 250, .22);
    border-radius: 14px;
}

.ios-install-body .appstore-note svg { flex-shrink: 0; margin-top: 1px; }

.ios-install-body .appstore-note p {
    font-size: 13px;
    color: #c4b5fd;
    line-height: 1.4;
    font-weight: 500;
}

.ios-install-body .appstore-note strong { font-weight: 700; color: #ddd6fe; }
.ios-install-body .appstore-note em     { font-style: normal; font-weight: 700; color: #ddd6fe; }

.ios-install-body .steps { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }

.ios-install-body .step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(22, 25, 33, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color .25s, box-shadow .25s;
}

.ios-install-body .step:hover {
    border-color: rgba(158,255,0,.2);
    box-shadow: 0 4px 20px rgba(158,255,0,.06);
}

.ios-install-body .step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(158, 255, 0, 0.08);
    border: 1.5px solid rgba(158,255,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #9eff00;
    flex-shrink: 0;
}

.ios-install-body .step-body { flex: 1; min-width: 0; }

.ios-install-body .step-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.ios-install-body .step-desc {
    font-size: 13px;
    color: #8a92a6;
    line-height: 1.5;
}

.ios-install-body .icon-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 2px 7px 2px 5px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    vertical-align: middle;
    white-space: nowrap;
}

.ios-install-body .icon-pill svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.ios-install-body .step-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(158, 255, 0, 0.08);
}

.ios-install-body .step-icon svg {
    width: 24px;
    height: 24px;
    stroke: #9eff00;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ios-install-body .done-card {
    margin: 24px 20px 0;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(158,255,0,.07), rgba(158,255,0,.02));
    border: 1px solid rgba(158,255,0,.3);
    border-radius: 20px;
    text-align: center;
}

.ios-install-body .done-card .emoji { font-size: 36px; margin-bottom: 10px; }

.ios-install-body .done-card h2 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #ffffff;
}

.ios-install-body .done-card p {
    font-size: 13px;
    color: #8a92a6;
    line-height: 1.5;
}

/* ── Responsive: tablet ─────────────────────────────────── */
@media (min-width: 600px) {
    .ios-install-body { padding: 32px 20px !important; }

    .ios-install-body .page {
        max-width: 680px;
        padding-bottom: 60px;
    }

    .ios-install-body .hero { padding: 40px 40px 32px; }
    .ios-install-body .hero h1 { font-size: 30px; }
    .ios-install-body .hero-logo { animation: none; }

    .ios-install-body .topbar { padding: 0 0 24px; }

    .ios-install-body .safari-badge  { margin: 0 0 8px; }
    .ios-install-body .appstore-note { margin: 0 0 28px; }
    .ios-install-body .steps         { padding: 0; gap: 14px; }
    .ios-install-body .done-card     { margin: 28px 0 0; }

    .ios-install-body .steps { display: grid; grid-template-columns: 1fr 1fr; }
    .ios-install-body .steps .step:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ── Responsive: desktop ────────────────────────────────── */
@media (min-width: 960px) {
    .ios-install-body { padding: 48px 20px !important; }

    .ios-install-body .page { max-width: 860px; }

    .ios-install-body .topbar { padding: 0 20px 0; margin-bottom: 40px; }

    .ios-install-body .hero { padding: 0 0 40px; display: flex; align-items: center; gap: 40px; text-align: left; }
    .ios-install-body .hero-logo { margin: 0; width: 100px; height: 100px; border-radius: 22px; animation: none; }
    .ios-install-body .hero-logo img { width: 64px; height: 64px; }
    .ios-install-body .hero-text { flex: 1; }
    .ios-install-body .hero h1 { font-size: 36px; }
    .ios-install-body .hero p  { max-width: 100%; margin: 0; }

    .ios-install-body .steps { grid-template-columns: 1fr 1fr 1fr; }
    .ios-install-body .steps .step:last-child:nth-child(3n - 1) { grid-column: auto; }
    .ios-install-body .steps .step:last-child:nth-child(odd)    { grid-column: auto; }

    .ios-install-body .done-card { padding: 32px; }
}
