body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #113d19;
  color: white;
}

header {
  background-color: #1f5c2b;
  padding: 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
}

nav {
  margin-top: 10px;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

/* Core Sections */
.main-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.section {
  flex: 1 1 30%;
  min-width: 280px;
}
.section h2 {
  color: #a1ff59;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
  margin-top: 40px;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.hero-img {
  max-width: 400px;
  max-height: 350px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-text {
  max-width: 500px;
}

.hero-text h2 {
  font-size: 2.5em;
  line-height: 1.2;
  color: #a1ff59;
}

/* Form Fields */
input[type="text"],
input[type="color"],
select {
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0;
  display: block;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #52c41a;
  background-color: #174a23;
  color: white;
}

/* Steps Layout */
.main-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.main-steps .step {
  flex: 1;
  min-width: 300px;
}
.step-1, .step-2, .step-3, .step4 {
  flex: 1;
}

/* Price Section */
.price-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  background-color: #143c22;
  color: #a1ff59;
  padding: 40px 20px;
  margin-top: 40px;
  border-top: 2px solid #52c41a;
}

/* Widget Card */
.widget-card {
  background-color: #174a23;
  border: 2px solid #a1ff59;
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  margin: 40px auto;
  text-align: left;
  box-shadow: 0 0 10px rgba(0,255,100,0.2);
}

.widget-card h2 {
  color: #a1ff59;
  margin-bottom: 20px;
}

.widget-card p {
  font-size: 18px;
  margin: 10px 0;
}

.widget-card strong {
  color: #ffffff;
}

/* Calculator */
.calculator {
  margin-top: 20px;
}

.calculator label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

.calculator input[type="number"] {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #52c41a;
  background-color: #103b1f;
  color: white;
  font-size: 16px;
}

/* Buttons */
.button,
button {
  background-color: #52c41a;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover,
button:hover {
  background-color: #3a9e17;
}

/* Pagination */
.pagination-controls {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin: 10px 0;
}

/* Canvas */
#memeCanvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
}

/* Donation */
#donationWidget {
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
  border: 2px solid #90ee90;
  border-radius: 10px;
  background-color: #143c22;
}

#donationWidget p {
  font-size: 14px;
  color: #ccc;
  margin-top: 10px;
}

/* Meme Gallery Layout */
.meme-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

img.meme-thumbnail {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}


/* OVERRIDE RULE */
#memeGallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  width: 100%;
  justify-content: center;
}

/* Default Desktop Meme Gallery */
@media (min-width: 768px) {
  #memeGallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}


/* Mobile override */

  #memeGallery img {
    width: 100%;
    height: auto;
    border: 1px solid white;
    border-radius: 6px;
    cursor: pointer;
  }
}
/* Mobile Meme Gallery */
@media (max-width: 767px) {
  #memeGallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
    padding: 6px;
  }




  #memeGallery img:hover {
    transform: scale(1.05);
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }


/* Narrow desktop layout tweaks */
@media (max-width: 1024px) {
  .main-sections {
    flex-direction: column;
  }
}

@media (min-width: 1024px) {
  .hero-img {
    max-width: 350px;
    max-height: 300px;
  }
}
