body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(145deg, #e9f8ef, #fefbe9);
  color: #2d3a32;
  position: relative;
  overflow-x: hidden;
}

/* Header */
header {
  background-color: #5a8f6f;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

nav a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: 600;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 5rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  margin: 4rem 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.hero h2 {
  font-size: 3rem;
  color: #365a49;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #4b5e53;
}

.cta {
  background-color: #f2c94c;
  color: #2d3a32;
  padding: 0.75rem 1.5rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta:hover {
  background-color: #ffe178;
  transform: scale(1.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #dfeddc;
  color: #3d4a3e;
  margin-top: 3rem;
  font-size: 0.95rem;
  z-index: 2;
  position: relative;
}

/* Floating Icons & Background */
.background-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.floating-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0.2;
  animation: float 6s infinite ease-in-out;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}
/* Hero Illustration */
.hero-img {
  max-width: 320px;
  width: 80%;
  margin-bottom: 1rem;
  animation: floatY 6s ease-in-out infinite;
}

/* Floating Animation */
@keyframes floatY {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Animated SVG Blobs */
.blob {
  position: absolute;
  width: 350px;
  height: 350px;
  z-index: 0;
  opacity: 0.2;
  animation: rotate 20s infinite linear;
}

.blob1 {
  top: -80px;
  left: -100px;
}

.blob2 {
  bottom: -120px;
  right: -80px;
}

@keyframes rotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}
.hero {
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  margin: 3rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.hero-text {
  flex: 1;
  text-align: center;
}

.hero-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.2rem;
  max-width: 500px;
  margin: 0 auto;
}

.hero-illustration {
  flex: 1;
  max-width: 400px;
}

.hero-illustration img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}
.hero {
  padding: 6rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  margin: 4rem 2rem;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 2;
}
.cta {
  background-color: #f2c94c;
  color: #2d3a32;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, transform 0.2s ease;
}

.cta:hover {
  background-color: #ffe178;
  transform: scale(1.06);
}
.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  opacity: 0.1;
  animation: float 8s infinite ease-in-out;
  filter: blur(1px);
}
.hero-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #c4e3cd 0%, transparent 70%);
  transform: translateX(-50%);
  z-index: -1;
  filter: blur(60px);
  opacity: 0.3;
}
.hero-icons {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.icon-block {
  text-align: center;
  color: #2d3a32;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.icon-block img {
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
}

.icon-block:hover {
  transform: scale(1.1);
}

/* About Section */
.about {
  padding: 5rem 2rem;
  background-color: #f5f9f3;
  border-top: 2px solid #dfeddc;
  border-bottom: 2px solid #dfeddc;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: #2d3a32;
}

.about-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #365a49;
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* Features Row */
.features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-box {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  max-width: 250px;
  flex: 1;
  transition: transform 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
}

.feature-box img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.8rem;
}

.feature-box h4 {
  margin: 0.5rem 0 0.3rem;
  color: #4b7b53;
}

.feature-box p {
  font-size: 0.95rem;
  color: #4b5e53;
}
/* Soft floating blobs inside hero */
.blob {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  opacity: 0.15;
  z-index: 1;
  animation: blobFloat 6s ease-in-out infinite;
}

.blob1 {
  background: #cce5d0;
  top: -40px;
  left: -50px;
  animation-delay: 0s;
}

.blob2 {
  background: #f4e3a1;
  bottom: -40px;
  right: -40px;
  animation-delay: 2s;
}

.blob3 {
  background: #d1e8e2;
  top: 50%;
  left: 85%;
  transform: translateY(-50%);
  animation-delay: 1s;
}

/* Floating animation for blobs */
@keyframes blobFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.05);
  }
}
.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px); /* Less blur so it’s sharper */
  opacity: 0.2;       /* Increased visibility */
  z-index: 1;
  animation: pulseGlow 8s ease-in-out infinite;
}

.glow1 {
  background: #a5d6b1;
  width: 400px;
  height: 400px;
  top: -80px;
  left: -100px;
}

.glow2 {
  background: #f2d766;
  width: 350px;
  height: 350px;
  bottom: -60px;
  right: -80px;
}

.glow3 {
  background: #96d2c1;
  width: 300px;
  height: 300px;
  top: 50%;
  left: 80%;
  transform: translateY(-50%);
  animation-delay: 2s;
}

/* Toggle Button */
#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.3s ease;
}

#theme-toggle:hover {
  transform: rotate(20deg);
}
/* DARK MODE STYLES */
body.dark {
  background-color: #1f2b24;
  color: #f0f0e1;
}

.dark .hero {
  background: #2e3b34;
  color: #f0f0e1;
}

.dark .about {
  background: #26332e;
  border-color: #3e5047;
}

.dark .feature-box {
  background: #35463f;
  box-shadow: none;
}

.dark .cta {
  background-color: #e0c44c;
  color: #1f2b24;
}

.dark .cta:hover {
  background-color: #f6da58;
}

.dark .mini-icon,
.dark .glow-circle {
  opacity: 0.2;
}

body.dark h2, body.dark h3, body.dark h4 {
  color: #e8f5e9;
}
/* Base text */
body.dark {
  color: #e6f1e9; /* Soft light mint */
}

/* Headings */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4 {
  color: #f8fff8; /* Near white but still gentle */
}

/* Paragraph text */
body.dark p {
  color: #d9e6dc; /* Slightly muted for contrast */
}

/* Feature box headings and content */
.dark .feature-box h4 {
  color: #f0fdf4;
}

.dark .feature-box p {
  color: #cddfd5;
}

/* About section background correction */
.dark .about-content {
  color: #e3f7e9;
}


body.dark h2,
body.dark h3 {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
/* Light mode footer (default) */
footer {
  background-color: #e8f5e9;
  color: #2d3a32;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

/* Optional link styles */
footer a {
  color: #4a6e57;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Dark mode footer */
body.dark footer {
  background-color: #1c2a23;
  color: #e0f5e7;
  border-top: 1px solid #3a4a43;
}

body.dark footer a {
  color: #b5e7ce;
}

body.dark footer a:hover {
  color: #d4f2e2;
}
.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-sizing: border-box;
  position: relative;
}
.login-card input,
.login-card button {
  width: 100%;
  box-sizing: border-box;
}
.register-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-sizing: border-box;
  position: relative;
}
.register-card input,
.register-card button {
  width: 100%;
  box-sizing: border-box;
}
/* -------- Responsive Adjustments -------- */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
  }

  .hero .content {
    padding: 1rem;
  }

  .cta {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .about,
  .feature-box {
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
  }

  .feature-box {
    margin-bottom: 2rem;
  }

  .login-card,
  .register-card {
    padding: 2rem;
    width: 90%;
    max-width: 360px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .cta {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
  }

  input,
  button {
    font-size: 1rem;
  }

  .glow-circle,
  .mini-icon {
    display: none; /* Clean up for tiny screens */
  }
}
/* ======= Medicine Tracker Section ======= */
.tracker-section {
  background: #f0f8f4;
  padding: 4rem 2rem;
  text-align: center;
}

.tracker-container {
  max-width: 800px;
  margin: auto;
}

.tracker-section h2 {
  color: #2e7d32;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.medicine-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.med-info h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #33691e;
}

.checkbox input {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

.add-med-btn {
  margin-top: 2rem;
  padding: 0.8rem 1.6rem;
  background: #81c784;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-med-btn:hover {
  background: #66bb6a;
}
