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

body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
  margin: 0;
}

/* Header */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  background: #f8f8f8;
  border-bottom: 2px solid #000;
}

header h1 {
  font-size: 2rem;
  color: black;
  margin: 0;
}

header .site-title {
  font-size: 2rem;
  font-weight: bold;
  color: black;
  margin: 0;
}

header h1 a,
header .site-title a {
  color: black;
  text-decoration: none;
}

header h1 a:hover,
header .site-title a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar {
  background: black;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
}

.navbar a:hover {
  text-decoration: underline;
}

/* Hero Section (Homepage) */
.hero {
  background: url("../images/bg.jpg") no-repeat center center/cover;
  min-height: calc(100vh - 120px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 50px;
  flex-wrap: wrap;
}

.tool-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-width: 300px;
  text-align: center;
}

.tool-card h2 {
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: black;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.btn:hover {
  background: #444;
}

/* Ko-fi Button */
.kofi-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #29abe0;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.kofi-btn:hover {
  background: #2389b0;
}

/* Tool Page (Scaler, Converter, Planner) */
.tool-page {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tool-page h2 {
  margin-bottom: 10px;
  text-align: center;
}

.tool-page form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ingredient {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.ingredient input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

button {
  padding: 10px;
  border: none;
  background: black;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background: #444;
}

#scaledOutput {
  margin-top: 15px;
  padding-left: 20px;
}

/* Planner Sections */
.planner-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ddd;
}

.planner-section:last-child {
  border-bottom: none;
}

.planner-section h3 {
  color: #333;
  margin-bottom: 0.5rem;
}

.planner-section h4 {
  color: #555;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.planner-section ul {
  list-style: none;
  padding-left: 0;
}

.planner-section ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.planner-section ul li:last-child {
  border-bottom: none;
}

.planner-section select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Header */
  header {
    padding: 1rem;
  }

  header .site-title {
    font-size: 1.5rem;
  }

  /* Navbar - Stack vertically on mobile */
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 10px;
    gap: 10px;
  }

  .navbar a {
    margin: 5px 0;
  }

  .nav-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .nav-right a {
    margin: 0 10px;
  }

  /* Hero Section - Better mobile layout */
  .hero {
    padding: 20px 15px;
    min-height: auto;
    gap: 20px;
  }

  .hero h1 {
    font-size: 1.8rem !important;
    margin: 1rem 0 !important;
  }

  .tool-card {
    max-width: 100%;
    width: 100%;
    padding: 15px;
  }

  /* Tool Pages */
  .tool-page {
    margin: 20px 15px;
    padding: 15px;
  }

  .tool-page h1 {
    font-size: 1.5rem;
  }

  /* Ingredient inputs - Stack on mobile */
  .ingredient {
    flex-direction: column;
    gap: 8px;
  }

  /* Ko-fi Button - Smaller on mobile */
  .kofi-btn {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  /* Forms */
  label {
    font-size: 0.95rem;
  }

  input, select, button {
    font-size: 1rem;
  }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 1.5rem !important;
  }

  .tool-card h2 {
    font-size: 1.3rem;
  }

  .navbar {
    padding: 8px;
  }

  .nav-right a {
    font-size: 0.9rem;
    margin: 0 5px;
  }
}
