:root {
  --primary-gradient: linear-gradient(135deg, #101010 0%, #d8dde4 100%);
  --secondary-gradient: linear-gradient(135deg, #808080 0%, #5a7a9f 100%);
  --primary-color: #6b8bb5; /* Azul menos saturado */
  --secondary-color: #787878; /* Reemplaza al blanco puro */
  --accent-color: #8fb7d8; /* Azul pastel más suave */
  --highlight-color: #f4b4b4; /* Rosa pastel más apagado */
  --text-color: #989898; /* Gris más suave que negro */
  --text-muted: #ffffff;
  --background-light: #181818; /* Gris muy claro azulado */
  --background-card: #282828; /* Fondo más suave que blanco puro */
  --dark-bg: #2d3748; /* Referencial para transición al dark */
  --dark-card: #3a4a61;
  --button-bg: #6b8bb5;
  --button-hover: #5a7a9f;
  --border-color: #d1d7e0;
  --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 12px;
  --transition-fast: all 0.2s ease;
  --transition-medium: all 0.3s ease;
  --transition-slow: all 0.8s ease;
  --max-content-width: 1200px;
}

/* ====== RESET Y ESTILOS BASE ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====== ANIMACIONES ====== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInFromTop {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  font-family: 'IBM Plex Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background: var(--background-light);
  color: var(--text-color);
  transition: var(--transition-slow);
  overflow-x: hidden;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: fadeIn 1s forwards;
}

/* ====== HEADER ====== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #121920;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-dark);
  animation: slideInFromTop 0.8s ease-out;
  transition: background 0.5s ease;
  width: 100%;
}

.logo-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-img {
  height: 50px;
  width: auto;
  transition: var(--transition-medium);
}

.header-title {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
  display: none;
}

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

.checked_dark {
  display: flex;
  align-items: center;
}

/* ====== TOGGLE TEMA ====== */
#toggle {
  display: none;
}

#label_toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-medium);
  background-color: var(--secondary-color);
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-fast);
  border: 1px solid var(--border-color);
}

#label_toggle:hover {
  background-color: var(--accent-color);
  color: white;
  transform: scale(1.05);
}

/* ====== HERO SECTION ====== */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('/api/placeholder/1200/600');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 6rem 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s forwards 0.3s;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-button {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-medium);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-medium);
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  z-index: -1;
  transition: width 0.3s ease;
}

.hero-button.primary {
  background-color: var(--button-bg);
  color: white;
}

