/* ========== Base ========== */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  color: #111;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}


/* ========== Header ========== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 1rem 0 0;
  margin-bottom: 0rem;
}

.site-logo {
  max-width: 136px;
  /* Normal desktop size */
  width: 100%;
  height: auto;
  display: block;
}

.site-header img {
  width: 100%;
  max-width: 136px;
}


.site-header .tagline {
  font-size: 1rem;
  color: #444;
  margin: 0.2rem 0 0;
  font-style: italic;
}


/* ========== Tip Box ========== */
.tip-box {
  display: none;
  background: #fff9db;
  border-left: 4px solid #facc15;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ========== Input Form ========== */
.input-section {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 2rem;
}

.input-area {
  padding-left: 0.75rem;
  margin-bottom: 4rem;
  margin-top: 1rem;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

.help-text {
  color: #555;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1rem;
}

.form-row,
.form-combined {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

input[type="text"],
select,
textarea,
button {
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.form-row input,
.form-row select,
.form-row button {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.form-row label {
  width: 120px;
  font-weight: bold;
  flex-shrink: 0;
}

.form-combined select {
  flex: 1;
  max-width: 250px;
  margin-right: 0.5rem;
}

.form-combined button,
#btnTranslateGo {
  max-width: 100px;
  background-color: #000000;
  /* Pure black */
  color: #ffffff;
  /* White text */
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.65rem 1rem;
  display: block;
  margin-left: 0;
  margin-right: auto;
  width: 25%;
}

/* Hover state for both button selectors */
.form-combined button:hover,
#btnTranslateGo:hover {
  background-color: #222222;
  /* Very dark gray (safe for AAA contrast) */
}


.form-combined button:focus,
#btnTranslateGo:focus {
  outline: 3px solid #d79b00;
  outline-offset: 2px;
}

#inputPhrase {
  width: 100%;
  max-width: 600px;
}

#btnClearInput {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 1.35rem;
  /* Slightly larger X */
  font-weight: bold;
  color: #fff;
  /* Bright white X */
  background-color: #666;
  /* Darker gray circle for contrast */
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.clear-btn {
  font-size: 18px !important;
  /* Bigger X */
  color: #fff !important;
  /* Brighter white */
  background-color: #999 !important;
  /* Darker circle for contrast */
  width: 24px !important;
  height: 24px !important;
}

.clear-btn:hover,
.clear-btn:focus {
  background-color: #555 !important;
  color: #fff !important;
  outline: 2px solid #facc15;
  outline-offset: 2px;
}



/* ========== Results Table ========== */
#resultsTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 1rem;
}

#resultsTable td {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.label-cell {
  white-space: nowrap;
  font-weight: bold;
  line-height: 1.4;
}

.label-cell .ages {
  font-weight: normal;
  font-style: italic;
  font-size: 0.85rem;
  color: #666;
  margin-left: 0.25rem;
}

.icon-cell {
  width: 2rem;
  text-align: center;
}

/* ✅ Explain button styling */
.explain-text {
  font-size: 0.85rem;
  background-color: #fff4e5;
  /* light orange background */
  color: #b45309;
  /* dark amber/orange text */
  border: 1px solid #facc15;
  /* amber border */
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
  margin-left: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.explain-text:hover,
.explain-text:focus {
  background-color: #ffe8cc;
  /* slightly brighter on hover */
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.toclipboard {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
  color: #333;
}

.copy-label {
  margin-left: 0.3rem;
  font-size: 0.9rem;
  color: #007acc;
}


.toclipboard:hover {
  color: #007acc;
  /* or any hover effect you like */
}



.output-cell {
  line-height: 1.5;
  color: #222;
  word-break: break-word;
}

.explanation {
  margin-top: 0.5rem;
  background-color: #fffbe6;
  padding: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid #facc15;
  font-size: 0.95rem;
  width: 100%;
}

/* ========== Footer ========== */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  color: #555;
  /* Better contrast */
  background: none;
}


footer p {
  margin: 0.5rem 0;
}

footer a {
  color: #0054b4;
  text-decoration: none;
}


/* ========== Layout Container ========== */
.main-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ========== Utility ========== */
input:focus,
select:focus,
button:focus {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

#sampleSelect {
  width: 100%;
  max-width: 600px;
}



.header-separator {
  margin: 1.5rem;
  border: none;
  border-top: 1px solid #ccc;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}


@keyframes slow-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}

.blinking-emoji {
  animation: slow-blink 1.5s infinite;
  font-size: 1.5em;
  /* or try 1.75em or 2em */
  vertical-align: middle;
  /* optional for better alignment */
}

.wait-cursor {
  cursor: wait !important;
}

/* input[type="search"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  background-color: white;
} */

.team-member {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.team-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}


.team-member cite {
  display: block;
  text-align: left;
  margin-top: 0.5rem;
  font-style: normal;
  color: #666;
}

/* ========== Responsive (Mobile) ========== */
@media (max-width: 600px) {

  /* 🔻 Header layout */
  .site-logo {
    max-width: 100px;
  }

  .site-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 0.5rem 0 0;
    margin-bottom: 0;
  }

  .site-header h1 {
    font-size: 1.25rem;
    margin: 0.25rem 0;
  }

  .site-header .tagline {
    font-size: 0.9rem;
    margin: 0.2rem 0 0;
  }

  .header-separator {
    margin: 0.75rem 0;
  }

  /* 🔻 Form layout */
  .form-row,
  .form-combined {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row input,
  .form-row select,
  .form-row button,
  .form-combined select,
  .form-combined button {
    width: 100%;
    max-width: 100%;
  }

  .form-combined select {
    margin-right: 0;
  }

  #btnTranslateGo {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  /* 🔻 Results table layout */
  #resultsTable td {
    display: block;
    width: 100%;
    padding: 0.2rem 0 !important;
    border-bottom: none;
  }

  #resultsTable tr {
    display: block;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
  }

  .output-cell {
    padding-top: 0 !important;
    padding-bottom: 0.2rem !important;
    line-height: 1.4;
  }

  /* 🔻 Global layout + overflow */
  html,
  body {
    overflow-x: hidden;
  }

  .main-content,
  .input-area,
  .form-row,
  .form-combined,
  img,
  input,
  select,
  button {
    max-width: 100%;
    box-sizing: border-box;
  }
}