/* General styling */
body {
  font-family: 'Inter', 'Lato', 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: #f9f9f9;
  color: #222;
  line-height: 1.7;
}

main {
  max-width: 800px;
  margin: 2rem auto 2rem auto;
  padding: 0 1.5rem;
}

header, footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0 1.5rem;
}

header h1 {
  font-size: 2.4rem;
  margin-bottom: 0.25em;
  font-weight: 800;
  letter-spacing: -1px;
}

header p {
  margin-bottom: 1.5em;
  color: #555;
  font-size: 1.1rem;
}

footer {
  margin-top: 3rem;
  padding-bottom: 2rem;
  text-align: center;
  color: #888;
  font-size: 0.95rem;
  border-top: 1px solid #eee;
}
.hidden { display: none; }

/* --- Blog Link Button (Homepage) --- */
.blog-link-btn {
  display: inline-block;
  background: linear-gradient(90deg, #ffe066 60%, #ffdd00 100%);
  color: #222;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75em 1.5em;
  border-radius: 2em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-decoration: none;
  margin-top: 1em;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.blog-link-btn:hover {
  background: linear-gradient(90deg, #ffe066 40%, #fffbe9 100%);
  color: #b38600;
  box-shadow: 0 4px 18px rgba(0,0,0,0.11);
}

/* --- Blog Header & Navigation --- */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fffbe9;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.06);
  border-bottom: 1px solid #f6e7c2;
  padding: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem 0.5rem 1.5rem;
  gap: 1.2rem;
}
.blog-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 1.2rem;
}
.header-titles {
  flex: 1 1 auto;
}
.header-titles h1 {
  margin: 0 0 0.25em 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -1px;
}
.header-titles p {
  margin: 0 0 0.5em 0;
  color: #555;
  font-size: 1.04rem;
}
.blog-nav {
  display: flex;
  gap: 1.1rem;
}
.blog-nav a {
  color: #b38600;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.06rem;
  padding: 0.3em 0.7em;
  border-radius: 6px;
  transition: background 0.16s, color 0.16s;
}
.blog-nav a:hover {
  background: #ffe066;
  color: #333;
}
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem 0.4rem 0.7rem;
  }
  .blog-nav {
    gap: 0.5rem;
  }
  .header-titles h1 {
    font-size: 1.1rem;
  }
}

/* --- Blog Footer --- */
.blog-footer {
  background: #fffbe9;
  border-top: 1px solid #f6e7c2;
  margin-top: 3rem;
  padding-bottom: 2rem;
  text-align: center;
  color: #888;
  font-size: 0.95rem;
  box-shadow: 0 -2px 12px 0 rgba(0,0,0,0.04);
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0 1.5rem;
}
.footer-nav {
  margin-top: 1.2em;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #b38600;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.3em 0.7em;
  border-radius: 6px;
  transition: background 0.16s, color 0.16s;
}
.footer-nav a:hover {
  background: #ffe066;
  color: #333;
}
@media (max-width: 600px) {
  .footer-inner {
    padding: 1rem 0.7rem 0 0.7rem;
  }
  .footer-nav {
    gap: 0.5rem;
  }
}

/* --- Blog Post List Layout & Spacing --- */
ul.post-list {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem;
}

@media (max-width: 800px) {
  ul.post-list {
    grid-template-columns: 1fr;
  }
}

ul.post-list li {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.06);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  transition: box-shadow 0.2s, transform 0.18s cubic-bezier(.22,1,.36,1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}
ul.post-list li:hover {
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.13);
  transform: translateY(-3px) scale(1.025);
}
/* Accent bar for visual pop */
ul.post-list li::before {
  content: '';
  display: block;
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, #ffdd00 0%, #ffc107 100%);
  border-radius: 16px 0 0 16px;
}
/* Optional thumbnail support */
.post-thumbnail {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.1rem;
  background: #f5f5f5;
  display: block;
}
/* Divider below title */
ul.post-list strong {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.2em;
  color: #1a1a1a;
  display: block;
  position: relative;
  z-index: 1;
}
ul.post-list strong::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #ffe066;
  margin: 0.7em 0 0.3em 0;
  border-radius: 2px;
}

ul.post-list li:hover {
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.10);
}
ul.post-list li a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}
ul.post-list strong {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.1em;
  color: #1a1a1a;
  display: block;
}
ul.post-list .summary {
  color: #555;
  font-size: 1.07rem;
  margin-top: 0.5em;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Add more vertical space between sections */
section {
  margin-bottom: 3rem;
}

@media (max-width: 600px) {
  main, header, footer {
    padding: 1rem;
  }
  ul.post-list li {
    padding: 1.2rem 0.7rem 1rem 0.7rem;
  }
  header h1 {
    font-size: 1.5rem;
  }
}

/* End Blog Post List Layout & Spacing */

#intro, #pain-point, #beast-preview, #confession-teaser, #onboard, #dashboard, #microtools {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 2.2rem 1.2rem 1.5rem 1.2rem;
  text-align: center;
  background: none;
}

/* Blog index main container centering */
.blog-header, .blog-footer, main, main > section {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog cards: left align text for readability */
ul.post-list, ul.post-list li, ul.post-list .summary, ul.post-list strong {
  text-align: left;
}


@media (max-width: 700px) {
  #intro, #pain-point, #beast-preview, #confession-teaser, #onboard, #dashboard, #microtools {
    padding: 1.2rem 0.3rem 1rem 0.3rem;
  }
}

#beast-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Allow the grid to adjust automatically */
  gap: 1rem;
}
#beast-choices button {
  background: white;
  border: 2px solid #ccc;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}
#beast-choices button:hover {
  border-color: #888;
}
#beast-choices img {
  max-width: 100%;
  height: auto;
}

/* Ensure the beast images are responsive */
#beast-choices .beast-img {
  width: 100%; /* Responsive width */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensures the image fits without distorting */
}

/* Dashboard and other buttons */
#beast-bar-container {
  margin: 1rem 0;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#log-spend,
#set-cap-btn,
#change-beast-btn {
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  background: #333;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.beast-static-container {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beast-img {
  width: 100%;
  height: auto;
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.2));
}

.beast-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  animation: popFade 0.8s ease-out;
}

.mood-happy { color: #4caf50; }
.mood-warning { color: #ffc107; }
.mood-angry { color: #f44336; }

/* Keyframe for animations */
@keyframes popFade {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* Donation button style */
.donation-button {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #ffdd00;
  color: #111;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: background 0.2s ease, transform 0.2s ease;
}
.donation-button:hover {
  background: #ffee55;
  transform: scale(1.05);
}

/* MEDIA QUERIES FOR RESPONSIVENESS */

/* Mobile view */
@media (max-width: 480px) {
  /* Ensure the grid adapts */
  #beast-choices {
    grid-template-columns: 1fr; /* Full-width on small screens */
  }

  /* Make text a bit more readable */
  h1, h2 {
    font-size: 1.5rem; /* Adjust the size for smaller devices */
  }

  p {
    font-size: 1rem; /* Adjust text for better readability */
  }

  /* Optional: Add some padding to elements */
  #beast-choices {
    padding: 0 1rem; /* Add padding on the sides */
  }
}

/* Tablet View */
@media (max-width: 768px) {
  #beast-choices {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Ensure there are 2-3 items per row */
  }
}

/* Desktop View */
@media (min-width: 1024px) {
  #beast-choices {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Ensure a good distribution of items on wide screens */
    gap: 20px; /* Adds space between items */
  }

  #beast-choices button {
    width: 100%; /* Ensures the buttons are full width within the grid cell */
  }
}
