/* Variables CSS */
:root {
  /* Colores */
  --primary: #7E57FF;
  --primary-dark: #5E35D1;
  --secondary: #FF6D3A;
  --accent: #00E5FF;
  --white: #FFFFFF;
  --black: #000000;
  
  /* Modo Claro */
  --bg-light: #F9FAFF;
  --text-light: #1A1C2E;
  --card-light: #FFFFFF;
  --border-light: rgba(0, 0, 0, 0.1);
  
  /* Modo Oscuro */
  --bg-dark: #121212;
  --text-dark: #F5F5F5;
  --card-dark: #1E1E1E;
  --border-dark: rgba(255, 255, 255, 0.1);
  
  /* Actuales (se cambian con JS) */
  --bg-color: var(--bg-light);
  --text-color: var(--text-light);
  --card-bg: var(--card-light);
  --border-color: var(--border-light);
  
  /* Otros */
  --border-radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Tipografía */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout */
.content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
  scroll-margin-top: 80px;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title p {
  color: var(--text-color);
  opacity: 0.8;
  max-width: 700px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(var(--card-bg), 0.9);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 42px;
  width: auto;
}

.logo-text {
  font-family: 'Secular One', sans-serif;
  font-size: 1.8rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
  gap: 10px;
}

.nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.nav-link:not(.highlight):hover {
  background: rgba(126, 87, 255, 0.1);
  color: var(--primary);
}

.nav-link.highlight {
  background: linear-gradient(135deg, rgba(126, 87, 255, 0.1), rgba(0, 229, 255, 0.1));
  color: var(--primary);
}

.theme-toggle {
  position: relative;
  width: 50px;
  height: 24px;
  border-radius: 50px;
  background: var(--primary);
  cursor: pointer;
  margin-left: 15px;
  display: flex;
  align-items: center;
  padding: 0 5px;
  justify-content: space-between;
  border: none;
}

.theme-toggle i {
  color: white;
  font-size: 12px;
  transition: opacity 0.3s;
}

.toggle-ball {
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  left: 3px;
  transition: transform 0.3s ease;
}

body.dark-mode .toggle-ball {
  transform: translateX(26px);
}

body.dark-mode .fa-moon {
  opacity: 0;
}

body.dark-mode .fa-sun {
  opacity: 1;
}

body:not(.dark-mode) .fa-sun {
  opacity: 0;
}

/* Hero Section */
.unturned-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--bg-dark) 100%);
  padding: 150px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 100%;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--text-color), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-features {
  list-style: none;
  margin: 30px 0;
}

.hero-features li {
  margin-bottom: 15px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-left: 35px;
}

.hero-features li:before {
  content: '';
  position: absolute;
  left: 0;
  width: 25px;
  height: 25px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f00c";
  font-size: 0.8rem;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.button-34 {
  background: var(--primary);
  border-radius: 999px;
  box-shadow: var(--primary) 0 10px 20px -10px;
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.button-34:hover {
  transform: translateY(-2px);
  box-shadow: var(--primary) 0 15px 25px -10px;
}

.button-34.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.button-34.secondary:hover {
  background: rgba(126, 87, 255, 0.1);
}

.hero-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.hero-game-image {
  max-height: 500px;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border: 5px solid var(--card-bg);
  transform: rotateY(-10deg);
  transition: transform 0.5s ease;
  object-fit: contain;
}

.hero-game-image:hover {
  transform: rotateY(0deg);
}

.rating-badge {
  position: absolute;
  bottom: -20px;
  right: 20px;
  background: var(--card-bg);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
}

.rating-badge .stars {
  color: #FFD700;
  font-size: 1.2rem;
  margin-bottom: 5px;
  display: flex;
  gap: 3px;
}

.rating-badge span {
  font-size: 0.9rem;
  font-weight: bold;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Sección de Información del Juego */
.game-info-section {
  background-color: var(--bg-color);
}

.game-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 50px;
}

.game-description h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.game-description p {
  margin-bottom: 30px;
  line-height: 1.8;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.feature-card h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.feature-card p {
  opacity: 0.9;
  line-height: 1.6;
}

.game-specs {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  height: fit-content;
}

.game-specs h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.specs-list {
  list-style: none;
  margin: 20px 0;
}

.specs-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
}

.specs-list li strong {
  min-width: 150px;
  display: inline-block;
  color: var(--primary);
}

.game-showcase {
  margin-top: 30px;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 300px;
}

/* Sección de Planes */
.plans-section {
  background: linear-gradient(to bottom, var(--bg-color), color-mix(in srgb, var(--bg-color), var(--black) 5%));
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.plan-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
}

.plan-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.plan-card.popular {
  border: 2px solid var(--primary);
}

.popular-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--primary);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 2;
}

.plan-header {
  padding: 25px;
  text-align: center;
  background: linear-gradient(135deg, rgba(126, 87, 255, 0.1), rgba(0, 229, 255, 0.1));
  border-bottom: 1px solid var(--border-color);
}

