:root {
  --base-color-brand--white: #fff;
  --base-color-brand--dark-green: #0b3c27;
  --base-color-brand--leaf-green: #009c5a;
  --base-color-brand--olive-green-tint: #b1c56c;
  --base-color-brand--yellow-tint: #ffdcaf;
  --base-color-brand--tangerine: #f45328;
  --text-color--text-primary: #000;
  --text-color--text-alternate: #fff;
  --text-color--muted: #666;
  --border-color: #e2e2e2;
  --accent-color: var(--base-color-brand--leaf-green);
  --bacteria-color: #f44336;
}

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



body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--base-color-brand--white);
  color: var(--text-color--text-primary);
  line-height: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Add this */
  width: 100%; /* Add this */
}
.main-header {
  background-color: var(--base-color-brand--white);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(11, 60, 39, 0.1);
  width: 100%;
  text-align: center;
}

.header-logo {
  width: 80px;
  height: auto;
  margin-bottom: 0.5rem;  /* Small space between logo and title */
}

.game-title {
  text-align: center;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.start-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--base-color-brand--white), var(--base-color-brand--yellow-tint));
  padding: 2rem;
  overflow: hidden;
  position: relative;
}

.hero-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
}

.hero-content {
  flex: 1;
  text-align: left;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(11, 60, 39, 0.1);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--base-color-brand--dark-green);
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--base-color-brand--dark-green), var(--base-color-brand--leaf-green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-color--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(45deg, var(--base-color-brand--leaf-green), var(--base-color-brand--dark-green));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  position: relative;
}

.hero-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 156, 90, 0.4);
}

.hero-button span {
  position: relative;
  z-index: 2;
}

.hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.3),
      transparent
  );
  transition: left 0.5s;
  z-index: 1;
}

.hero-button:hover::before {
  left: 100%;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  animation: hero-float 1s ease-in-out infinite;
}

@keyframes hero-float {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-10px);
  }
}

@media (max-width: 576px) {
  .hero-wrapper {
      flex-direction: column;
      gap: 1rem; /* Reduce gap for smaller screens */
      padding: 1rem; /* Adjust padding for smaller screens */
  }
  .hero-title {
      font-size: 2rem; /* Reduce title size */
  }
  .hero-description {
      font-size: 1rem;
  }
}


.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color--text-primary);
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.close-button:hover {
  transform: scale(1.2);
  color: var(--base-color-brand--dark-green);
}



@media (max-width: 768px) {
  .start-screen::before,
  .start-screen::after {
    display: none;
  }
}

.start-content {
  text-align: center;
  width: 100%;
  max-width: 800px;
  padding: 5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  box-shadow: 
    0 20px 50px rgba(11, 60, 39, 0.1),
    0 10px 20px rgba(11, 60, 39, 0.05);
  position: relative;
  backdrop-filter: blur(10px);
}

