/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #475569;
  background-color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #059669, #10b981);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.text-center {
  text-align: center;
}

.trophy-animation {
  margin-bottom: 1rem;
  animation: trophy-transform 3s ease-in-out infinite;
}

.trophy-icon {
  color: white;
  margin: 0 auto;
}

.loading-title {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.loading-bar {
  width: 4rem;
  height: 0.25rem;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  margin: 0 auto;
  overflow: hidden;
}

.loading-progress {
  width: 100%;
  height: 100%;
  background-color: white;
  border-radius: 9999px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Main Content */
.main-content {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 50;
  border-bottom: 1px solid #e5e7eb;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  color: #059669;
}

.brand-text {
  font-weight: bold;
  font-size: 1.25rem;
  color: #475569;
}

.nav-menu {
  display: none;
  gap: 2rem;
}

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

.nav-link:hover {
  color: #059669;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
}

.mobile-menu-button {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 0.25rem;
}

.hamburger-line {
  width: 1.5rem;
  height: 2px;
  background-color: #475569;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:checked + .mobile-menu-button .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle:checked + .mobile-menu-button .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle:checked + .mobile-menu-button .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #e5e7eb;
  padding: 1rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu-toggle:checked ~ .mobile-menu {
  display: flex;
}

.mobile-nav-link {
  color: #475569;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: #059669;
}

/* Hero Banner */
.hero-banner {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(5, 150, 105, 0.8), rgba(16, 185, 129, 0.6));
}

.banner-lightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: lightning 3s infinite;
}

.hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-text {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  animation: slide-in-left 1s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: slide-in-right 1s ease-out;
}

.hero-trophy {
  display: inline-block;
  margin-bottom: 1rem;
  animation: glow 2s ease-in-out infinite;
}

/* About Section */
.about-section {
  padding: 4rem 0;
  background-color: #f1f5f9;
}

.about-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.section-title.center {
  text-align: center;
}

.about-paragraph {
  color: #475569;
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

/* Judges Section */
.judges-section {
  padding: 4rem 0;
}

.judges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.judge-toggle {
  display: none;
}

.judge-card {
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.judge-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.judge-toggle:checked + .judge-card {
  transform: scale(1.1);
  z-index: 20;
}

.judge-content {
  display: block;
  text-align: center;
  cursor: pointer;
}

.judge-photo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.judge-photo {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
}

.judge-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background-color: #059669;
  color: white;
  border-radius: 50%;
  padding: 0.5rem;
}

.judge-name {
  font-weight: bold;
  font-size: 1.125rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.judge-specialty {
  color: #475569;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.judge-event {
  color: #059669;
  font-size: 0.875rem;
  font-weight: 500;
}

.judge-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  display: none;
}

.judge-toggle:checked + .judge-card .judge-details {
  display: block;
}

.judge-details p {
  color: #475569;
  font-size: 0.875rem;
}

/* Events Sections */
.past-events-section {
  padding: 4rem 0;
  background-color: #f1f5f9;
}

.upcoming-events-section {
  padding: 4rem 0;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.upcoming-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.event-card,
.upcoming-event-card {
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.upcoming-event-card {
  background-color: #ffffff;
  animation: glow 2s ease-in-out infinite;
}

.event-image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
}

.event-content {
  padding: 1.5rem;
}

.event-name {
  font-weight: bold;
  font-size: 1.25rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.event-competition {
  color: #059669;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.event-info {
  display: flex;
  align-items: center;
  color: #475569;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.event-info svg {
  margin-right: 0.5rem;
}

.register-button {
  width: 100%;
  background-color: #059669;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
}

.register-button:hover {
  background-color: #047857;
}

/* News Section */
.news-section {
  padding: 4rem 0;
  background-color: #f1f5f9;
}

.news-card {
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.news-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.winners-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.winner {
  text-align: center;
}

.winner-photo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.winner-photo {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
}

.winner-trophy {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background-color: #eab308;
  color: white;
  border-radius: 50%;
  padding: 0.5rem;
}

.winner-name {
  font-weight: bold;
  color: #1f2937;
}

.winner-place {
  color: #eab308;
  font-weight: 500;
}

.rankings-table {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.rankings-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: #475569;
  margin-bottom: 1rem;
  text-align: center;
}

.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background-color: #f1f5f9;
  border-radius: 0.5rem;
}

.ranking-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.medal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.medal.gold {
  color: #eab308;
}

.medal.silver {
  color: #696d74;
}

.medal.bronze {
  color: #d55900;
}

.medal.other {
  color: #202020;
}

.ranking-name {
  font-weight: 500;
  color: #475569;
}

.ranking-right {
  text-align: right;
}

.ranking-score {
  font-weight: bold;
  color: #475569;
}

.ranking-place {
  font-size: 0.875rem;
  color: #475569;
  margin: 0;
}

/* Footer */
.footer {
  background-color: #059669;
  color: white;
  padding: 3rem 0;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.footer-icon {
  color: white;
}

.footer-brand-text {
  font-weight: bold;
  font-size: 1.5rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #10b981;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.8);
}

/* Animations */
@keyframes lightning {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-100px) scaleX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(0) scaleX(1);
  }
}

@keyframes trophy-transform {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes slide-in-left {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }

  .hero-banner {
    height: 800px;
  }

  .hero-title {
    font-size: 3.75rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .judges-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .upcoming-events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
