:root {
  --bg-color: #0b101a; /* Fondo general oscuro */
  --element-bg: #161e2f; /* Fondo de elementos (búsqueda, botones if needed) */
  --border-color: #273043; /* Bordes tenues */

  --text-main: #ffffff;
  --text-muted: #8c97ad;

  --badge-bg: rgba(255, 255, 255, 0.1);

  --primary-blue: #4455f4; /* Botón "Ver más" */
  --primary-blue-hover: #3544d9;

  --orange-accent: #ff9100; 
  --ad-bg: #090c13; 

  --dropdown-bg: #1e2532; 
  --footer-bg: #0b0f16; 
  --uc-primary-color: #2563eb;
  --uc-primary-color-hover: #1e40af;
  --uc-background-color: var(--bg-color);
  --uc-text-color: var(--text-main);
  --uc-border-radius: 20px;
}

/* ================= TEMA CLARO ================= */
body.light-theme {
  --bg-color: #f8fafc; /* Fondo casi blanco */
  --element-bg: #ffffff; /* Elementos blancos puros */
  --border-color: #cbd5e1; /* Bordes gris claro */

  --text-main: #0f172a; /* Texto principal oscurísimo */
  --text-muted: #64748b; /* Texto gris de apoyo */

  --badge-bg: rgba(0, 0, 0, 0.05);

  --primary-blue: #3b82f6; /* Azul un poco más brillante */
  --primary-blue-hover: #2563eb;

  --orange-accent: #f59e0b;
  --ad-bg: #f1f5f9;

  --dropdown-bg: #ffffff;
  --footer-bg: #f1f5f9; /* Footer gris súper suave */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
}

/* Transiciones suaves para el cambio de tema */
body,
.main-footer,
.dropdown-content,
.search-bar,
.menu-button,
.icon-button,
.banner {
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER ================= */
.main-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1000; /* Aseguramos que la cabecera esté por encima de todo */
  transition: background-color 0.3s;
}

/* ================= UTILITIES ================= */
.br-2 { border-radius: 2px; }
.mb-30 { margin-bottom: 30px; }

.input-readonly-muted {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
  border-color: var(--border-color) !important;
}