.start-content h3 {
  color: var(--base-color-brand--dark-green);
  margin-bottom: 1.5rem;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(45deg, 
    var(--base-color-brand--dark-green),
    var(--base-color-brand--leaf-green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Add subtitle text */
.start-content h3 + p {
  color: var(--text-color--muted);
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.start-content button {
  margin-top: 1rem;
  padding: 1.4rem 4rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(45deg,
    var(--base-color-brand--leaf-green),
    var(--base-color-brand--dark-green));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-size: 1.6rem; /* Increase the font size for better readability on mobile */
  padding: 1.6rem 4rem; /* Increase the padding for easier tapping on mobile */
}

.start-content button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.start-content button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 156, 90, 0.3);
}

.start-content button:hover::before {
  left: 100%;
}

/* Add feature highlights */
.feature-highlights {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  color: var(--text-color--muted);
}

.feature-highlights span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(10px, 10px) rotate(5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@media (max-width: 768px) {
  .start-content {
    padding: 3rem 2rem;
    margin: 1rem;
  }
  
  .start-content h3 {
    font-size: 2.4rem;
  }
  
  .start-content h3 + p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .start-content button {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
  }
  
  .feature-highlights {
    flex-direction: column;
    gap: 1rem;
  }
}

.button-primary, #start-game-btn {
  background: linear-gradient(45deg, var(--base-color-brand--leaf-green), var(--base-color-brand--dark-green));
  color: var(--text-color--text-alternate);
  padding: 1.2rem 3rem;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem;
  gap: 1rem;
}

.game-main {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Default: Two columns side by side for larger screens */
  gap: 2rem;
  width: 100%; /* Full width */
}

@media (max-width: 768px) {
  .game-main {
      grid-template-columns: 1fr; /* Stack elements vertically on smaller screens */
      grid-template-rows: auto; /* Allow rows to adjust dynamically */
      gap: 1.5rem; /* Reduce gap for compact stacking */
      justify-items: center; /* Center items horizontally */
  }
}




.stat-label {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.8rem;
  color: var(--text-color--muted);
}


.stat-value {
  font-weight: bold;
  margin-left: 0.5rem;
  color: var(--base-color-brand--dark-green);
}


.progress {
  height: 100%;
  width: 0; /* Start at 0 */
  transition: width 0.6s ease-in-out;
}

/* Progress bar colors */
#health-progress { background-color: var(--base-color-brand--leaf-green); }
#bacteria-progress { background-color: var(--bacteria-color); }
#risk-progress { background-color: var(--base-color-brand--tangerine); }

/* Mobile adjustments */




.petri-dish-container {
  align-self: center;
  justify-self: center;
  width: 400px;
  height: 400px;
}

@media (max-width: 768px) {
  .petri-dish-container {
      width: 250px; /* Reduce size for smaller screens */
      height: 250px;
  }
}

.narrative-section {
  align-self: start;
  justify-self: center;
  width: 100%; /* Ensure full width for text container */
  max-width: 600px;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .narrative-section {
      padding: 1rem; /* Reduce padding for smaller screens */
  }
}


.petri-dish {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
  border: 8px solid #e0e0e0;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 30px rgba(0,180,216,0.2),
    inset 0 0 60px rgba(0,0,0,0.1),
    inset 0 0 20px rgba(255,255,255,0.8);
  margin: 2rem auto;
}

.bacteria {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
      circle at 30% 30%,
      var(--bacteria-color) 0%,
      rgba(244,67,54,0.7) 70%
  );
  filter: blur(1px);
  box-shadow: 0 0 10px rgba(244,67,54,0.5);
  /* Update transition properties */
  transition: all 0.4s ease-out;
  opacity: 0;
  transform: scale(0.5);
}

.bacteria::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 30%;
  height: 30%;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

.narrative-section {
  background: linear-gradient(to right bottom, var(--base-color-brand--white), var(--base-color-brand--yellow-tint));
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(11, 60, 39, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#story-text {
  font-size: 1.2rem;
  line-height: 1.8;
  flex-grow: 1;
  padding: 1.5rem 2rem;
  background: white;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin: 1rem 0;
  max-width: 90%;
  align-self: flex-start;
  /* Add these new transition properties */
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

#story-text.visible {
  opacity: 1;
  transform: translateY(0);
}

#choice-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.game-choice {
  background: var(--base-color-brand--leaf-green);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  align-self: flex-end;
  max-width: 90%;
  text-align: left;
  margin: 0.5rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  /* Add these new transition properties */
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease-out;
}

.game-choice.visible {
  opacity: 1;
  transform: translateX(0);
}

.game-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Container styling */
.narrative-section {
  background: linear-gradient(to right bottom, var(--base-color-brand--white), var(--base-color-brand--yellow-tint));
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(11, 60, 39, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#choice-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
  width: 100%;
}

@media (max-width: 768px) {
  #story-text {
      font-size: 1.2rem;
      padding: 1.2rem 1.5rem;
      max-width: 95%;
  }
  
  .game-choice {
      font-size: 1rem;
      padding: 0.8rem 1.2rem;
      max-width: 95%;
  }
}

.info-panel {
  background: var(--base-color-brand--dark-green);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  margin: 1rem 0;
  box-shadow: 0 8px 32px rgba(11, 60, 39, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Glass effect overlay */
.info-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.05)
  );
  pointer-events: none;
}

/* Emoji style */
.info-panel span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  z-index: 1;
}

.info-panel span::before {
  content: '💡';
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .info-panel {
      padding: 1.2rem 1.5rem;
  }
  
  .info-panel span {
      font-size: 1rem;
  }
  
  .info-panel span::before {
      font-size: 1.2rem;
  }
}

.game-summary {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.summary-wrapper {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--base-color-brand--white);
  border-radius: 16px;
  padding: 2rem;
}

.summary-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.summary-title {
  text-align: center;
  color: var(--accent-color);
  font-size: 2rem;
}

