/* Base styles */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: #fff8e1;
  color: #4e342e;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
/* Nav container layout */
.quirky-nav {
  background: #fff176;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Left spud emoji */
.nav-left {
  font-size: 1.5rem;
}

/* Center links */
.quirky-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
  justify-content: center;
  flex-grow: 1;
}

.quirky-links li a {
  text-decoration: none;
  background: #ffcc80;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: bold;
  color: #4e342e;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease;
  display: inline-block;
}

/* Hamburger Button (Hidden on Desktop) */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #4e342e;
  margin-left: auto;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .quirky-nav .nav-container {
    flex-wrap: wrap;
  }

  .hamburger {
    display: block;
  }

  .quirky-links {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }

  .quirky-links.show {
    display: flex;
  }

  .nav-right {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }
}


/* Base button style */
.quirky-links li a {
  text-decoration: none;
  background: #ffcc80;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: bold;
  color: #4e342e;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease;
  display: inline-block;
}

/* Alternate tilts */
.quirky-links li:nth-child(odd) a:hover {
  transform: scale(1.1) rotate(-2deg);
  background: #ffb74d;
}

.quirky-links li:nth-child(even) a:hover {
  transform: scale(1.1) rotate(2deg);
  background: #ffb74d;
}


/* Right account link */
.nav-right .account-link {
  font-weight: bold;
  color: #4e342e;
  text-decoration: none;
  background: #ffe0b2;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-right .account-link:hover {
  background: #ffd180;
}


/* Hero section */
.hero {
  position: relative;
  padding: 3rem 1rem;
  padding-top: 6rem; /* Add extra top padding to give the sticker breathing room */
  text-align: center;
  background: #fff59d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.hero-spud {
  max-width: 120px;
  margin-bottom: 1rem;
}


.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero button {
  background: #795548;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.hero button:hover {
  background: #5d4037;
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 2.5rem 1.5rem;
  margin: 0 auto;
  text-align: center;
  width: 100%; /* ✅ Add this */
  display: block; /* ✅ Ensure not accidentally flex */
  
}


.section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section p {
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Hall of Fame / Gallery */
/* Constrain the gallery width */
.potato-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 2rem 1.5rem; /* ✅ More padding on top and bottom */
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  overflow-x: hidden;
  justify-items: center;
}


.potato-card {
  background: #fff3e0;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  font-size: clamp(0.8rem, 1.5vw, 1.1rem);
}

.potato-card:hover {
  transform: scale(1.05);
}

.potato-card img {
  width: 100%;
  height: auto;
  max-width: 100px;
  min-width: 40px;
  object-fit: contain;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  display: block;
}

html, body {
  overflow-x: hidden;
}



/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #ffe0b2;
  font-size: 0.9rem;
  margin-top: auto;
}


/* Burst-style sticker */
/* Base burst sticker */
.sticker-burst {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ff5722;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.5rem;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%,
    2% 35%, 39% 35%
  );
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 10;
  transform: rotate(-5deg);
  text-align: center;
  line-height: 1.1;
  word-wrap: break-word;
}






.footer {
  background: #ffe0b2;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links li a {
  text-decoration: none;
  color: #4e342e;
  transition: color 0.2s ease;
}

.footer-links li a:hover {
  color: #5d4037;
}




.spud-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.spud-button {
  background: #ffcc80;
  color: #4e342e;
  font-weight: bold;
  padding: 1rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.1rem;
  transition: transform 0.2s ease, background 0.3s ease;
}

.spud-button:hover {
  transform: scale(1.05);
  background: #ffb74d;
}

.spud-info {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.5;
  color: #5d4037;
  text-align: center;
}

.hero.no-spud {
  padding-top: 5rem;
  padding-bottom: 3rem;
}






.spud-option-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Always 4 columns */
  gap: 1.5rem;
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}


.spud-pick {
  background: #fff8e1;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0.5rem;
  transition: border 0.2s ease, transform 0.2s;
  cursor: pointer;
  text-align: center;
}

.spud-pick img {
  width: 100%;
  max-width: 80px;
  height: auto;
  border-radius: 50%;
}

.spud-pick:hover {
  transform: scale(1.05);
}

.spud-pick.selected {
  border: 3px solid #795548;
}