body.light-theme .input-readonly-muted {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
}
.mt-3rem { margin-top: 2rem; }
.code-box { background: var(--badge-bg); padding: 0.2rem 0.4rem; border-radius: 4px; font-family: monospace; color: var(--text-main); }
.text-link-green { color: #00ff00; text-decoration: underline; }
.text-link-blue { color: var(--primary-blue); text-decoration: none; font-weight: 500; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-row { display: flex; flex-direction: row; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.toast-container-fixed { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }

/* Global Toast Notifications */
.toast {
    background: var(--dropdown-bg);
    color: var(--text-main);
    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out forwards;
}

.toast.success {
    border-left: 5px solid #58E54B;
}

.toast.error {
    border-left: 5px solid #ed4245;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon { color: #58E54B; }
.toast.error .toast-icon { color: #ed4245; }

.toast-content {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
.btn-login-header { padding: 0.4rem 1rem; border-radius: 6px; text-decoration: none; background-color: transparent; color: var(--text-main); border: 1px solid var(--border-color); }
.btn-register-header { padding: 0.4rem 1rem; border-radius: 6px; text-decoration: none; }
.max-w-900 { max-width: 900px; }
.mb-05rem { margin-bottom: 0.5rem; }
.text-left { text-align: left; }
.lh-14 { line-height: 1.4; }
.ml-20 { margin-left: 20px; }
.mb-15 { margin-bottom: 15px; }
.article-subtitle { margin-top: 1rem; margin-bottom: 0.5rem; }

/* Menú de usuario en Header */
.pos-relative { position: relative; }
.d-inline-block { display: inline-block; }
.d-none { display: none !important; }
.d-flex { display: flex !important; }

.btn-user-header {
    display: flex; 
    align-items: center; 
    gap: 12px;
    background: var(--element-bg);
    border: 1px solid var(--border-color);
    padding: 4px 18px 4px 4px; 
    border-radius: 50px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-user-header:hover {
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.05);
}

.header-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-name-text {
    font-weight: 600; 
    font-size: 0.95rem; 
    letter-spacing: 0.2px;
}

.user-menu-chevron {
    font-size: 0.8rem; 
    color: var(--text-muted); 
    margin-left: 4px;
}

.user-menu-dropdown {
    display: none;
    position: absolute; 
    top: calc(100% + 12px); 
    right: 0;
    width: 240px; 
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color); 
    border-radius: 14px;
    padding: 8px; 
    flex-direction: column; 
    gap: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    z-index: 99999;
}

.user-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.2s;
}

.user-menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-menu-link-primary {
    background: #58e54b;
    color: #000;
    font-weight: 700;
}

.user-menu-link-primary:hover {
    background: #4cd13f;
}

.user-menu-sep {
    height: 1px; 
    background: var(--border-color); 
    margin: 6px 0;
}

.user-menu-btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #ff4d4d;
    background: transparent;
    border: none;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.2s;
    text-align: left;
    font-family: inherit;
}

.user-menu-btn-logout:hover {
    background: rgba(255, 77, 77, 0.1);
}

.header-auth-buttons {
    display: flex; 
    gap: 0.8rem; 
    margin: 0 0.5rem; 
    align-items: center;
}

.btn-login-header-alt {
    background-color: transparent; 
    color: var(--text-main); 
    border: 1px solid var(--border-color); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    transform: none;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  width: 100%;
  padding: 0 2.5rem; /* Aumentado el padding para que no esté pegado a los bordes */
}

.logo {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 0.5rem; /* Separación extra entre el logo y el botón Menú */
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  transition: all 0.2s ease;
}

.menu-button,
.icon-button {
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.menu-button {
  height: 40px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-button:hover,
.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.menu-button i {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ================= MENÚ DESPLEGABLE ================= */
.menu-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 380px; /* Ancho ajustado para tres opciones */
  background-color: var(--dropdown-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  margin-top: 10px; /* Separación visual real */
  display: none; /* Oculto por defecto */
  grid-template-columns: repeat(3, 1fr); /* Tres columnas */
  row-gap: 2rem;
  column-gap: 1rem;
  justify-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

/* El puente invisible entre el botón y el menú para que el hover no se corte */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -10px; /* Cubre el espacio del margin-top */
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

/* Mostrar al pasar el ratón o hacer focus dentro */
.menu-dropdown-wrapper:hover .dropdown-content,
.menu-dropdown-wrapper:focus-within .dropdown-content {
  display: grid;
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Alinear desde arriba */
  text-align: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.2s ease;
  width: 100%;
}

.dropdown-item i {
  font-size: 1.6rem;
  color: #a0aec0;
  transition: color 0.2s ease;
  height: 2rem; /* Altura fija para el icono para alinear todos horizontalmente */
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-item span {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  display: block;
  max-width: 100px; /* Limitar el ancho para forzar el salto de línea si es necesario */
}

.dropdown-item:hover {
  transform: translateY(-2px); /* Pequeño salto al hacer hover */
}

.dropdown-item:hover i,
.dropdown-item:focus i {
  color: #ffffff; /* Los iconos se iluminan en hover */
}

/* ================= DESPLEGABLE DE IDIOMA (Rediseño Estilo App) ================= */
.lang-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  width: 220px;
  max-height: 400px; /* Limitar altura */
  overflow-y: auto; /* Añadir scroll */
  background-color: #ffffff; /* Fondo blanco como en la imagen */
  border: 1px solid #e2e8f0;
  border-radius: 4px; /* Bordes más rectos */
  padding: 4px 0;
  margin-top: 8px;
  display: none;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10001;
}

/* Scrollbar personalizado para el menú de idiomas */
.lang-dropdown-content::-webkit-scrollbar {
  width: 6px;
}

.lang-dropdown-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.lang-dropdown-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.lang-dropdown-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Forzar fondo blanco incluso en tema oscuro para este menú específico si se desea calcar la imagen */
/* Si prefieres que respete el tema oscuro, usa var(--dropdown-bg) */
body.light-theme .lang-dropdown-content {
  background-color: #ffffff;
}

.lang-dropdown-content::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.lang-dropdown-wrapper.is-open .lang-dropdown-content {
  display: flex;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  text-decoration: none;
  color: #1a202c; /* Texto oscuro para fondo blanco */
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f1f5f9;
}

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

.lang-item:hover {
  background-color: #f8fafc;
}

/* Forzar que el hover en tema oscuro siga siendo claro para este menú específico blanco */
body.light-theme .lang-item:hover {
  background-color: #f8fafc;
}

.lang-flag {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
}

/* Ajuste para el botón del header para que combine */
.lang-btn {
    background: var(--element-bg);
    border: 1px solid var(--border-color);
    padding: 0 8px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    border-radius: 4px;
    min-width: 44px;
}

.lang-btn:hover {
    background: var(--border-color);
}

.lang-flag {
  font-size: 1.2rem;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.theme-icon-img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  display: block;
}

.theme-icon-img {
  transform-origin: center;
}

/* Animación del Icono de Tema */
@keyframes spinFade {
  0% {
    transform: scale(0.5) rotate(-90deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.icon-anim {
  animation: spinFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.search-bar {
  display: flex;
  flex: 1;
  background-color: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  height: 42px;
  align-items: center;
  margin: 0 1.5rem;
  max-width: 600px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  padding: 0 4px;
}

.search-bar:focus-within {
  border-color: var(--primary-blue);
  background-color: var(--bg-color);
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.15);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0 1rem;
  height: 100%;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.search-submit {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}

.search-submit:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

body.light-theme .search-submit:hover {
  background: rgba(0, 0, 0, 0.05);
}

.search-submit i {
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .main-header {
    height: auto;
    padding: 0.6rem 0;
  }

  .header-content {
    flex-wrap: wrap;
    row-gap: 0.6rem;
    padding: 0 1rem;
  }

  .search-bar {
    order: 10;
    width: 100%;
    max-width: none;
    margin: 0;
    flex: 1 1 100%;
  }
}

@media (max-width: 700px) {
  .header-content {
    justify-content: center;
    column-gap: 0.5rem;
  }

  .menu-button span {
    display: none;
  }

  .menu-button {
    padding: 0 0.75rem;
  }

  .btn-user-header {
    padding-right: 12px;
  }

  .user-name-text {
    display: none;
  }

  .dropdown-content {
    width: min(92vw, 360px);
    left: 0;
    grid-template-columns: repeat(2, 1fr);
  }

  .main-content {
    padding: 1.25rem 1rem;
    margin-bottom: 3rem;
  }

  .category-header-wrapper {
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .category-header-wrapper .btn-ver-mas {
    margin-left: 0;
  }
}

/* ================= CONTENIDO PRINCIPAL ================= */
.main-content {
  max-width: 1200px;
  margin: 0 auto 5rem auto; /* Añade espacio abajo para separarse del footer */
  padding: 2rem 1.5rem;
  flex-grow: 1; /* Esto hace que ocupe todo el espacio disponible empujando el footer hacia abajo */
  width: 100%;
}

/* ================= BANNER AD ================= */
.banner {
  background-color: var(--ad-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem; /* Margen antes del título */
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.banner-icon-bg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-icon {
  color: #e58b3f; /* Color naranja apagado */
  font-size: 1.1rem;
}

.banner-text {
  color: var(--text-muted);
}

.banner-text strong {
  color: var(--text-main);
  font-weight: 600;
}

.banner-badge {
  background-color: var(--orange-accent);
  color: #111;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.banner-right {
  display: flex;
  align-items: center;
}

.ad-label {
  background-color: var(--element-bg);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.category-header-wrapper h2 {
  color: var(--text-main);
  font-size: 1.8rem;
  font-weight: 700;
  border-left: 5px solid #5865f2;
  padding-left: 14px;
  margin: 0;
  display: inline-block;
}

.category-header-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.category-header-wrapper .btn-ver-mas {
  text-decoration: none;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background-color: #2563eb;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 20px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.category-header-wrapper .btn-ver-mas:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary-blue);
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary i {
  font-size: 0.75rem;
}

/* ================= GRID DE MODS (JSON) ================= */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.mod-card {
  background-color: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure equal heights */
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.mod-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-blue);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mod-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

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

.mod-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.fav-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted); /* Estado inactivo dinámico */
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.1s;
  padding: 0;
  margin-left: 0.5rem;
}

.fav-btn:hover {
  color: #9ca3af; /* Gris más claro al pasar el ratón */
  transform: scale(1.1);
}

.fav-btn.active {
  color: #FFCC00; /* Amarillo para estado activo */
}
.fav-btn.active i {
  font-weight: 900; /* fa-solid */
}

.mod-version {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--badge-bg);
  color: var(--text-main);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  white-space: nowrap;
}

.mod-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.2rem;
  /* flex-grow: 1; quitado para no romper el height de webkit-box */
}

.mod-desc.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Altura fija aproximada para 3 líneas (1.5 line-height * 0.95rem * 3) = ~4.3rem */
  height: 4.3rem;
}

.mod-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto; /* Empuja el footer hacia abajo alineando las cajas sin afectar al párrafo superior */
}

.mod-category,
.mod-downloads {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mod-btn {
  text-align: center;
  justify-content: center;
  width: 100%;
}

/* ================= HERO SECTION ================= */
.hero-section {
  background: radial-gradient(circle at 50% 50%, rgba(58, 167, 255, 0.08) 0%, rgba(28, 101, 229, 0.05) 100%);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 6rem 2rem;
  margin-bottom: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  animation: fadeInHero 1s ease-out;
}

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

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(58, 167, 255, 0.05) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  animation: rotateGlow 15s linear infinite;
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0 auto;
  animation: floatContent 6s ease-in-out infinite;
}

@keyframes floatContent {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-section h1 {
  font-size: 3.8rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #3AA7FF 0%, #1C65E5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero-section p {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  line-height: 1.7;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ================= HERO CTA BUTTONS ================= */
.hero-cta-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.4rem 3rem;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 18px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 260px;
  position: relative;
  overflow: hidden;
}

.btn-primary.hero-cta-btn {
  background: linear-gradient(135deg, #3AA7FF 0%, #1C65E5 100%);
  color: #fff;
  border: none;
  box-shadow: 0 15px 35px rgba(28, 101, 229, 0.3);
}

.btn-primary.hero-cta-btn:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 45px rgba(28, 101, 229, 0.4);
}

.btn-ai {
  background-color: rgba(28, 101, 229, 0.05);
  color: #3AA7FF;
  border: 2px solid rgba(58, 167, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-ai:hover {
  background-color: rgba(58, 167, 255, 0.15);
  border-color: #3AA7FF;
  color: #fff;
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 45px rgba(28, 101, 229, 0.2);
}

.btn-ai i {
  font-size: 1.3rem;
  animation: pulseAiIcon 2s infinite;
}

@keyframes pulseAiIcon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* Decorative elements */
.hero-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

.decoration-item {
  position: absolute;
  background: linear-gradient(135deg, rgba(58, 167, 255, 0.1) 0%, rgba(28, 101, 229, 0.1) 100%);
  border-radius: 8px;
  animation: floatDecoration 10s infinite linear;
}

@keyframes floatDecoration {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.5; }
  80% { opacity: 0.5; }
  100% { transform: translate(100px, -100px) rotate(360deg); opacity: 0; }
}

/* ================= SECCIÓN DE CARACTERÍSTICAS ================= */
.features-section {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.25rem;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(88, 229, 75, 0.35);
}

.feature-card-icon {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 2px;
  flex-shrink: 0;
}

.feature-card-body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.feature-card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.8rem;
  }
  .hero-section {
    padding: 4rem 1.5rem;
  }
  .hero-cta-btn {
    width: 100%;
    min-width: unset;
  }
}

/* ================= LANDING PAGE SECTIONS ================= */

/* Override main content max-width for full-bleed sections */
.lp-main {
  padding: 0;
  max-width: 100%;
}

/* Pill badge */
.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(58, 167, 255, 0.1);
  border: 1px solid rgba(58, 167, 255, 0.3);
  color: #3AA7FF;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

/* --- HERO --- */
.lp-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  text-align: left;
}

.lp-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
}

.lp-hero h1 .lp-blue, .lp-blue {
  color: #3AA7FF !important;
}

.lp-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.lp-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.lp-btn-main {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  background: #3AA7FF;
  color: #fff;
  transition: background 0.2s ease;
}

.lp-btn-main:hover {
  background: #1C65E5;
}

.lp-btn-ghost {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  background: transparent;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.lp-btn-ghost:hover {
  border-color: rgba(58, 167, 255, 0.4);
  background: rgba(58, 167, 255, 0.05);
}

/* --- ABOUT --- */
.lp-about {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.lp-about h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 1.25rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.lp-about p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.lp-about strong {
  color: var(--text-main);
}

/* --- WHY --- */
.lp-why {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  border-top: 1px solid var(--border-color);
}

.lp-why-left h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.lp-why-left p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.lp-why-left strong {
  color: var(--text-main);
}

.lp-why-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lp-why-card {
  background: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lp-why-icon {
  width: 40px;
  height: 40px;
  background: rgba(58, 167, 255, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3AA7FF;
  font-size: 1rem;
  flex-shrink: 0;
}

.lp-why-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.lp-why-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- HOW IT WORKS --- */
.lp-how {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.lp-how h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2.5rem;
}

.lp-how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: left;
}

.lp-step {
  background: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.lp-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.lp-step-icon {
  width: 44px;
  height: 44px;
  background: rgba(58, 167, 255, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3AA7FF;
  font-size: 1.1rem;
}

.lp-step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--border-color);
  line-height: 1;
}

.lp-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.lp-step p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- CTA BANNER --- */
.lp-cta-banner {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 3.5rem 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(88, 229, 75, 0.08) 0%, transparent 70%),
              var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.lp-cta-heart {
  font-size: 1.5rem;
  color: #58E54B;
  margin-bottom: 1rem;
  display: block;
}

.lp-cta-banner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.lp-cta-banner p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 900px) {
  .lp-why {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .lp-how-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .lp-hero h1 {
    font-size: 2.2rem;
  }
  .lp-why-cards {
    grid-template-columns: 1fr;
  }
}

/* ================= MODAL DE MODS ================= */
.mod-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mod-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mod-modal {
  background-color: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  padding: 2.5rem 2rem 2rem;
}

.mod-modal-overlay.active .mod-modal {
  transform: translateY(0);
}

.mod-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s;
}

.mod-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.light-theme .mod-modal-close {
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .mod-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.modal-mod-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-mod-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

.modal-mod-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.modal-mod-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.modal-mod-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.light-theme .modal-meta-item {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ================= MENÚ USUARIO (AUTH) ================= */
.user-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

body.light-theme .user-menu-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.user-menu-logout:hover {
  background-color: rgba(255, 77, 77, 0.08) !important;
}

/* ================= PIE DE PÁGINA ================= */
.main-footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 3rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-col-brand {
  padding-right: 3rem;
}

.footer-logo-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.footer-logo {
  width: 54px;
  height: 54px;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.footer-disclaimer {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.footer-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links li a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links li a:hover {
  color: #aeb8cc;
}

/* Responsividad básica para el footer */
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .footer-col-brand {
    grid-column: span 2;
    padding-right: 0;
  }
}

@media (max-width: 500px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  .footer-col-brand {
    grid-column: span 1;
  }
}

/* ================= CONTENIDO TIPO ARTÍCULO ================= */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.article-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.8rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.article-mini-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.btn-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 0.5rem;
}

.btn-link:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Botón especial destacado para schematics */
.btn-link.btn-highlight {
  background: linear-gradient(135deg, #3AA7FF 0%, #1C65E5 100%);
  padding: 1rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(28, 101, 229, 0.4);
  border: 2px solid #3AA7FF;
}

.btn-link.btn-highlight:hover {
  background: linear-gradient(135deg, #4fb3ff 0%, #2574ff 100%);
  box-shadow: 0 6px 20px rgba(28, 101, 229, 0.6);
  transform: translateY(-3px);
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}

.article-intro {
  font-size: 1.1rem !important;
  line-height: 1.4 !important;
  color: var(--text-main) !important;
  margin-bottom: 0 !important;
  display: block;
}

.article-content strong {
  color: var(--text-main);
  font-weight: 600;
}

.article-list {
  margin: 1.5rem 0 2rem 2rem;
  list-style-type: none; /* Quitamos la viñeta por defecto */
}

.article-list li {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-muted);
  position: relative;
}

.article-list li::before {
  content: "→";
  position: absolute;
  left: -1.8rem;
  color: var(--primary-blue);
  font-weight: 700;
}

/* ================= PÁGINA DE TICKETS ================= */
.ticket-page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 0;
}

.ticket-page-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: var(--element-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-blue);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Fix para iconos de fecha en temas claro/oscuro */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1); /* Blanco por defecto (oscuro) */
  cursor: pointer;
  opacity: 0.6;
}

body.light-theme input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0); /* Negro en tema claro */
}

/* Cookie Banner (Minecraft Cookie Style) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #121212;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  z-index: 9999;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Inter", sans-serif;
  border-top: 1px solid #333;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.cookie-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.cookie-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cookie-text h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.cookie-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #bbbbbb;
  font-weight: 400;
  line-height: 1.4;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cookie-btn {
  background-color: #00ff00; /* Verde Minecraft neón */
  color: #000000;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-btn-secondary {
  background-color: transparent;
  color: #888888;
  border: 1px solid #444;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-btn:hover {
  background-color: #00e600;
  transform: scale(1.02);
}

.cookie-btn-secondary:hover {
  border-color: #666;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.cookie-btn:active, .cookie-btn-secondary:active {
  transform: scale(0.96);
}

/* Responsive para móviles */
@media (max-width: 850px) {
  .cookie-banner {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
    text-align: center;
  }

  .cookie-content {
    flex-direction: column;
    gap: 1rem;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-btn {
    flex: 1;
  }
}

/* ================= PROFILE DROPDOWN ================= */
.profile-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  width: max-content;
  min-width: 240px;
  background-color: var(--dropdown-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.8rem;
  margin-top: 10px;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 101;
}

.profile-dropdown-content::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.profile-dropdown-wrapper:hover .profile-dropdown-content,
.profile-dropdown-wrapper:focus-within .profile-dropdown-content {
  display: flex;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  border-radius: 8px;
  transition:
    background-color 0.2s,
    color 0.2s;
  font-weight: 500;
}

.profile-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
.light-theme .profile-dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.profile-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.1s,
    background-color 0.2s;
  width: 100%;
}

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

.prof-btn-green {
  background-color: #58e54b;
  color: #0b101a;
  margin-bottom: 0.2rem;
}
.prof-btn-green:hover {
  background-color: #4cd640;
}

.prof-btn-red {
  background-color: #e54b4b;
  color: #ffffff;
  margin-top: 0.2rem;
}
.prof-btn-red:hover {
  background-color: #d64040;
}

.user-profile-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.user-profile-box:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.light-theme .user-profile-box {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}
.light-theme .user-profile-box:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

/* ================= GLOWING 3D SPHERE ================= */
#canvas-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas-container canvas {
    display: block;
}

.sphere-instructions {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Override for sphere page - remove default body styles */
body.sphere-page {
    background: #0a0a0f;
    overflow: hidden;
}

body.sphere-page .main-header,
body.sphere-page .main-footer {
    display: none;
}

body.sphere-page .main-content {
    margin: 0;
    padding: 0;
}

.sphere-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    font-size: 18px;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
}

/* ============================================
   COOKIE CONSENT BANNER (MODERN & DISCREET)
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    max-width: 450px;
    background: rgba(22, 30, 47, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    z-index: 99999;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(150%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

body.light-theme .cookie-banner {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cookie-banner-text h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cookie-banner-text h3::before {
    content: "🍪";
    font-size: 1.2rem;
}

body.light-theme .cookie-banner-text h3 {
    color: #0f172a;
}

.cookie-banner-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.cookie-btn-accept {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.cookie-btn-accept:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

body.light-theme .cookie-btn-reject:hover {
    background: rgba(0, 0, 0, 0.03);
    color: #0f172a;
}

@media (max-width: 500px) {
    .cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}
/* Styles for schematic rows in profile */
.schematic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--element-bg);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.version-badge {
    background: var(--border-color);
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* MODAL DETALLES */
.detalle-modal-content {
    animation: modalScaleUp 0.3s ease-out;
}

@keyframes modalScaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.btn-download-big:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}