body {
  font-family: system-ui, sans-serif;
  background-color: #1e1e1e;
  color: #e5e5e5;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 10px;
  max-width: 100%;
  align-self: center;
}

/* Optional Turnstile and input styling */
.captcha-container {
  margin-bottom: 10px;
}

#captchaLoading {
  text-align: center;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #bbb;
}

#captchaLoading.hidden {
  display: none;
}

/* Gray out inputs while Turnstile is pending */
.input-area.loading {
  filter: brightness(0.7);
  pointer-events: none; /* Prevent interactions */
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

h1 {
  font-size: clamp(1rem, 4vw, 2rem);
  margin: 10px 10px 10px;
  color: #fff;
  text-align: center;
}

h2{
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin: 10px 10px -10px 10px;
  color: #fff;
  text-align: center;
}

h3{
  font-weight: 400;
  max-width: 700px;
}

#please{
  max-width: 800px;
}

h5 {
  max-width: 800px;
  font-size: clamp(.5rem, 1.vw, 1rem);
  text-align: center;
  margin: 8px auto;
  color: #bbb;
  padding: 0 10px;
  margin-bottom: 30px;
  font-weight: 500;
}

p{
  max-width: 800px;
  font-size: clamp(.5rem, 1.75vw, 1.3rem);
  text-align: center;
  margin: 8px auto;
  color: #bbb;
  padding: 0 10px;
}

a{
  text-decoration: none;
}

a:visited{
  text-decoration: none;
  color:#bbb;
}

.chat-container {
  flex: .25;
  width: 85%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  box-sizing: border-box;
  max-height:50%;
}

.response {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  white-space: pre-wrap;
  color: #e5e5e5;
  word-wrap: break-word;
  font-size: medium;
}

.input-area-wrapper {
  position: relative;
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #2a2a2a;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #3a3a3a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  transition: filter 0.3s ease;
  min-height: 180px;
}

textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 12px;
  border-radius: 8px;
  background: #1f1f1f;
  color: #e5e5e5;
  box-sizing: border-box;
}

input[type="file"] {
  font-size: 0.9rem;
  color: #e5e5e5;
  background: transparent;
  border: none;
}

#clearImageBtn{
  align-self:flex-start ;
  padding: 12px 20px;
  font-size: .7rem;
  border: none;
  border-radius: 8px;
  background-color: #a31010;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#checkBtn{
  align-self: flex-end;
  padding: 12px 20px;
  font-size: 2rem;
  border: none;
  border-radius: 8px;
  background-color: #10a37f;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #0e8c6d;
}

/* CAPTCHA overlay styles */
.captcha-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 30, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.captcha-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.captcha-overlay + .input-area {
  filter: blur(2px);
}

.captcha-overlay.hidden + .input-area {
  filter: blur(0);
}

/* Turnstile container hidden but initialized */
.captcha-container {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: #e5e5e5;
  font-size: 0.95rem;
  transition: opacity 0.3s, height 0.3s;
}

/* Show Turnstile when needed */
.captcha-container.visible {
  opacity: 1;
  pointer-events: auto;
  height: auto;
}

#titleIcon {
  height: 40px;
  margin-bottom: -15px;
  margin-right: -10px;
}

/* 📱 Responsive adjustments */
@media (max-width: 600px) {
  body {
    font-family: system-ui, sans-serif;
    background-color: #1e1e1e;
    color: #e5e5e5;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 10px;
    max-width: 100%;
    align-self: center;
  }

  h1 {
    font-size: clamp(2.4rem, 4vw, 2rem);
    margin: 10px 10px 10px;
    color: #fff;
    text-align: center;
  }

  h2{
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin: 100px 10px -10px 10px;
    color: #fff;
    text-align: center;
  }

  h3{
    font-weight: 400;
  }

  #please{
    max-width: 800px;
    font-size: clamp(.3rem, 1.3vw, 1rem);
    margin-bottom: 40px;
  }

  h5 {
    max-width: 800px;
    font-size: clamp(.5rem, 4vw, 1rem);
    text-align: center;
    margin: 8px auto;
    color: #bbb;
    padding: 0 10px;
    margin-bottom: 30px;
    font-weight: 200;
  }

  p{
    max-width: 800px;
    font-size: clamp(.5rem, 3vw, 1.3rem);
    text-align: center;
    margin: 8px auto;
    color: #bbb;
    padding: 0 10px;
  }

  .chat-container {
    flex: .25;
    width: 95%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    box-sizing: border-box;
    max-height:50%;
  }

  .response {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    white-space: pre-wrap;
    color: #e5e5e5;
    word-wrap: break-word;
  }

  .input-area-wrapper {
    position: relative;
  }

  .input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #2a2a2a;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: filter 0.3s ease;
    min-height: 250px;
  }

  textarea {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    border: none;
    outline: none;
    font-size: 2rem;
    padding: 12px;
    border-radius: 8px;
    background: #1f1f1f;
    color: #e5e5e5;
    box-sizing: border-box;
  }

  input[type="file"] {
    font-size: 2rem;
    color: #e5e5e5;
    background: transparent;
    border: none;
  }

  #checkBtn{
    align-self: flex-end;
    padding: 12px 20px;
    font-size: 2rem;
    border: none;
    border-radius: 8px;
    background-color: #10a37f;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  button:hover {
    background-color: #0e8c6d;
  }

  #titleIcon {
    height: 48px;
    margin-bottom: -15px;
    margin-top: 90px;
    margin-right: -10px;
  }
}
