/* Tournaments Page Styles */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tournaments-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 4rem 2rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.tournaments-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 4rem;
  animation: cardFadeIn 1s ease-out;
}

.tournaments-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ffffff 0%, #b0b8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out, glow 3s ease-in-out 1s infinite;
}

.tournaments-subtitle {
  max-width: 1100px;
  font-size: 1.05rem;
  color: #d0d8e8;
  font-weight: 300;
  letter-spacing: 0.03em;
  animation: fadeInUp 1s ease-out;
  animation-delay: 0.2s;
  animation-fill-mode: both;
  margin-bottom: .5rem;
}

.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.tournament-card {
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 200, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  animation: cardFadeIn 1s ease-out;
  animation-fill-mode: both;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.tournament-card:hover {
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow: 0 0 30px rgba(100, 200, 255, 0.3), 
              inset 0 0 30px rgba(100, 200, 255, 0.1);
  transform: translateY(-10px);
}

.tournament-slider-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
}

.tournament-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-track {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.slider-item {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.slider-item.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.slider-item:hover .slider-image {
  transform: scale(1.05);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(100, 200, 255, 0.3);
  border: 1px solid rgba(100, 200, 255, 0.5);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.3s ease;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.slider-btn:hover {
  background: rgba(100, 200, 255, 0.6);
  box-shadow: 0 0 15px rgba(100, 200, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.slider-prev {
  left: 15px;
}

.slider-next {
  right: 15px;
}

.slider-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.indicator.active {
  background: rgba(100, 200, 255, 0.8);
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.6);
  transform: scale(1.3);
}

.tournament-info {
  padding: 2rem;
  background: rgba(10, 14, 39, 0.8);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.tournament-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.tournament-description {
  font-size: 0.95rem;
  color: #b0b8d8;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.tournament-links {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.tournament-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(150, 100, 255, 0.2));
  border: 1px solid rgba(100, 200, 255, 0.4);
  border-radius: 25px;
  color: #a0d8ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tournament-link:hover {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.4), rgba(150, 100, 255, 0.4));
  border-color: rgba(100, 200, 255, 0.8);
  box-shadow: 0 0 20px rgba(100, 200, 255, 0.4);
  transform: translateY(-2px);
}

.tournaments-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 0 0 20px 20px;
}

.link-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.credits, .links {
  background: rgba(100, 200, 255, 0.1);
  border-left: 3px solid rgba(100, 200, 255, 0.6);
  padding: 1rem;
  border-radius: 8px;
}

.credits-title, .links-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #a0d8ff;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.credits-text,.links-text {
  font-size: 1rem;
  color: #b0b8d8;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.credits-text-link {
  text-decoration: none;
  color: #a0d8ff;
  transition: color 0.3s ease;
}

.credits-text-link:hover {
  color: #ffffff;
}

.links-title {
  margin-bottom: 0.8rem;
}

.links-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.links-text-link {
  text-decoration: none;
  color: #a0d8ff;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.links-text-link:hover {
  color: #ffffff;
  filter: grayscale(100);
}


.back-link-container {
  text-align: center;
  animation: cardFadeIn 1s ease-out 0.5s both;
  margin-bottom: 5rem;
}

.back-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(100, 200, 255, 0.4);
  border-radius: 50px;
  color: #a0d8ff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.back-link:hover {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(150, 100, 255, 0.2));
  border-color: rgba(100, 200, 255, 0.8);
  box-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .tournaments-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .tournaments-title {
    font-size: 2.8rem;
  }

  .tournaments-container {
    padding: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  .tournaments-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tournaments-title {
    font-size: 2.2rem;
  }

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

  .tournament-name {
    font-size: 1.5rem;
  }

  .slider-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .tournaments-header {
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 480px) {
  .tournaments-container {
    padding: 1rem 0.75rem;
  }

  .tournaments-title {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
  }

  .tournaments-subtitle {
    font-size: 0.85rem;
  }

  .tournament-slider-wrapper {
    padding-bottom: 70%;
  }

  .tournament-info {
    padding: 1rem;
  }

  .tournament-name {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .tournament-description {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .slider-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  /* Optimize for reduced motion */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }

  .slider-prev {
    left: 10px;
  }

  .slider-next {
    right: 10px;
  }

  .tournament-link {
    font-size: 0.85rem;
    padding: 0.7rem 1.2rem;
  }

  .tournaments-header {
    margin-bottom: 1.5rem;
  }
}

/* Image modal (lightbox) styles */
.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  padding: 2rem;
}
.image-modal.open {
  display: flex;
}
.image-modal-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.image-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute;
  right: -75px;
  top: -40px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-close:hover {
  background: rgba(255,255,255,0.12);
}

@media (max-width: 600px) {
  .modal-close { width: 36px; height: 36px; font-size: 1.2rem; }
  .image-modal { padding: 1rem; }
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 10000;
}
.modal-nav:hover { background: rgba(255,255,255,0.12); }
.modal-prev { left: 10px; }
.modal-next { right: 10px; }

@media (max-width: 600px) {
  .modal-nav { width: 40px; height: 40px; font-size: 1.2rem; }
}
