body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7f9fb;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}
  .container {
    background: white;
    max-width: 600px;
    width: 100%;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    text-align: center;
  }
  
  h1 {
    font-size: 26px;
    margin-bottom: 10px;
    color: #1a1a1a;
  }
  
  .subtext {
    color: #555;
    margin-bottom: 25px;
  }
  
  input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
  }
  
  button {
    background-color: #2f855a;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }
  
  button:hover {
    background-color: #276749;
  }
  
  #outputBox {
    margin-top: 25px;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
  }
  
  pre {
    background: #e2e8f0;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
  }
  
  
  #explanationBox {
    margin-top: 20px;
    background: #fff7ed;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
  }
  
  #explanationBox label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
  }
  
  #explanationOutput {
    background: #fef3c7;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
  }

  #stepsBox {
    margin-top: 20px;
    background: #fff7ed;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
  }
  
  #stepsBox label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
  }
  
  #stepsOutput {
    background: #fef3c7;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
  }

  #copyBtn {
    margin-top: 10px;
    background-color: #4299e1;
    color: white;
    padding: 8px 14px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  #copyBtn:hover {
    background-color: #2b6cb0;
  }

  #loading {
    margin-top: 15px;
    font-style: italic;
    color: #555;
  }
  
  #resetBtn {
    margin-top: 20px;
    background-color: #e53e3e;
    color: white;
    padding: 10px 18px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  #resetBtn:hover {
    background-color: #c53030;
  }

  .button-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.generate-btn {
  background-color: #3b82f6;
  color: white;
  padding: 10px 18px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.generate-btn:hover {
  background-color: #2563eb;
}

#resetBtn {
    background-color: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    margin-right: 10px;
  }
  
  #resetBtn:hover {
    background-color: #f0f8ff;
  }

  .subheading {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    text-align: center;
    margin-top: 10px;
  }

  .heading-section {
    background-color: #fff9db;
    padding: 20px 10px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
  }

  label {
    font-weight: bold;
  }
  
  .faq {
    margin-top: 40px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
  }
  
  .faq-item {
    margin-bottom: 10px;
  }
  
  .faq-question {
    width: 100%;
    text-align: left;
    font-weight: normal;
    padding: 10px;
    background-color: #f7f7f7;
    color: #000000;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  
  .faq-question:hover {
    background-color: #eaeaea;
  }
  
  .faq-answer {
    display: none;
    padding: 10px;
    background-color: #fdfdfd;
    border-left: 3px solid #007bff;
    margin-top: 5px;
    border-radius: 4px;
  }

  faq h2 {
    text-align: left;
    font-weight: normal;
    margin-bottom: 16px;
  }

  .top-left-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
  }
  
  .logo-img {
    height: 200px; /* 50px × 5 = 250px */
    width: auto;
  }

  .top-left-logo {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
  }

  .site-footer {
    text-align: center;
    padding: 20px;
    background-color: #f7f7f7;
    color: #666;
    font-size: 14px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
  }


  .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
  }
  
  .footer-links a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
  }
  
  .footer-links a:hover {
    color: #007bff;
  }

  .legal-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    color: #333;
  }
  
  .legal-section h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #000;
  }
  
  .legal-section p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

 /* ========== Mobile Responsive ========== */
@media screen and (max-width: 768px) {
  body {
    padding: 20px 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .container,
  .output-section,
  .faq,
  .site-footer {
    width: 100%;
    box-sizing: border-box;
  }

  input[type="text"] {
    width: 100%;
    font-size: 16px;
  }

  .generate-btn,
  .reset-btn,
  .copy-btn {
    width: 100%;
    margin-top: 10px;
    font-size: 15px;
    padding: 10px 16px;
  }

  .output-box {
    width: 100%;
    font-size: 15px;
  }

  .output-box pre,
  .output-box .formula-output,
  .output-box .explanation-output {
    font-size: 15px;
    line-height: 1.5;
  }

  label,
  .faq-question,
  .faq-answer {
    font-size: 15px;
  }

  header h1 {
    font-size: 1.6rem;
  }

  header p {
    font-size: 1rem;
  }

  footer {
    font-size: 0.9rem;
  }

  .logo-img {
    width: 140px;
    height: auto;
    position: absolute;
    top: 32px;
    left: 16px;
    z-index: 1000;
  }

  .container {
    padding-top: 160px; /* To clear logo height */
  }
}

.legal-section {
  display: none;
  padding: 20px;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-section h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.legal-section a {
  color: #007bff;
  text-decoration: underline;
}

/* Contact form style */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

#contact-form input,
#contact-form textarea {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
}

#contact-form button {
  padding: 10px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
}

#contact-form button:hover {
  background-color: #0056b3;
}

.faq {
  text-align: left;
}

.faq h2 {
  text-align: left;
  font-weight: bold; /* remove bold if desired */
}

.faq-answer {
  text-align: left;
}

/* === BLOG PAGE STYLES === */
.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-header {
  text-align: center;
  margin-bottom: 40px;
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-post {
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #ffffff;
}

.blog-post h3 {
  margin-top: 0;
  color: #007bff;
}

.blog-post p {
  margin: 10px 0;
  color: #333;
}

.read-more {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

.back-home {
  margin-bottom: 20px;
}

.back-home-link {
  color: #007bff;
  text-decoration: none;
  font-size: 16px;
}

.top-right-nav {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 1000;
}

.nav-link {
  font-size: 16px;
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
  padding: 8px 12px;
  border: 1px solid #007bff;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: #007bff;
  color: #fff;
}

.back-to-blogs {
  display: inline-block;
  margin: 20px 0;
  text-decoration: none;
  color: #007BFF;
  font-weight: bold;
}

.back-to-blogs:hover {
  text-decoration: underline;
}