/* Make adopt form background stand out */
.adopt-form-style {
  background: #f0f4c3; /* light greenish-yellow */
  border-top: 4px dashed #cddc39;
  border-bottom: 4px dashed #cddc39;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Style the naming area */
.spud-naming-area {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}



.spud-naming-area button {
  background: #8bc34a;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.spud-naming-area button:hover {
  background: #689f38;
  transform: translateY(-2px);
}

.register-form-style {
  background: #e1f5fe;
  border-top: 4px dotted #4fc3f7;
  border-bottom: 4px dotted #4fc3f7;
  padding: 3rem 1rem;
}

.spud-naming-area textarea,
.spud-naming-area input[type="file"] {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border: 2px solid #d7ccc8;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-sizing: border-box;
  background: #ffffff;
}

.spud-naming-area textarea:focus,
.spud-naming-area input[type="file"]:focus {
  outline: none;
  border-color: #4fc3f7;
}


/* Styled file upload */
.custom-file-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.custom-file-upload input[type="file"] {
  display: none;
}

.upload-btn {
  background: #ff9800;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.upload-btn:hover {
  background: #fb8c00;
}

#file-name {
  font-style: italic;
  font-size: 0.95rem;
  color: #6d4c41;
  max-width: 100%;
  word-break: break-word;
}


.custom-file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.upload-btn {
  background: #ff9800;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 0.5rem;
}

.upload-btn:hover {
  background: #fb8c00;
}

.spud-preview-frame {
  width: 150px;
  height: 150px;
  border: 3px dashed #ccc;
  border-radius: 12px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3e5f5;
  overflow: hidden;
  position: relative;
}

.spud-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.custom-file-preview input[type="file"] {
  display: none;
}


.spud-naming-area label {
  margin-bottom: 0.4rem;
  display: block;
}

.spud-naming-area input,
.spud-naming-area textarea {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  margin-bottom: 0.25rem; /* 👈 tight margin to hug the counter */
}

.char-counter {
  font-size: 0.75rem;
  color: #7b6c5f;
  opacity: 0.6;
  margin-top: 0;
  margin-bottom: 1rem;
  margin-left: 0.25rem;
  display: block;
  text-align: left;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.char-counter.warning {
  color: #d32f2f;
  opacity: 1;
}


/* Universal box-sizing for sanity */
* {
  box-sizing: border-box;
}

/* Make the adopt form responsive */
.spud-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

/* Center and limit width of the traits box */
.spud-traits {
  background: #fff8dc;
  border: 2px dashed #d4a373;
  padding: 1.5rem;
  border-radius: 16px;
  margin-top: 2rem;
  font-size: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.3s ease-in-out;
}

/* Naming input area */
.spud-naming-area {
  margin-top: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.spud-traits ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}

.spud-traits li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.spud-traits li::before {
  content: "🥔";
  position: absolute;
  left: 0;
  top: 0;
}


/* Grid tweaks for mobile */
.spud-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

@media (max-width: 600px) {
  .spud-form,
  .spud-traits,
  .spud-naming-area,
  .spud-option-grid {
    padding: 1rem;
    width: 95%;
  }

  .spud-traits h3 {
    text-align: center;
  }
}


section#adopt {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  box-sizing: border-box;
  width: 90%;
  line-height: 1.6;
  font-size: 1rem;
}

@media (max-width: 600px) {
  section#adopt {
    padding: 1.5rem 1rem;
    font-size: 0.95rem;
    width: 95%;
  }
}


.certificate-form-style {
  background: #f3e5f5; /* pastel purple */
  border-top: 4px dashed #ce93d8;
  border-bottom: 4px dashed #ce93d8;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-radius: 16px;
}

.certificate-options {
  text-align: left;
  max-width: 500px;
  margin: 0 auto 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 1rem;
  line-height: 1.8;
}