.social-share {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.5rem 0;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 6px;
  color: var(--text-color--text-alternate);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-button.twitter { background: #1DA1F2; }
.share-button.facebook { background: #4267B2; }
.share-button.whatsapp { background: #25D366; }
.share-button.linkedin { background: #0077b5; }

.summary-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.summary-options button {
  padding: 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.play-again {
  background: linear-gradient(45deg, var(--base-color-brand--leaf-green), var(--base-color-brand--dark-green));
  color: white;
}

.read-more {
  background: var(--base-color-brand--yellow-tint);
  color: var(--base-color-brand--dark-green);
}

.footer-content {
  background: linear-gradient(135deg, var(--base-color-brand--dark-green), #072718);
  color: var(--text-color--text-alternate);
  padding: 4rem 2rem 2rem;
  width: 100%;
  margin-top: auto; /* This ensures footer stays at bottom */
}

.footer-sections {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  width: 100%;
}

.footer-section h4 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer-links a {
  color: var(--text-color--text-alternate);
  text-decoration: none;
  display: block;
  margin: 0.8rem 0;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color);
  opacity: 1;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  color: var(--text-color--text-alternate);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.social-icon svg {
  fill: var(--text-color--text-alternate);
}

.social-icon:hover {
  transform: translateY(-2px);
  opacity: 1;
  color: var(--accent-color);
}

.social-icon:hover svg {
  fill: var(--accent-color);
}

.social-icon:hover {
  transform: translateY(-2px);
  opacity: 1;
  color: var(--accent-color);
}

.copyright {
  text-align: center;
  padding: 1.5rem;
  background: rgba(0,0,0,0.2);
  margin-top: 3rem;
}

@keyframes bacteria-move {
  0% { 
      transform: translate(0, 0) scale(1);
      opacity: 0.8;
  }
  50% {
      transform: translate(20px, 20px) scale(1.1);
      opacity: 1;
  }
  100% { 
      transform: translate(0, 0) scale(1);
      opacity: 0.8;
  }
}

/* Add this new animation class */
.bacteria.moving {
  animation: bacteria-move 1s infinite alternate;
}

#health-progress { background-color: var(--base-color-brand--leaf-green); }
#bacteria-progress { background-color: var(--bacteria-color); }
#risk-progress { background-color: var(--base-color-brand--tangerine); }

.hidden { display: none; }

@media (max-width: 576px) {
  .petri-dish {
      width: 180px;
      height: 180px;
  }
}




body {
  overflow-x: hidden; /* Prevent horizontal overflow */
}

  
  .social-icons {
    justify-content: center;
  }
  
  .summary-options,
  .social-share {
    grid-template-columns: 1fr;
  }


@media (max-width: 480px) {
  .petri-dish {
    width: 200px;
    height: 200px;
  }
  
  .summary-wrapper {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .summary-cards {
      grid-template-columns: 1fr;
  }
  
  #story-text {
      font-size: 1.2rem;
      padding: 1.5rem;
  }
  
  #story-text:before,
  #story-text:after {
      font-size: 3rem;
  }
}

.summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card.good {
  border-left: 5px solid var(--base-color-brand--leaf-green);
}

.card.bad {
  border-left: 5px solid var(--base-color-brand--tangerine);
}

.card h3 {
  color: var(--base-color-brand--dark-green);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card ul {
  list-style: none;
}

.card li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.card li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.card.good li:before {
  color: var(--base-color-brand--leaf-green);
}

.card.bad li:before {
  color: var(--base-color-brand--tangerine);
}

/* First, add these animation styles */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

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

/* Style for the narrative text animation */
#story-text {
  /* ... existing styles ... */
  animation: fadeInUp 1.3s ease forwards;
  transform-origin: left;
}

/* Style for choice buttons animation */
.game-choice {
  /* ... existing styles ... */
  animation: fadeInRight 1s ease forwards;
  transform-origin: right;
}

/* Add this to create staggered animations for multiple choices */
.game-choice:nth-child(1) { animation: fadeInRight 1s ease forwards; }
.game-choice:nth-child(2) { animation: fadeInRight 1s ease forwards;}
.game-choice:nth-child(3) { animation: fadeInRight 1s ease forwards;}

.stat-bar {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress {
  height: 100%;
  width: 0; /* Start at 0 */
  transition: width 0.6s ease-in-out;
}

#health-progress {
  background-color: var(--base-color-brand--leaf-green);
}

#bacteria-progress {
  background-color: var(--bacteria-color);
}

#risk-progress {
  background-color: var(--base-color-brand--tangerine);
}

/* Optional: Add different colors for different levels */
.health-bar .progress {
  background: linear-gradient(90deg, #00c853, #64dd17);
}

.bacteria-bar .progress {
  background: linear-gradient(90deg, #f44336, #ff7043);
}

.risk-bar .progress {
  background: linear-gradient(90deg, #ff9800, #f57c00);
}

.message-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  background-color: #f1f0f0;
  padding: 1rem 1.5rem;
  border-radius: 20px;
  max-width: 80%;
  align-self: flex-start;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message.received {
  background-color: #fff;
}

.message.received::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #fff;
  border-bottom: 10px solid transparent;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-self: flex-end;
}

.game-choice {
  background-color: var(--base-color-brand--leaf-green);
  color: var(--text-color--text-alternate);
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .game-choice {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
  }
}

.game-choice:hover {
  background-color: var(--base-color-brand--dark-green);
}

@media (max-width: 768px) {
  .summary-wrapper {
    padding: 1rem;
  }

  .summary-container {
    gap: 1.5rem;
  }

  .summary-title {
    font-size: 1.8rem;
  }

  .achievement-badge {
    font-size: 1.4rem;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem;
  }

  .card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .card li {
    margin-bottom: 0.8rem;
  }

  .share-section {
    padding: 1rem 0;
  }

  .social-share {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .share-button {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }

  .share-button svg {
    width: 18px;
    height: 18px;
  }

  .summary-options {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .summary-options button {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

.stats-container {
  display: flex;
  flex-direction: row; /* Default is horizontal layout for larger screens */
  gap: 2rem;
  padding: 1.5rem;
  background: linear-gradient(to right, var(--base-color-brand--white), var(--base-color-brand--yellow-tint));
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(11, 60, 39, 0.1);
  justify-content: space-around; /* Ensure spacing between items */
  align-items: center; /* Center align items vertically */
}

.stat-item {
  flex: 1; /* Allow items to grow and take equal space */
  padding: 1rem;
  background: var(--base-color-brand--white);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(11, 60, 39, 0.08);
  text-align: center;
}

.stat-bar {
  width: 100%; /* Full width for progress bars */
  height: 12px; /* Standard height */
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .stats-container {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-item {
      width: 100%; /* Ensure full width on smaller screens */
      padding: 0.8rem; /* Reduce padding */
  }

  .stat-bar {
      height: 6px; /* Smaller height for mobile */
  }
}

@media (max-width: 576px) {
  .stats-container {
      gap: 0.8rem; /* Smaller gap for very small screens */
      padding: 0.8rem;
  }

  .stat-item {
      padding: 0.6rem;
  }

  .stat-bar {
      height: 4px; /* Even smaller progress bar height */
  }
}


/* Health Display remains the same */
.health-display {
  display: flex;
  justify-content: center; /* Center horizontally */
  gap: 5px; /* Space between heart icons */
  align-items: center; /* Ensure vertical alignment */
  margin: 1rem auto; /* Add spacing around */
}


.heart {
  font-size: 1.5rem;
  color: #ff4444;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.heart-empty {
  opacity: 0.3;
}

/* Infection Level Progress Bar */
.infection-bar {
  width: 100%; /* Take full width of the container */
  max-width: 300px; /* Set a max width for responsiveness */
  height: 20px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ccc;
  margin: 1rem auto; /* Center horizontally and add spacing */
}

.infection-progress {
  height: 100%;
  width: 50%; /* Example width; dynamically adjusted by JS */
  background: linear-gradient(90deg, #4CAF50, #FFC107, #FF5252);
  transition: width 0.3s ease; /* Smooth transition on update */
}


/* Resistance Level Display */
.resistance-level {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 5px 15px;
  border-radius: 5px;
  text-align: center;
}

.resistance-low {
  background-color: #4CAF50;
  color: white;
}

.resistance-med {
  background-color: #FFA500;
  color: white;
  animation: medPulse 2s infinite;
}

.resistance-high {
  background-color: #FF0000;
  color: white;
  animation: highPulse 1s infinite;
}

@keyframes medPulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

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

.bacteria.mutated {
  box-shadow: 0 0 15px rgba(155, 89, 182, 0.5);
  filter: brightness(1.2);
}

@keyframes bacteria-move {
  0% { 
      transform: translate(0, 0) scale(1) rotate(0deg);
      opacity: 0.8;
  }
  50% {
      transform: translate(20px, 20px) scale(1.1) rotate(180deg);
      opacity: 1;
  }
  100% { 
      transform: translate(0, 0) scale(1) rotate(360deg);
      opacity: 0.8;
  }
}

.bacteria {
  position: absolute;
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
  transition: all 0.4s ease-out;
}

.normal-bacteria {
  border-radius: 50%;
}

.aggressive-bacteria {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.mutated-bacteria {
  border-radius: 60% 40% 40% 60% / 40% 50% 50% 60%;
  box-shadow: 
      inset 0 0 15px rgba(0,0,0,0.4),
      0 0 10px rgba(155, 89, 182, 0.5);
  position: relative;
}

.flagellum {
  position: absolute;
  top: -30%;
  left: 50%;
  width: 2px;
  height: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform-origin: bottom center;
  animation: flagellaWave 2s infinite ease-in-out;
}

@keyframes flagellaWave {
  0%, 100% {
      transform: rotate(0deg) scale(1);
  }
  50% {
      transform: rotate(10deg) scale(0.9);
  }
}

.bacteria::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 30%;
  height: 30%;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

.mutated-bacteria::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(155, 89, 182, 0.7);
  border-radius: inherit;
  animation: mutationPulse 2s infinite;
}

@keyframes mutationPulse {
  0%, 100% {
      transform: scale(1);
      opacity: 1;
  }
  50% {
      transform: scale(1.1);
      opacity: 0.7;
  }
}

.bacteria.moving {
  animation: bacteria-move 4s infinite alternate;
}

@keyframes bacteria-move {
  0% { 
      transform: translate(0, 0) rotate(0deg);
  }
  50% {
      transform: translate(20px, 20px) rotate(180deg);
  }
  100% { 
      transform: translate(0, 0) rotate(360deg);
  }
}

@media (max-width: 576px) {
  .footer-sections {
      grid-template-columns: 1fr;
      gap: 1rem; /* Reduce gap */
  }
  .social-icons {
      justify-content: center; /* Center align icons */
  }
}

/* Existing CSS rules */
/* ... */

/* Updated media query styles */
@media (max-width: 768px) {
  .stats-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }

  .stat-item {
    width: 100%;
    padding: 0.8rem;
  }

  .stat-bar {
    height: 6px;
  }

  .health-display {
    font-size: 1.2rem;
    margin: 0.8rem auto;
  }

  .petri-dish-container {
    width: 250px;
    height: 250px;
  }

  .narrative-section {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .stats-container {
    gap: 0.8rem;
    padding: 0.8rem;
  }

  .stat-bar {
    height: 4px;
  }

  .health-display {
    font-size: 1rem;
    margin: 0.5rem auto;
  }
}

.info-panel a {
  color: white;         /* Keep the link color white */
  text-decoration: underline; /* Ensure it's underlined */
  text-decoration-thickness: 2px; /* Optionally adjust the thickness of the underline */
  text-decoration-color: white; /* Explicitly set the underline color to white */
}

.info-panel a:hover {
  text-decoration: none; /* Remove underline on hover (optional) */
}

.final-score {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(to right, var(--base-color-brand--leaf-green), var(--base-color-brand--dark-green));
  border-radius: 12px;
  color: white;
}

.final-score h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 8px;
}

.score-breakdown p {
  font-size: 1.1rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .final-score h2 {
      font-size: 1.5rem;
  }
  
  .score-breakdown {
      grid-template-columns: 1fr;
  }
}


.share-section {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
}

.share-section h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--base-color-brand--dark-green);
}

.social-share {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-button.twitter { background: #1DA1F2; }
.share-button.facebook { background: #4267B2; }
.share-button.whatsapp { background: #25D366; }
.share-button.linkedin { background: #0077b5; }

.share-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .social-share {
      grid-template-columns: 1fr;
  }
  
  .share-button {
      padding: 0.8rem;
  }
}


.share-button.generic {
  background-color: #666;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
}

.share-button.generic:hover {
  background-color: #555;
}

/* Only show generic share button if native sharing is available */
@media (not all and (hover: hover)) {
  .share-button.generic {
      display: none;
  }
}