/* Importar fuentes modernas */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f0f23 100%);
  background-attachment: fixed;
  color: #e0e0e0;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  padding-top: 2rem;
  position: relative;
  z-index: 1;
}

/* Header y Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 0 2rem;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #bb86fc 0%, #03dac6 50%, #ff6b6b 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #b0b0b0;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

/* Search Bar Moderna */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto 3rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3.5rem;
  border: none;
  border-radius: 50px;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.2);
  color: #e0e0e0;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
  outline: none;
  border-color: #bb86fc;
  box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.search-input::placeholder {
  color: #888;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #bb86fc;
  font-size: 1.1rem;
}

/* Typography */
h1, h2, h3 {
  color: #bb86fc;
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.6rem;
}

/* Card Styles - Diseño Glassmorphism Profesional */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.card {
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.1);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  height: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #bb86fc, #03dac6, #ff6b6b);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 60px rgba(187, 134, 252, 0.15), 0 0 0 1px rgba(187, 134, 252, 0.2);
  border-color: rgba(187, 134, 252, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-image-container {
  position: relative;
  overflow: hidden;
  height: 240px;
}

.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.1) 0%, rgba(3, 218, 198, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-body {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.info-badge {
  background: rgba(187, 134, 252, 0.1);
  border: 1px solid rgba(187, 134, 252, 0.2);
  color: #bb86fc;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

.card-text {
  color: #b0b0b0;
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

/* Button Styles - Diseño Premium */
.button-container {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.btn {
  border-radius: 16px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 140px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #bb86fc 0%, #9c27b0 100%);
  color: #fff;
  box-shadow: 0 8px 25px rgba(187, 134, 252, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(187, 134, 252, 0.4);
  background: linear-gradient(135deg, #c792ff 0%, #ab47bc 100%);
}

.btn-success {
  background: linear-gradient(135deg, #03dac6 0%, #00bcd4 100%);
  color: #000;
  box-shadow: 0 8px 25px rgba(3, 218, 198, 0.3);
  font-weight: 700;
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(3, 218, 198, 0.4);
  background: linear-gradient(135deg, #26ede0 0%, #26c6da 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-width: 120px;
}

/* Updates Section - Estilo Mejorado */
.card-footer {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(187, 134, 252, 0.1);
  padding: 1.5rem 2rem;
}

.toggle-updates {
  width: 100%;
  margin-bottom: 1rem;
}

.update-list {
  color: #03dac6;
  margin-top: 1rem;
}

.update-list h6 {
  color: #bb86fc;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.update-list ul {
  list-style: none;
  padding: 0;
}

.update-list li {
  background: rgba(187, 134, 252, 0.05);
  border: 1px solid rgba(187, 134, 252, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.update-list li strong {
  color: #fff;
  font-weight: 600;
}

/* Secciones de Contenido */
.content-section {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.1);
  border-radius: 24px;
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.content-section h2 {
  background: linear-gradient(135deg, #bb86fc 0%, #03dac6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
}

.security-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: rgba(187, 134, 252, 0.05);
  border: 1px solid rgba(187, 134, 252, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(187, 134, 252, 0.2);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #bb86fc;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature-description {
  color: #b0b0b0;
  font-size: 0.9rem;
}

/* DMCA Section - Estilo Profesional */
.dmca-toggle {
  text-align: center;
  margin: 3rem 0;
}

.btn-toggle {
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.1) 0%, rgba(3, 218, 198, 0.1) 100%);
  border: 1px solid rgba(187, 134, 252, 0.2);
  color: #bb86fc;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.btn-toggle:hover {
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.2) 0%, rgba(3, 218, 198, 0.2) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(187, 134, 252, 0.2);
}

#dmca-section {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.1);
  border-radius: 24px;
  padding: 3rem;
  margin: 2rem 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#dmca-section a {
  color: #03dac6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

#dmca-section a:hover {
  color: #26ede0;
  text-decoration: underline;
}

/* Footer - Diseño Moderno */
.footer {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.8) 0%, rgba(15, 15, 35, 0.9) 100%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(187, 134, 252, 0.1);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #bb86fc, #03dac6, #bb86fc, transparent);
}

.footer p {
  color: #b0b0b0;
  margin: 0;
  text-align: center;
  font-weight: 500;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(187, 134, 252, 0.1);
  border-top: 3px solid #bb86fc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design Profesional */
@media (max-width: 1200px) {
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
  }
  
  .stats-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .search-container {
    max-width: 90%;
  }
  
  .filters-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-group {
    justify-content: center;
  }
  
  .filter-btn {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
  }
  
  .sort-select {
    min-width: 250px;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .games-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .content-section {
    padding: 2rem;
    margin: 2rem 0;
  }
  
  .security-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .button-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn {
    width: 100%;
    margin: 0;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .feature-icon {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .search-input {
    padding: 0.8rem 1rem 0.8rem 3rem;
  }
  
  .card-image-container {
    height: 200px;
  }
  
  .content-section {
    padding: 1.5rem;
  }
  
  .card-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .info-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
  
  .filter-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
}

/* Scroll personalizado */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #bb86fc, #03dac6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #c792ff, #26ede0);
}

/* Utilidades */
.text-gradient {
  background: linear-gradient(135deg, #bb86fc 0%, #03dac6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-effect {
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.1);
}

/* Eliminamos estilos obsoletos */
.card-deck {
  display: none;
}

.card-deck .col-md-4 {
  display: none;
}

/* Stats Container */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #bb86fc, #03dac6);
  transform: translateX(-100%);
  animation: slideIn 2s ease-out 0.5s forwards;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(187, 134, 252, 0.4);
  box-shadow: 0 10px 30px rgba(187, 134, 252, 0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #bb86fc 0%, #03dac6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  color: #b0b0b0;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Filters Container */
.filters-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.2);
  color: #b0b0b0;
  padding: 0.75rem 1.25rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  border-color: rgba(187, 134, 252, 0.4);
  color: #bb86fc;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #bb86fc 0%, #9c27b0 100%);
  border-color: #bb86fc;
  color: #fff;
  box-shadow: 0 5px 20px rgba(187, 134, 252, 0.3);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-select {
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.2);
  color: #e0e0e0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.sort-select:focus {
  outline: none;
  border-color: #bb86fc;
  box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

.sort-select option {
  background: #1e1e1e;
  color: #e0e0e0;
  padding: 0.5rem;
}

/* Games Counter */
.games-counter {
  text-align: center;
  margin: 1rem 0 2rem;
  padding: 0.75rem 1.5rem;
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(187, 134, 252, 0.1);
  border-radius: 50px;
  display: inline-block;
  margin-left: 50%;
  transform: translateX(-50%);
  font-weight: 500;
  color: #b0b0b0;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}