/* Tournament Page Specific Styles */

/* Tournament Hero Section */
.tournament-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-image: url("https://images.unsplash.com/photo-1542751371-adc38448a05e?w=1920&h=1080&fit=crop&crop=center");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  color: white;
  text-align: center;
}

.tournament-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.tournament-hero .hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.tournament-hero .hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tournament-hero .hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 120px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tournament Sections */
.active-tournaments,
.upcoming-tournaments {
  padding: 5rem 0;
}

.active-tournaments {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.upcoming-tournaments {
  background: #fff;
}

.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* Tournament Card */
.tournament-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid #e0e0e0;
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
}

.tournament-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
}

.badge-active {
  background: #4caf50;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-upcoming {
  background: #2196f3;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tournament-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tournament-card.active {
  border: 2px solid #4caf50;
}

.tournament-card.upcoming {
  border: 2px solid #2196f3;
}

.tournament-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tournament-title h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #333;
  line-height: 1.2;
}

.game-name {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.tournament-info {
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.info-item i {
  color: #667eea;
  width: 16px;
}

.info-item.prize {
  color: #ff9800;
  font-weight: 600;
}

.info-item.prize i {
  color: #ff9800;
}

.tournament-description {
  padding: 0 1.5rem;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tournament-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
}

.entry-fee {
  color: #666;
  font-size: 0.85rem;
}

.entry-fee strong {
  color: #333;
}

.no-tournaments {
  text-align: center;
  padding: 3rem 2rem;
  color: #666;
  grid-column: 1 / -1;
}

.no-tournaments i {
  font-size: 3rem;
  color: #ddd;
  margin-bottom: 1rem;
  display: block;
}

.no-tournaments h3 {
  font-size: 1.5rem;
  color: #333;
  margin: 0 0 1rem 0;
}

.no-tournaments p {
  color: #888;
  margin: 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.tournament-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.tournament-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

.tournament-status {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tournament-status.active {
  background: #4caf50;
  color: white;
}

.tournament-status.upcoming {
  background: #2196f3;
  color: white;
}

.tournament-status.completed {
  background: #9e9e9e;
  color: white;
}

.tournament-content {
  padding: 2rem;
}

.tournament-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

.tournament-game {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.9rem;
}

.tournament-game i {
  color: #667eea;
}

.tournament-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.detail-item i {
  color: #667eea;
  width: 16px;
}

.tournament-prize {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  padding: 1rem;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.prize-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: #333;
  margin-bottom: 0.5rem;
}

.prize-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tournament-participants {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
}

.participants-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.9rem;
}

.participants-count {
  font-weight: 600;
  color: #333;
}

.tournament-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.btn-register {
  flex: 1;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-details {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-details:hover {
  background: #667eea;
  color: white;
}

/* Additional button styles */
.btn-outline {
  background: transparent;
  color: #999;
  border: 2px solid #ddd;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: not-allowed;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.7;
}

.btn-disabled {
  background: #f5f5f5;
  color: #999;
  border: 2px solid #ddd;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: not-allowed;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.7;
}

/* Tournament Modal */
.tournament-modal {
  max-width: 600px;
  width: 90%;
}

.tournament-info-summary {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 15px;
  margin: 1.5rem 0;
}

.tournament-info-summary h4 {
  margin-bottom: 1rem;
  color: #333;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tournament-hero .hero-title {
    font-size: 2.5rem;
  }

  .tournament-hero .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-item {
    min-width: 100px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .tournaments-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 500px;
  }

  .tournament-info {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .tournament-footer {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
  }

  .tournament-actions {
    flex-direction: column;
  }

  .btn-register,
  .btn-details {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .tournament-hero .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .tournament-content {
    padding: 1.5rem;
  }

  .tournament-title {
    font-size: 1.3rem;
  }

  .tournaments-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 1rem;
  }

  .tournament-card {
    max-width: none;
    margin: 0;
  }

  .tournament-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .tournament-footer .btn-primary,
  .tournament-footer .btn-outline,
  .tournament-footer .btn-disabled {
    width: 100%;
  }
}

/* Animation for tournament cards */
.tournament-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

/* Tournament footer styling */
.tournament-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  margin-top: 1rem;
}

.entry-fee {
  font-size: 0.9rem;
  color: #666;
}

.entry-fee strong {
  color: #333;
  font-weight: 600;
}

.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:nth-child(4) {
  animation-delay: 0.4s;
}
.tournament-card:nth-child(5) {
  animation-delay: 0.5s;
}
.tournament-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state for tournaments */
.tournaments-loading {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.tournaments-loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Empty state */
.tournaments-empty {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.tournaments-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #ddd;
}

.tournaments-empty h3 {
  margin-bottom: 1rem;
  color: #333;
}

.tournaments-empty p {
  color: #888;
  max-width: 400px;
  margin: 0 auto;
}
