/* --- Fuentes y Base --- */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #111827; /* Fondo base oscuro */
  color: #d1d5db; /* Color de texto base gris claro */
  overflow-x: hidden; /* Evitar scroll horizontal */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: #f3f4f6; /* Títulos más claros */
}

/* --- Efecto Glassmorphism Mejorado --- */
.glass-section {
  background: rgba(26, 32, 44, 0.6); /* Fondo glass más oscuro y menos transparente */
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-radius: 1rem; /* Bordes más redondeados */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil */
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); /* Sombra más pronunciada */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.35);
}

.glass-header {
  background: rgba(17, 24, 39, 0.75); /* Header más opaco */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- Botones Mejorados --- */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Full rounded */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0, 0.2);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0, 0.3);
}
.btn:active {
    transform: translateY(0px);
    box-shadow: 0 3px 8px rgba(0,0,0, 0.25);
}

.btn-connect {
    background-image: linear-gradient(to right, #fcd34d, #fbbf24, #f59e0b); /* Amarillo/Naranja */
    color: #1f2937; /* Texto oscuro */
}
.btn-connect:hover { background-image: linear-gradient(to right, #fbbf24, #f59e0b, #d97706); }

.btn-approve {
    background-image: linear-gradient(to right, #34d399, #10b981, #059669); /* Verde */
    color: #ffffff;
}
.btn-approve:hover { background-image: linear-gradient(to right, #10b981, #059669, #047857); }

.btn-invest {
    background-image: linear-gradient(to right, #fbbf24, #f59e0b, #d97706); /* Naranja/Amarillo */
    color: #111827; /* Texto oscuro */
}
.btn-invest:hover { background-image: linear-gradient(to right, #f59e0b, #d97706, #b45309); }

.btn-secondary {
    background-image: linear-gradient(to right, #60a5fa, #3b82f6, #2563eb); /* Azul */
    color: #ffffff;
}
.btn-secondary:hover { background-image: linear-gradient(to right, #3b82f6, #2563eb, #1d4ed8); }

.btn-claim {
    background-image: linear-gradient(to right, #4ade80, #22c55e, #16a34a); /* Verde más brillante */
    color: #1f2937;
}
.btn-claim:hover { background-image: linear-gradient(to right, #22c55e, #16a34a, #15803d); }
.btn-claim:disabled {
    background-image: linear-gradient(to right, #6b7280, #4b5563);
    color: #d1d5db;
    cursor: not-allowed;
}

/* --- Glow Effect --- */
.glow {
  color: #f59e0b; /* Color naranja/amarillo */
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.6), 0 0 16px rgba(245, 158, 11, 0.4);
}
.shadow-glow { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2); }

/* --- Number Balls (Visualización de números) --- */
.number-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fde68a, #facc15); /* Degradado amarillo */
  color: #422006; /* Marrón oscuro */
  font-weight: 700;
  font-size: 1rem;
  margin: 3px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 -2px 3px rgba(0,0,0,0.1);
  animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
  opacity: 0;
  transform: scale(0.5);
}
.number-ball.mini { /* Versión más pequeña para listas */
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    margin: 2px;
}
.number-display-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 44px; /* Altura mínima para evitar saltos */
    padding: 5px;
    background-color: rgba(0,0,0,0.15);
    border-radius: 0.5rem;
}

/* --- Animaciones --- */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-15deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.fade-in {
  animation: fadeInAnimation 0.8s ease-out forwards;
  opacity: 0;
}
@keyframes fadeInAnimation {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Loader Animación --- */
.loader {
  border: 6px solid #4b5563; /* Borde gris */
  border-top: 6px solid #f59e0b; /* Borde naranja */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Modales --- */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 50; /* Encima de todo */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 20, 0.85); /* Fondo oscuro semi-transparente */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center; /* Centrado vertical */
  justify-content: center; /* Centrado horizontal */
}
.modal.active {
  display: flex; /* Mostrar cuando está activo */
  opacity: 1;
}
.modal-content {
    animation: zoomIn 0.3s ease-out;
}
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* --- Tarjetas y Componentes Específicos --- */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    transition: background-color 0.3s ease;
}
.stat-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.stat-value {
    font-size: 1.5rem; /* Tamaño del valor */
    font-weight: 700;
    color: #ffffff;
    margin-top: 0.25rem;
    margin-bottom: 0.1rem;
}
.stat-label {
    font-size: 0.75rem; /* Tamaño de la etiqueta */
    color: #9ca3af; /* Color gris */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.group-card {
    border-left-width: 4px;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.group-card:hover {
    transform: translateY(-4px);
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.investment-item, .winner-item {
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    border-left: 3px solid transparent; /* Borde inicial transparente */
    transition: background-color 0.3s ease, border-left-color 0.3s ease;
}
.investment-item:hover, .winner-item:hover {
    background-color: rgba(0, 0, 0, 0.3);
}
.investment-group.text-yellow-400 ~ .investment-item { border-left-color: #f59e0b; }
.investment-group.text-blue-400 ~ .investment-item { border-left-color: #3b82f6; }
.investment-group.text-pink-400 ~ .investment-item { border-left-color: #ec4899; }

.winner-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.winner-info { flex-grow: 1; }
.winner-address { font-family: monospace; font-size: 0.9rem; color: #a5b4fc; margin-bottom: 4px;}
.winner-numbers .number-ball { width: 24px; height: 24px; font-size: 0.75rem; margin: 1px;}
.winner-reward { font-size: 1.1rem; font-weight: 700; color: #4ade80; white-space: nowrap; }

/* --- Inputs y Formularios --- */
.input-label {
    display: block;
    color: #d1d5db; /* Gris claro */
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.input-field {
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #f3f4f6; /* Texto claro */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease, background-color 0.3s ease;
    font-weight: 500;
}
.input-field::placeholder {
    color: #6b7280; /* Gris oscuro para placeholder */
}
.input-field:focus {
    outline: none;
    border-color: #f59e0b; /* Borde naranja al enfocar */
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); /* Anillo de foco sutil */
}
select.input-field {
    appearance: none; /* Quitar estilo nativo */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.7rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem; /* Espacio para el icono */
}
select.input-field option {
    background-color: #1f2937; /* Fondo oscuro para opciones */
    color: #f3f4f6;
}


/* --- Elementos Flotantes Decorativos --- */
.floating-element {
    position: absolute;
    z-index: 1; /* Detrás del contenido principal */
    pointer-events: none; /* No interferir con clicks */
    opacity: 0.3; /* Menos intrusivos */
    animation: float 15s ease-in-out infinite;
}
.floating1 {
    width: 150px;
    height: auto;
    top: 20%;
    left: 5%;
}
.floating2 {
    width: 120px;
    height: auto;
    bottom: 15%;
    right: 8%;
    animation-delay: 3s; /* Desfase en animación */
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-25px) translateX(15px) rotate(10deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
}

/* --- Carrusel --- */
.hero-carousel { position: relative; }
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 0.3rem;
    transition: background-color 0.3s ease;
}
.carousel-control:hover { background-color: rgba(0, 0, 0, 0.6); }
.carousel-control.prev { left: 1rem; }
.carousel-control.next { right: 1rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .stat-value { font-size: 1.25rem; }
    .stat-label { font-size: 0.7rem; }
    .floating-element { display: none; } /* Ocultar flotantes en móvil */
}

/* --- Social Icons --- */
.social-icon img {
    transition: transform 0.3s ease;
}
.social-icon:hover img {
    transform: scale(1.2);
}

/* Estilos base comunes */
.nav-link {
  background-size: 200% auto;
  background-position: right center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid transparent;
}

.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-position: left center;
}

/* Estilos individuales */
.link-1 {
  background-image: linear-gradient(
    to right,
    #3b82f6 0%,
    #6366f1 50%,
    #3b82f6 100%
  );
  color: #fff;
}

.link-2 {
  background-image: linear-gradient(
    to right,
    #10b981 0%,
    #059669 50%,
    #10b981 100%
  );
  color: #fff;
}

.link-3 {
  background-image: linear-gradient(
    to right,
    #ce1a26 0%,
    #c15b5b 50%,
    #ce1a26 100%
  );
  color: #fff;
}

/* Efecto hover para móvil */
@media (hover: hover) {
  .nav-link:hover {
    background-position: left center;
  }
}

/* En tu CSS global */
.btn-connect span {
  white-space: nowrap;
}


@media (max-width: 768px) {
  .mobile-hidden {
    display: none !important;
  }
  
  header {
    padding: 12px 16px;
  }
  
  #accountBar {
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
  }
  
  #usdtBalance {
    font-size: 0.75rem;
    padding: 2px 6px;
  }
  
  .btn-connect {
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
  
  img.logo {
    height: 32px !important;
  }
}