/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
              url('https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-1.2.1&auto=format&fit=crop&w=2850&q=80') center/cover;
  color: white;
  padding: 120px 0;
  position: relative;
  will-change: auto;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #1b1a1a 0%, transparent 100%);
  opacity: 0.6;
  will-change: auto;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(253, 253, 253, 0.3);
  margin-bottom: 1.5rem;
}

.hero-section .lead {
  font-size: 1.4rem;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-features .badge {
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
}

.stat-box {
  padding: 30px;
  border-radius: 25px;
  background: linear-gradient(135deg, 
      rgba(57, 255, 20, 0.2), 
      rgba(0, 255, 255, 0.1),
      rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(15px);
  box-shadow: 0 0 40px rgba(57, 255, 20, 0.4),
              inset 0 0 30px rgba(57, 255, 20, 0.2),
              0 0 100px rgba(57, 255, 20, 0.2);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 3px solid rgba(57, 255, 20, 0.3);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: auto;
}

.stat-box:hover {
  transform: translateY(-15px) rotateX(10deg) scale(1.05);
  background: linear-gradient(135deg, 
      rgba(57, 255, 20, 0.4),
      rgba(0, 255, 255, 0.2),
      rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 60px rgba(57, 255, 20, 0.6),
              inset 0 0 50px rgba(57, 255, 20, 0.4),
              0 0 150px rgba(57, 255, 20, 0.3);
  border-color: rgba(57, 255, 20, 0.6);
}

.stat-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.1) 0%, transparent 50%);
  animation: rotateGradient 10s linear infinite;
  will-change: auto;
}

.stat-box h3 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 15px;
  background: linear-gradient(45deg, 
      #fff 0%, 
      #39ff14 25%, 
      #00ffff 50%,
      #39ff14 75%,
      #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(57, 255, 20, 1);
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
  letter-spacing: -1px;
  will-change: auto;
}

.stat-box p {
  margin: 0;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.8);
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.stat-box::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.2) 0%, transparent 50%);
  animation: rotateGradient 15s linear infinite;
  pointer-events: none;
  will-change: auto;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 30px rgba(57, 255, 20, 0.3); will-change: auto; }
  50% { box-shadow: 0 0 80px rgba(57, 255, 20, 0.8); will-change: auto; }
  100% { box-shadow: 0 0 30px rgba(57, 255, 20, 0.3); will-change: auto; }
}

.stat-box {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% center; filter: hue-rotate(0deg); will-change: auto; }
  50% { filter: hue-rotate(90deg); will-change: auto; }
  100% { background-position: -100% center; filter: hue-rotate(0deg); will-change: auto; }
}

.stat-box {
  animation: countUp 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.stat-box:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-box:nth-child(3) {
  animation-delay: 0.4s;
}

.cta-buttons .btn {
  min-width: 160px;
  transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-buttons .btn-primary {
  background: #39ff14;
  border-color: #39ff14;
  color: #000;
}

.cta-buttons .btn-primary:hover {
  background: #45ff25;
  border-color: #45ff25;
}

.cta-buttons .btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
}

/* Tournament Cards */
.card {
  transition: transform 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-5px);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

.tournament-details .d-flex {
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

/* Modal Styling */
.modal-content {
  border-radius: 15px;
}

/* Leaderboard Additional Styles */
.btn-retry {
  background: linear-gradient(135deg, #00ff88, #00d4ff);
  color: #1a1a2e;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-retry i {
  margin-right: 5px;
}

/* Navigation active state for leaderboard */
.nav-menu a.active {
  color: #00ff88;
  font-weight: bold;
}

/* Enhanced table responsiveness */
@media (max-width: 768px) {
  .rankings-table th:nth-child(3),
  .rankings-table td:nth-child(3) {
      display: none;
  }
  
  .champion-card {
      min-height: 180px;
  }
}

@media (max-width: 480px) {
  .rankings-table th:nth-child(4),
  .rankings-table td:nth-child(4) {
      display: none;
  }
  
  .hall-of-fame-title {
      font-size: 1.8rem;
  }
}

.modal-header {
  background: #f8f9fa;
  border-radius: 15px 15px 0 0;
}

/* Navigation */
.navbar {
  padding: 15px 0;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(0,255,0,0.3));
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
      padding: 80px 0;
  }
  
  .hero-section h1 {
      font-size: 2.5rem;
  }
  
  .hero-section .lead {
      font-size: 1.2rem;
  }
  
  .stat-box h3 {
      font-size: 1.5rem;
  }
}

/* Social Links */
.social-links a {
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #007bff !important;
}

/* Community Cards */
.community-card {
  padding: 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.community-card:hover {
  transform: translateY(-5px);
}

.community-card i {
  color: #333;
}

.community-card h5 {
  margin: 1rem 0;
  font-weight: 600;
}

.community-card p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* Instagram Card */
.community-card:nth-child(1) i {
  background: -webkit-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* YouTube Card */
.community-card:nth-child(2) i {
  color: #ff0000;
}

/* WhatsApp Card */
.community-card:nth-child(3) i {
  color: #25D366;
}

/* Discord Card */
.community-card:nth-child(4) i {
  color: #7289da;
}

/* Auth Pages Styling */
.auth-page {
  min-height: 100vh;
  background-color: #f8f9fa;
}

.auth-container {
  min-height: 100vh;
  background-color: #fff;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.auth-image {
  background: url('https://images.unsplash.com/photo-1542751371-adc38448a05e') center/cover;
  min-height: 100vh;
  position: relative;
}

.auth-form-container {
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Update existing styles */
.welcome-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  width: 80%;
}

/* Auth page performance optimization */
@media (max-width: 768px) {
  .auth-form-container {
    will-change: auto;
  }
  
  .auth-page {
    touch-action: manipulation;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-form-container {
      padding: 2rem !important;
  }
}

/* Auth Required Modal */
#authRequiredModal .modal-content {
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#authRequiredModal .fa-lock {
  color: #ffc107;
}

/* Mobile Responsive Improvements */
@media screen and (max-width: 768px) {
  /* Prevent font scaling in landscape */
  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  /* Ensure proper sizing on mobile */
  body {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
  }
  
  /* Specific adjustments for dashboard elements */
  .hero-section {
    padding: 60px 0 !important;
  }
  
  .display-4 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  /* Adjust stat boxes for mobile */
  .stat-box {
    padding: 20px;
    margin-bottom: 15px;
  }
  
  .stat-box h3 {
    font-size: 1.8rem !important;
  }
  
  /* Ensure buttons are properly sized on mobile */
  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  
  /* Adjust navbar for mobile */
  .navbar-brand img {
    height: 35px;
  }
  
  /* Ensure proper table display on mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Additional responsive adjustments */
@media screen and (max-width: 480px) {
  .hero-section {
    padding: 40px 0 !important;
  }
  
  .display-4 {
    font-size: 1.7rem;
  }
  
  .stat-box h3 {
    font-size: 1.5rem !important;
  }
  
  .stat-box {
    padding: 15px;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
}