.hero-button.primary:hover {
  background-color: var(--button-hover);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hero-button.primary:hover::before {
  width: 100%;
}

.hero-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.hero-button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ====== CONTENEDOR PRINCIPAL ====== */
.index-container {
  max-width: var(--max-content-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s forwards 0.5s;
}

/* ====== SECCIONES ====== */
.section {
  background: var(--background-card);
  border-radius: var(--radius-medium);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-dark);
  border: 1px solid var(--border-color);
  transition: var(--transition-medium);
  animation: slideInFromBottom 0.8s forwards;
  opacity: 0;
  transform: translateY(50px);
  animation-delay: calc(var(--order, 0) * 0.1s);
}

.featured-section {
  border-top: 4px solid var(--primary-color);
}

.section:nth-child(1) { --order: 1; }
.section:nth-child(2) { --order: 2; }
.section:nth-child(3) { --order: 3; }
.section:nth-child(4) { --order: 4; }
.section:nth-child(5) { --order: 5; }
.section:nth-child(6) { --order: 6; }

.section:hover {
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.section h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section h3 i {
  color: var(--accent-color);
}

.section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

/* ====== TARJETAS DE CATEGORÍAS ====== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(109, 157, 197, 0.1);
  border-radius: var(--radius-medium);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition-medium);
  border: 1px solid transparent;
}

.category-card:hover {
  background-color: rgba(109, 157, 197, 0.2);
  transform: translateY(-3px);
  border-color: var(--accent-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-card i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 0.8rem;
}

.category-card span {
  font-weight: 500;
  font-size: 0.9rem;
}

/* ====== AVATARES DEL EQUIPO ====== */
.team-avatars {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--button-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: var(--transition-medium);
}

.avatar:hover {
  transform: scale(1.1);
  background-color: var(--accent-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ====== LISTA DE CARACTERÍSTICAS ====== */
.feature-list {
  list-style-type: none;
  margin-left: 0;
}

.feature-list li {
  margin: 1.2rem 0;
  padding: 1rem;
  border-radius: var(--radius-small);
  background: rgba(109, 157, 197, 0.05);
  transition: var(--transition-fast);
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border-left: 3px solid transparent;
}

.feature-list li i {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-top: 0.2rem;
}

.feature-list li h4 {
  margin-bottom: 0.3rem;
  color: var(--text-color);
}

.feature-list li p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.feature-list li:hover {
  border-left: 3px solid var(--accent-color);
  background: rgba(109, 157, 197, 0.1);
  transform: translateX(5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ====== TARJETAS DE FUNCIONALIDADES ====== */
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  margin-bottom: 1rem;
  background-color: rgba(109, 157, 197, 0.05);
  border-radius: var(--radius-medium);
  transition: var(--transition-medium);
}

.feature-card:hover {
  background-color: rgba(109, 157, 197, 0.1);
  transform: translateX(5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  background-color: var(--button-bg);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.feature-content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.feature-content p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ====== PRIVACIDAD BADGE ====== */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background-color: rgba(109, 157, 197, 0.15);
  border-radius: var(--radius-medium);
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 1rem;
}

.privacy-badge i {
  color: #2ecc71;
  font-size: 1.1rem;
}

/* ====== IMÁGENES EN SECCIONES ====== */
.section-image {
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius-medium);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-medium);
}

.section-image:hover img {
  transform: scale(1.03);
}

/* ====== BOTONES ====== */
.button-container {
  display: flex;
  gap: 0.8rem;
}

.index-buttons {
  display: inline-flex;
  align-items: center;
  background-color: var(--button-bg);
  border-radius: var(--radius-small);
  transition: var(--transition-fast);
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
}

.index-buttons::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  z-index: -1;
  transition: width 0.3s ease;
}

.index-buttons a {
  color: white;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.index-buttons:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(91, 125, 177, 0.4);
  background-color: var(--button-hover);
}

.index-buttons:hover::before {
  width: 100%;
}

.login-btn {
  background-color: transparent;
  border: 1px solid var(--secondary-color);
}

.login-btn a {
  color: var(--primary-color);
}

.login-btn:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
}

.login-btn:hover a {
  color: white;
}

.register-btn {
  background-color: transparent;
  border: 1px solid var(--secondary-color);
}

.register-btn a {
  color: var(--primary-color);
}

.register-btn:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
}

.register-btn:hover a {
  color: white;
}

/* ====== FOOTER ====== */
footer {
  background-color: #121920;
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 3rem;
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-logo span {
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #a0aec0;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.2rem;
  transition: var(--transition-medium);
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.copyright {
  max-width: var(--max-content-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #a0aec0;
  font-size: 0.9rem;
}

/* ====== MODO OSCURO ====== */
body.dark {
  --primary-gradient: linear-gradient(135deg, #1a1b1e 0%, #0a0a0a 100%);
  --secondary-gradient: linear-gradient(135deg, #2a2d3a 0%, #1e1e1e 100%);
  --primary-color: #e53e3e;
  --secondary-color: #2d3748;
  --accent-color: #e53e3e;
  --background-light: #2d3748;
  --background-card: #3a4a61;
  --text-color: #f7fafc;
  --text-muted: #a0aec0;
  --button-bg: #e53e3e;
  --button-hover: #c53030;
  --border-color: #2d3748;
  --shadow-dark: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.dark header {
  background-color: rgba(26, 32, 44, 0.9);
  border-bottom: 1px solid var(--border-color);
}

body.dark .section-image {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark .category-card {
  background-color: rgba(66, 153, 225, 0.1);
}

body.dark .category-card:hover {
  background-color: rgba(66, 153, 225, 0.15);
}

body.dark .feature-list li {
  background: rgba(66, 153, 225, 0.08);
}

body.dark .feature-list li:hover {
  background: rgba(66, 153, 225, 0.15);
}

body.dark .feature-card {
  background-color: rgba(66, 153, 225, 0.08);
}

body.dark .feature-card:hover {
  background-color: rgba(66, 153, 225, 0.15);
}

body.dark .privacy-badge {
  background-color: rgba(66, 153, 225, 0.15);
  color: #63b3ed;
}

body.dark #label_toggle {
  background-color: #4a5568;
  color: #e2e8f0;
}

body.dark #label_toggle:hover {
  background-color: #2b6cb0;
}

body.dark .login-btn {
  border-color: #63b3ed;
}

body.dark .login-btn a {
  color: #63b3ed;
}

body.dark footer {
  background-color: #0f172a;
}

/* ====== MEDIA QUERIES ====== */
@media (min-width: 768px) {
  .header-title {
    display: block;
  }
  
  .index-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #resumen-proyecto {
    grid-column: span 2;
  }
  
  #menciones-destacadas {
    grid-column: span 2;
  }
  
  .section h3 {
    font-size: 1.5rem;
  }
  
  .hero-content h1 {
    font-size: 3.5rem;
  }
  
  .footer-content {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .index-container {
    grid-template-columns: repeat(3, 1fr);
  }
  
  #resumen-proyecto {
    grid-column: span 3;
  }
  
  #menciones-destacadas {
    grid-column: span 3;
  }
  
  #comunidades {
    grid-column: span 2;
  }
  
  #acciones-permitidas {
    grid-column: 3 / 4;
    grid-row: 3 / 5;
  }
  
  #personalizacion-seguridad {
    grid-column: 1 / 2;
    grid-row: 4;
  }
  
  #privacidad {
    grid-column: 2 / 3;
    grid-row: 4;
  }
  
  .hero-section {
    padding: 8rem 1rem;
  }
  
  .hero-content h1 {
    font-size: 4rem;
  }
  
  .hero-content p {
    font-size: 1.3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .feature-list li {
    padding: 1.2rem;
  }
  
  .section {
    padding: 2.5rem;
  }
}

@media (max-width: 840px) {
  header {
    padding: 0.8rem 1rem;
  }
  
  .hero-section {
    padding: 4rem 1rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .section {
    padding: 1.5rem;
  }
  
  .index-container {
    margin: 1rem auto;
    padding: 0 1rem;
  }
}

@media (max-width: 600px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-button {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    padding: 0.7rem;
    gap: 0.5rem;
  }
  
  .hero-section {
    padding: 3rem 1rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .section h3 {
    font-size: 1.2rem;
  }
  
  .index-container {
    gap: 1rem;
  }
}