/* World Map Section Styles */
.worldmap {
  padding: var(--section-padding);
  background: var(--white);
  position: relative;
}

.worldmap-container {
  max-width: var(--desktop);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.worldmap-header {
  text-align: center;
  margin-bottom: 4rem;
}

.worldmap-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.worldmap-subtitle {
  color: var(--light-text);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.worldmap-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.level-card {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
  text-align: center;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.level-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color),
    var(--secondary-color)
  );
  transform: scaleX(0);
  transition: var(--transition-fast);
}

.level-card:hover::before {
  transform: scaleX(1);
}

.level-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.level-image {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--background-color), #e8e8d0);
  border-radius: var(--border-radius);
  margin: 0 auto 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.level-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(139, 69, 19, 0.1),
    rgba(210, 105, 30, 0.1)
  );
  opacity: 0;
  transition: var(--transition-fast);
}

.level-card:hover .level-image::before {
  opacity: 1;
}

.level-name {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.level-description {
  color: var(--light-text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.level-difficulty {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-color);
  color: var(--text-color);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.level-difficulty.easy {
  background: #4caf50;
  color: var(--white);
}

.level-difficulty.medium {
  background: #ff9800;
  color: var(--white);
}

.level-difficulty.hard {
  background: #f44336;
  color: var(--white);
}

.level-difficulty.expert {
  background: #9c27b0;
  color: var(--white);
}

.level-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.level-features li {
  color: var(--light-text);
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.875rem;
}

.level-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* World Map Background Pattern */
.worldmap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 20% 80%,
      rgba(139, 69, 19, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(210, 105, 30, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 215, 0, 0.02) 0%,
      transparent 50%
    );
  pointer-events: none;
}

/* World Map Animation */
.level-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.level-card:nth-child(1) {
  animation-delay: 0.1s;
}
.level-card:nth-child(2) {
  animation-delay: 0.2s;
}
.level-card:nth-child(3) {
  animation-delay: 0.3s;
}
.level-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* World Map Hover Effects */
.level-card::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-slow);
  z-index: -1;
}

.level-card:hover::after {
  width: 200px;
  height: 200px;
}

/* World Map Interactive Elements */
.worldmap-interactive {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
  border: 2px solid var(--accent-color);
}

.worldmap-interactive h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.worldmap-interactive p {
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.worldmap-cta {
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.worldmap-cta:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* World Map Focus States */
.level-card:focus-within {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

.worldmap-cta:focus {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .worldmap {
    padding: 2rem 0;
  }

  .worldmap-header {
    margin-bottom: 3rem;
  }

  .worldmap-title {
    font-size: 2rem;
  }

  .worldmap-subtitle {
    font-size: 1.125rem;
  }

  .worldmap-content {
    gap: 1.5rem;
  }

  .level-card {
    min-width: 250px;
    padding: 1.5rem;
  }

  .level-image {
    height: 60px;
    width: 60px;
    font-size: 2rem;
    margin: 0 auto 0.75rem auto;
  }

  .level-name {
    font-size: 1.25rem;
  }

  .worldmap-interactive {
    padding: 1.5rem;
    margin-top: 2rem;
  }
}

@media (max-width: 360px) {
  .worldmap {
    padding: 1.5rem 0;
  }

  .worldmap-header {
    margin-bottom: 2rem;
  }

  .worldmap-title {
    font-size: 1.75rem;
  }

  .worldmap-subtitle {
    font-size: 1rem;
  }

  .worldmap-content {
    gap: 1rem;
  }

  .level-card {
    min-width: 200px;
    padding: 1.25rem;
  }

  .level-image {
    height: 50px;
    width: 50px;
    font-size: 1.75rem;
    margin: 0 auto 0.75rem auto;
  }

  .level-name {
    font-size: 1.125rem;
  }

  .level-description {
    font-size: 0.875rem;
  }

  .level-features li {
    font-size: 0.75rem;
  }

  .worldmap-interactive {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }

  .worldmap-cta {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* World Map Loading State */
.worldmap.loading {
  opacity: 0.6;
}

.worldmap.loading .level-card {
  animation: none;
  opacity: 0.6;
}

/* World Map Theme Variations */
.worldmap.theme-dark {
  background: var(--text-color);
  color: var(--white);
}

.worldmap.theme-dark .level-card {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.worldmap.theme-dark .level-name {
  color: var(--accent-color);
}

.worldmap.theme-dark .level-description {
  color: rgba(255, 255, 255, 0.8);
}

.worldmap.theme-dark .level-features li {
  color: rgba(255, 255, 255, 0.7);
}

.worldmap.theme-dark .worldmap-interactive {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
}

/* World Map Print Styles */
@media print {
  .worldmap {
    background: white !important;
    color: black !important;
  }

  .level-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  .level-image {
    background: #f0f0f0 !important;
  }
}
