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

.container {
  width: 100%;

  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}
@media (max-width: 1200px) {
  html {
    font-size: 15px;
  }
}
@media (max-width: 900px) {
  html {
    font-size: 14px;
  }
}
@media (max-width: 600px) {
  html {
    font-size: 13px;
  }
}

body {
  font-family: "Kanit", sans-serif;
  background: #fff; /* White background */
  margin: 0;
  padding: 0;
  color: #1a1a1a; /* Dark text for contrast */
}
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 1.5rem 2rem;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(44, 32, 106, 0.08);
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.site-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-family: "Kanit", sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  color: rgb(44, 32, 106);
  text-shadow: 0 0 1.5px #fff, 0 0 2.5px #fff; /* Smaller white outline */
}
.nav {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  border-radius: 6px;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 1px 4px rgba(44, 32, 106, 0.03); /* Purple */
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}
.nav-link {
  color: rgb(44, 32, 106); /* Purple */
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover {
  background: rgb(44, 32, 106); /* Purple */
  color: #fff;
}
#search-input,
.search-form button[type="submit"] {
  min-width: 0;
}
.search-form {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: flex-start; /* Align items to the top */
  margin: 2rem 0 1rem 0;
  gap: 0.5rem;
  flex-wrap: wrap;
}
#search-input {
  padding: 0.5rem 1rem;
  font-size: clamp(1rem, 4vw, 2rem);
  border: 2px solid rgb(44, 32, 106); /* Purple */
  border-radius: 4px;
  flex: 1 1 200px;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  margin-top: 0; /* Ensure no extra margin on input */
}
button,
button[type="submit"] {
  background: rgb(44, 32, 106); /* Purple */
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0; /* Remove extra top margin from button */
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(44, 32, 106, 0.03); /* Purple */
  display: inline-block;
}
button:hover,
button[type="submit"]:hover {
  background: #000;
  color: rgb(44, 32, 106); /* Purple */
}
.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.gif-img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(44, 32, 106, 0.1); /* Purple */
  display: block;
  border: 2px solid rgb(44, 32, 106); /* Purple */
  background: #fff;
}
.hero {
  background: rgb(44, 32, 106); /* Purple */
  color: #fff;
  padding: 2.5rem 1rem 2rem 1rem;
  text-align: center;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px rgba(44, 32, 106, 0.04); /* Purple */
  margin-bottom: 2rem;
}
.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.hero p {
  font-size: 1.3rem;
  color: #e6e6fa; /* Soft lavender for contrast */
}
.about,
.contact {
  background: #f8f6f8;
  margin: 2rem auto;
  padding: 2rem 1rem;
  border-radius: 8px;
  max-width: 700px;
  box-shadow: 0 1px 4px rgba(44, 32, 106, 0.03); /* Purple */
}
.about h2,
.contact h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: rgb(44, 32, 106); /* Purple */
}
.about p,
.contact p {
  font-size: 1.1rem;
  color: #333;
}
.footer {
  text-align: center;
  padding: 1.5rem 0 1rem 0;
  color: #fff;
  font-size: 1rem;
  background: rgb(44, 32, 106);
  margin-top: 2rem;
  border-top: 1px solid rgb(44, 32, 106);
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  border-radius: 0;
  position: relative;
}
.nav-toggle {
  display: none !important;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  position: absolute;
  right: 2rem;
  top: 40%;
  transform: translateY(-40%);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  background: rgb(44, 32, 106); /* Purple */
  border-radius: 2px;
  height: 3px;
  width: 28px;
  position: absolute;
  left: 0;
  transition: 0.3s;
}
.hamburger {
  top: 9px;
}
.hamburger::before {
  content: "";
  top: 0;
}
.hamburger::after {
  content: "";
  top: 18px;
}
@media (max-width: 1100px) {
  .nav-toggle {
    display: flex !important;
  }
  .nav {
    position: absolute;
    top: 70px;
    right: 1rem;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(44, 32, 106, 0.08); /* Purple */
    border-radius: 8px;
    padding: 1rem 2rem;
    min-width: 160px;
    display: none;
    z-index: 1000;
  }
  .nav.nav-open {
    display: flex;
  }
  .header {
    position: relative;
  }
  .nav-link {
    color: rgb(44, 32, 106); /* Purple */
    font-size: 1.2rem;
    padding: 0.7rem 0;
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid #eee;
  }
  .nav-link:last-child {
    border-bottom: none;
  }
}
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .nav {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .search-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  #search-input {
    width: 100%;
    max-width: 100%;
    font-size: 1.2rem;
  }
  button[type="submit"] {
    width: 100%;
    font-size: 1.2rem;
  }
  .gif-grid {
    grid-template-columns: 1fr;
    align-items: center;
  }
  .gif-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
  }
  .about,
  .contact {
    padding: 1rem 0.5rem;
    margin: 1rem 0.2rem;
  }
  .hero {
    padding: 1.5rem 0.5rem 1rem 0.5rem;
  }
}
@media (max-width: 900px) and (min-width: 601px) {
  .gif-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
@media (min-width: 1400px) {
  .container {
    max-width: 1600px;
  }
  .gif-img {
    max-width: 400px;
  }
}
.contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  margin: 2rem auto 0 auto;
  padding: 2rem 1.5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(44, 32, 106, 0.06); /* Purple */
  gap: 1.2rem;
}
.contact-form label {
  align-self: flex-start;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: rgb(44, 32, 106); /* Purple */
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid rgb(44, 32, 106); /* Purple */
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  background: #f8f6f8;
  margin-bottom: 0.5rem;
  transition: border 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border: 1.5px solid rgb(44, 32, 106); /* Purple */
  outline: none;
}
.contact-form button[type="submit"] {
  background: rgb(44, 32, 106); /* Purple */
  border: none;
  border-radius: 5px;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, color 0.2s;
}
.contact-form button[type="submit"]:hover {
  background: #000;
  color: rgb(44, 32, 106); /* Purple */
}
.site-logo {
  height: 80px;
  margin-right: 1rem;
  vertical-align: middle;
}