.certificate-options label {
  display: block;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.certificate-options input[type="radio"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

.continue-btn {
  background: #8e24aa;
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.continue-btn:hover {
  background: #6a1b9a;
  transform: translateY(-2px);
}


.price-tag {
  float: right;
  font-weight: bold;
  background: #f8bbd0;
  color: #880e4f;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

@media (max-width: 600px) {
  .price-tag {
    float: none;
    display: inline-block;
    margin-left: 0.5rem;
  }
}



.account-form-style {
  background: #ffd8cc; /* Pastel coral */
  border-top: 4px dotted #ffab91;
  border-bottom: 4px dotted #ffab91;
  padding: 3rem 1rem;
}



#under13-confirm {
  background: #fff3cd;
  border: 2px dashed #ff9800;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  margin-top: 1rem;
  font-family: inherit;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
  font-size: inherit;
  flex-wrap: nowrap;
}

.checkbox-inline input[type="checkbox"] {
  transform: scale(1.2);
  margin: 0;
  flex-shrink: 0;
}

.consent-box {
  background: #fff3cd;
  border: 2px dashed #ff9800;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  line-height: 1.4;
  font-family: inherit;
  flex-wrap: wrap;
}

.consent-box input[type="checkbox"] {
  transform: scale(1.2);
  margin: 0;
  flex-shrink: 0;
}

.consent-box label {
  margin: 0;
  flex: 1;
  text-align: left;
}

.consent-box a {
  color: #c2185b;
  font-weight: bold;
  text-decoration: underline;
}

/* Style for the validation message */
.validation-message {
  color: #D8000C; /* A strong red color */
  font-size: 0.9em;
  height: 1.2em; /* Reserve space to prevent layout shift */
  margin-top: 4px;
}

/* Style for the input field when there's an error */
.input-error {
  border: 2px solid #D8000C !important;
}


.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-size: 0.9em;
}

.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

.admin-table th {
    background-color: #fff8da;
}

.admin-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.admin-table button {
    padding: 4px 8px;
    font-size: 0.9em;
    margin-right: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
}

    body {
      margin: 0;
      font-family: "Segoe UI", sans-serif;
      background-color: #fdf8ed;
      color: #4a3c28;
    }
    .spudfolio-wrapper {
      display: flex;
      justify-content: center;
      padding: 3rem 1rem;
      gap: 2rem;
    }
    .sidebar {
      background: #fff8da;
      border-radius: 1rem;
      padding: 2rem;
      width: 220px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      position: sticky;
      top: 2rem;
      height: fit-content;
    }
    .sidebar h2 {
      font-size: 1.4rem;
      margin-bottom: 1rem;
      text-align: center;
    }
    .sidebar ul {
      list-style: none;
      padding: 0;
    }
    .sidebar li {
      margin: 1rem 0;
    }
    .sidebar a {
      text-decoration: none;
      font-weight: bold;
      color: #5c4422;
      display: block;
      padding: 0.6rem 1rem;
      border-radius: 0.5rem;
      transition: background 0.2s, transform 0.1s;
    }
    .sidebar a:hover {
      background-color: #f1e2aa;
      transform: translateX(3px);
    }
    /* New Style for the Logout Button */
    .logout-btn {
      width: 100%;
      border: none;
      background-color: #ffb3b3; /* Pastel red */
      color: #5c4422;
      padding: 0.6rem 1rem;
      border-radius: 0.5rem;
      font-weight: bold;
      font-size: 1em;
      font-family: "Segoe UI", sans-serif;
      cursor: pointer;
      text-align: left;
      transition: background-color 0.2s;
    }
    .logout-btn:hover {
      background-color: #ffa4a4; /* Slightly darker pastel red */
    }
    .main-dashboard {
      background: white;
      border-radius: 1rem;
      padding: 2.5rem;
      max-width: 700px;
      flex-grow: 1;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .auth-form {
      max-width: 400px;
      margin: auto;
      text-align: center;
    }
    .auth-form input {
      width: 100%;
      padding: 0.6rem;
      margin-bottom: 1rem;
      border-radius: 0.4rem;
      border: 1px solid #ccc;
    }
    .auth-form button {
      padding: 0.6rem 1.2rem;
      background-color: #eccb63;
      border: none;
      border-radius: 0.5rem;
      font-weight: bold;
      cursor: pointer;
    }
    .auth-form button:hover {
      background-color: #e0b833;
    }
    .footer {
      margin-top: 4rem;
      padding: 2rem;
      background-color: #f5e7c5;
      text-align: center;
    }
    .footer-links {
      list-style: none;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .footer-links li a {
      text-decoration: none;
      color: #6e532b;
      font-weight: 600;
    }

    /* Styling for the spud list */
.spud-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left; /* Reset text alignment for cards */
}
.spud-card {
    background-color: #fff8da; /* Match sidebar */
    border: 1px solid #e0b833;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.spud-card h3 {
    margin-top: 0;
    color: #4a3c28;
}
.spud-card p {
    color: #5c4422;
    font-style: italic;
}
.spud-card .meta {
    font-size: 0.9em;
    color: #6e532b;
    border-top: 1px solid #f1e2aa;
    padding-top: 1rem;
    margin-top: 1rem;
}


/* admin-styles.css */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-size: 0.9em;
}

.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background-color: #fff8da;
}

.admin-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.admin-table button {
    padding: 4px 8px;
    font-size: 0.9em;
    margin-right: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Re-using auth-form styles from your spudfolio */
.auth-form {
    max-width: 400px;
    margin: auto;
    text-align: center;
}
.auth-form input {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border-radius: 0.4rem;
    border: 1px solid #ccc;
}
.auth-form button {
    padding: 0.6rem 1.2rem;
    background-color: #eccb63;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
}
.auth-form button:hover {
    background-color: #e0b833;
}