/* ---------------- BASIC RESET ---------------- */
*, *::before, *::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* ---------------- BODY ---------------- */
body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #ebdbb2;
  background-color: #1d2021;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 72px;
  transition: all 0.3s ease;
}

/* ---------------- NAVBAR ---------------- */
.navbar {
  width: 100%;
  padding: 12px 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  transition: all 0.3s ease;
  z-index: 10;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
}

.nav-links li a {
  color: #ebdbb2;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.nav-links li a:hover {
  color: #fabd2f;
}

/* ---------------- THEME SELECTOR ---------------- */
.theme-selector button {
  margin-left: 10px;
  padding: 6px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ---------------- THEME BUTTONS ---------------- */
.dark-btn {
  background: #1d2021;
  color: #fe8019 !important;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.dark-btn:hover {
  background: #282828;
}

.light-btn {
  background: #f2e5bc;
  color: #3c3836 !important;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.light-btn:hover {
  background: #ebdbb2;
}

.win95-btn {
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  font-family: 'Fixedsys', "MS Sans Serif", Tahoma, sans-serif !important;
  font-size: 14px;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff;
  color: black !important;
}
.win95-btn:active {
  box-shadow: inset 2px 2px #000;
}

@font-face {
  font-family: 'Fixedsys';
  src: url('/static/fonts/Fixedsys.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.win95-font h1,
.win95-font h2,
.win95-font .navbar,
.win95-font .footer {
  font-family: 'Fixedsys', "MS Sans Serif", Tahoma, sans-serif !important;
}

@font-face {
  font-family: 'ComicSans';
  src: url('/static/fonts/ComicSans.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.xp-btn {
  padding: 6px 14px;
  background: linear-gradient(to bottom, #4facfe, #00f2fe);
  color: #fff !important;
  border: 2px solid #007acc;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  font-family: 'ComicSansLocal', "Comic Sans MS", "MS Sans Serif", sans-serif !important;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.xp-btn:hover {
  background: linear-gradient(to bottom, #6fb1fc, #2ee8f9);
}

.xp-font h1,
.xp-font h2,
.xp-font .navbar,
.xp-font .footer {
  font-family: 'ComicSans', "Comic Sans MS", "MS Sans Serif", sans-serif !important;
}

/* ---------------- CONTAINER ---------------- */
.container {
  border-radius: 8px;
  width: 80%;
  max-width: 1200px;
  min-width: 500px;
  padding: 40px 30px;
  margin: 0px 0px 80px;
  background-color: #3c3836dd;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}

/* ---------------- TYPOGRAPHY ---------------- */
h1 {
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 3rem;
  color: #fbf1c7;
}

h2 {
  font-size: 1.25rem;
  font-weight: 400;
  color: #ebdbb2;
}

.highlight-email {
  color: #b57614 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

/* ---------------- FORM ---------------- */
#prompt-form {
  width: 100%;
}

.prompt {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.prompt label {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.prompt textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid #504945;
  font-size: 1.25rem;
  background-color: #282828;
  color: #ebdbb2;
  transition: all 0.3s ease;
  line-height: 1.6;
}
.prompt textarea:focus {
  outline: none;
  border-color: #fabd2f;
  box-shadow: 0 0 8px rgba(250, 189, 47, 0.3);
}

/* ---------------- SUBMIT BUTTON ---------------- */
.submit-btn {
  background-color: #fe8019;
  color: #1d2021;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.submit-btn:hover {
  background-color: #d65d0e;
  transform: scale(1.03);
}
.submit-btn:active {
  transform: scale(0.97);
}

/* ---------------- RESPONSE BOX ---------------- */
#response-box {
  margin-top: 20px;
  width: 100%;
  text-align: left;
  position: relative;
}
#response-output {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #282828;
  padding: 12px;
  border-radius: 6px;
  min-height: 80px;
  font-size: 1rem;
}

#spinner {
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #fe8019;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hidden {
  display: none;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------------- FOOTER ---------------- */
.footer {
  width: 100%;
  padding: 12px 30px;
  background-color: #3c3836;
  color: #ebdbb2;
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.5);
  font-size: 0.95rem;
  z-index: 10;
}

.footer-text {
  font-weight: 400;
}

.footer-link {
  color: #fabd2f;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fe8019;
}

/* ---------------- SHARE WHATSAPP ---------------- */

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #25d366;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.share-btn:hover {
  background-color: #1ebe5b;
}

.share-btn svg {
  flex-shrink: 0;
}

/* ---------------- RESPONSIVENESS ---------------- */
@media (max-width: 768px) {
  .navbar {
    justify-content: center;
    align-items: center;
    flex-direction: row;
    align-items: center;
    padding: 6px 15px;
    gap: 8px;
    height: 48px;
  }

  .nav-links {
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .nav-links li a {
    font-size: 0.85rem;
  }

  .theme-selector {
    display: flex;
    gap: 4px;
  }

  .theme-selector button {
    flex: unset;
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  /* Container */
  .container {
    width: 95%;
    min-width: unset;
    padding: 20px;
    gap: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1rem;
  }

  .prompt label {
    font-size: 1rem;
  }

  .prompt textarea {
    min-height: 120px;
    font-size: 1rem;
    padding: 10px;
  }

  .submit-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
  }

  .footer {
    flex-direction: row;
    justify-content: center;
    gap: 4px;
    font-size: 0.65rem;
    text-align: center;
    padding: 8px 15px;
    height: auto;
  }

  #response-box {
    font-size: 0.9rem;
  }
}

