* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(135deg, #1a4d2e 0%, #2d6a4f 25%, #40916c 50%, #52b788 75%, #2d6a4f 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: #1b3a2e;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 900px;
  margin: 20px auto;
  background: linear-gradient(45deg, #c7f0d8, #b7e4c7, #a8ddb5);
  border: 5px dashed #2d6a4f;
  box-shadow: 0 0 30px rgba(45, 106, 79, 0.8);
  padding: 30px;
  border-radius: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

h1 {
  font-size: 3em;
  color: #1a4d2e;
  text-shadow: 2px 2px 0px #52b788, 4px 4px 0px #40916c;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.3em;
  color: #2d6a4f;
  font-style: italic;
  text-decoration: underline wavy;
}

.sparkles {
  font-size: 2em;
  animation: sparkle 1s infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

nav {
  background: linear-gradient(90deg, #2d6a4f, #40916c);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 30px;
  text-align: center;
}

nav a {
  display: inline-block;
  margin: 0 15px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: bold;
  padding: 8px 15px;
  background: rgba(26, 77, 46, 0.7);
  border-radius: 15px;
  transition: all 0.3s;
  border: 2px solid #52b788;
}

nav a:hover {
  background: #52b788;
  color: #1a4d2e;
  transform: scale(1.2) rotate(5deg);
  box-shadow: 0 0 15px #52b788;
}

nav a.active {
  background: #52b788;
  color: #1a4d2e;
  box-shadow: 0 0 20px #52b788;
}

.content {
  background: #d8f3dc;
  padding: 20px;
  border: 3px solid #2d6a4f;
  border-radius: 15px;
  margin-bottom: 20px;
}

.content h2 {
  color: #1a4d2e;
  font-size: 1.8em;
  text-shadow: 1px 1px #40916c;
  margin-bottom: 15px;
}

.content p {
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 1.1em;
  color: #1b3a2e;
}

.buttons {
  text-align: center;
  margin: 30px 0;
}

button {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: #ffffff;
  border: 3px solid #1a4d2e;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  margin: 10px;
  font-family: 'Comic Sans MS', cursive;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
  transform: scale(1.15) rotate(-3deg);
  box-shadow: 0 0 20px #52b788;
  background: linear-gradient(135deg, #40916c, #52b788);
}

.badge-section {
  text-align: center;
  margin: 30px 0;
}

.badge {
  display: inline-block;
  margin: 10px;
  padding: 10px 15px;
  background: #52b788;
  border: 3px solid #1a4d2e;
  border-radius: 10px;
  font-weight: bold;
  font-size: 0.9em;
  transform: rotate(-5deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  color: white;
}

.badge:nth-child(2) {
  transform: rotate(5deg);
}

.under-construction {
  text-align: center;
  padding: 20px;
  background: #95d5b2;
  border: 5px solid #1a4d2e;
  border-radius: 10px;
  margin: 20px 0;
  animation: blink 1s infinite;
  color: #1a4d2e;
  font-weight: bold;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

.counter {
  background: #1a4d2e;
  color: #52b788;
  padding: 10px 15px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  display: inline-block;
  border: 2px solid #52b788;
  margin: 10px 0;
  font-size: 1.5em;
  letter-spacing: 2px;
}

.green-text {
  background: linear-gradient(90deg, #1a4d2e, #2d6a4f, #40916c, #52b788, #74c69d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  font-size: 1.3em;
}

.squares-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.square {
  background: linear-gradient(135deg, #52b788, #40916c);
  border: 4px solid #1a4d2e;
  border-radius: 15px;
  aspect-ratio: 1 / 1; 
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  overflow: hidden; 
  position: relative;
}

.square:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.square img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  z-index: 9999 !important;
  display: block !important;
  opacity: 1 !important;
  margin: auto;
  padding: 1 !important;
  max-width: 95%;
  max-height: 95%;
  gap: 10px;
}

.divider {
  height: 20px;
  margin: 20px 0;
  background: repeating-linear-gradient(
    90deg,
    #1a4d2e,
    #1a4d2e 10px,
    #2d6a4f 10px,
    #2d6a4f 20px,
    #40916c 20px,
    #40916c 30px,
    #52b788 30px,
    #52b788 40px
  );
  border-top: 3px solid #2d6a4f;
  border-bottom: 3px solid #2d6a4f;
}

footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 3px dashed #2d6a4f;
  font-size: 0.9em;
  color: #1b3a2e;
}

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