.plan-price {
  margin-top: 15px;
}

.price {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
}

.period {
  opacity: 0.8;
  font-size: 0.9rem;
}

.plan-features {
  padding: 25px;
}

.plan-features ul {
  list-style: none;
}

.plan-features li {
  padding: 10px 0;
  position: relative;
  padding-left: 30px;
}

.plan-features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.1rem;
}

.plan-button {
  display: block;
  text-align: center;
  padding: 15px;
  background: var(--primary);
  color: white;
  font-weight: bold;
  transition: var(--transition);
  margin-top: 20px;
}

.plan-button:hover {
  background: var(--primary-dark);
}

.custom-plan {
  text-align: center;
  margin-top: 50px;
  padding: 40px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.custom-plan h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

/* Sección de Tutorial */
.tutorial-section {
  background-color: var(--bg-color);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.step {
  display: flex;
  gap: 20px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.step-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.step-content p {
  opacity: 0.9;
  line-height: 1.6;
}

.video-tutorial {
  margin-top: 80px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
footer {
  background: var(--card-dark);
  padding: 50px 0 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--primary);
}

.copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Dark Mode Styles */
body.dark-mode {
  --bg-color: var(--bg-dark);
  --text-color: var(--text-dark);
  --card-bg: var(--card-dark);
  --border-color: var(--border-dark);
}

/* Selector de idioma */
.lang-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  font-family: 'Rubik', sans-serif;
}

.lang-float-container {
  position: relative;
  display: inline-block;
}

.lang-float-trigger {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 30px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-weight: 500;
  color: #333;
  border: none;
}

.lang-float-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.lang-flag {
  font-size: 1.1rem;
  margin-right: 8px;
}

.lang-code {
  font-size: 0.9rem;
}

.lang-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 10px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 140px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-float-container:hover .lang-dropdown,
.lang-float-trigger[aria-expanded="true"] + .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
}

.lang-option:hover {
  background: #f5f5f5;
}

.lang-option.active {
  background: #f0f0f0;
  font-weight: 500;
}

.lang-option .lang-flag {
  margin-right: 10px;
  font-size: 1.2rem;
}

.lang-option .lang-label {
  font-size: 0.9rem;
}

/* Dark Mode para el selector de idioma */
body.dark-mode .lang-float-trigger {
  background: rgba(30, 30, 30, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

body.dark-mode .lang-dropdown {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .lang-option {
  color: #f0f0f0;
}

body.dark-mode .lang-option:hover {
  background: #2a2a2a;
}

body.dark-mode .lang-option.active {
  background: #333;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-title {
      font-size: 2.5rem;
  }
  
  .section-title h2 {
      font-size: 2.2rem;
  }
  
  .game-details {
      grid-template-columns: 1fr;
  }
  
  .hero-grid {
      grid-template-columns: 1fr;
      text-align: center;
      gap: 30px;
  }
  
  .hero-features {
      justify-content: center;
  }
  
  .hero-buttons {
      justify-content: center;
  }
  
  .hero-game-image {
      max-height: 400px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
      display: block;
  }
  
  .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 80%;
      max-width: 300px;
      height: 100vh;
      background: var(--card-bg);
      flex-direction: column;
      padding: 80px 20px 20px;
      transition: right 0.3s ease;
      box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .nav-links.active {
      right: 0;
  }
  
  .theme-toggle {
      margin-left: 0;
      margin-top: 20px;
  }
  
  .hero-title {
      font-size: 2.2rem;
  }
  
  .hero-subtitle {
      font-size: 1.1rem;
  }
  
  .hero-game-image {
      max-height: 350px;
  }
  
  .steps-container {
      grid-template-columns: 1fr;
      gap: 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
      font-size: 2rem;
  }
  
  .hero-subtitle {
      font-size: 1rem;
  }
  
  .button-34 {
      width: 100%;
  }
  
  .section-title h2 {
      font-size: 1.8rem;
  }
  
  .hero-game-image {
      max-height: 280px;
  }
  
  .plans-grid {
      grid-template-columns: 1fr;
  }
  
  .footer-links {
      flex-direction: column;
      gap: 10px;
  }
}

/* Animaciones adicionales */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.hero-game-image {
  animation: float 6s ease-in-out infinite;
}

/* Mejoras de accesibilidad para modo oscuro */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
      --bg-color: var(--bg-dark);
      --text-color: var(--text-dark);
      --card-bg: var(--card-dark);
      --border-color: var(--border-dark);
  }
}

/* Optimización para motores de búsqueda */
img[alt]:not([alt=""]) {
  border: 1px solid transparent;
  transition: border-color 0.3s;
}

img[alt]:not([alt=""]):hover {
  border-color: var(--primary);
}

/* Mejoras de rendimiento */
img {
  max-width: 100%;
  height: auto;
}

/* Focus styles para accesibilidad */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip link para accesibilidad */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}