/* ===========================
   Bechdel Test Checker — Styles
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Font --- */
@font-face {
  font-family: "Coolvetica";
  src: url("fonts/Coolvetica-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coolvetica";
  src: url("fonts/Coolvetica-RegularItalic.otf") format("opentype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Coolvetica", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  letter-spacing: 0.02em;
  background: #EEE9E1;
  color: #2D3039;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5;
}

/* --- Site Title (top-left) --- */
.site-title {
  position: fixed;
  top: 1.2rem;
  left: 1.5rem;
  font-size: 0.9rem;
  color: #A8467D;
}

.site-title .lucide {
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
  fill: currentColor;
}

/* --- Info Link (top-right) --- */
.info-link {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 0.9rem;
  color: #A8467D;
  text-decoration: none;
  transition: color 0.2s;
}

.info-link:hover {
  color: #2D3039;
  text-decoration: underline;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1000px;
  padding: 10vh 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* --- Hero / Question --- */
.hero {
  text-align: center;
  margin-top: 21px;
  margin-bottom: 0;
}

.hero-question {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #2D3039;
}

/* Inline input styled as fill-in-the-blank */
.input-wrapper {
  display: inline-block;
  position: relative;
}

#movie-input {
  font-family: inherit;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  font-style: italic;
  color: #2058A4;
  background: none;
  border: none;
  border-bottom: 3px solid #2058A4;
  outline: none;
  text-align: center;
  width: 16ch;
  min-width: 16ch;
  padding: 0;
  transition: border-color 0.2s;
}

#movie-input::placeholder {
  color: #7BA3CC;
  font-style: italic;
}

#movie-input:focus {
  border-bottom-color: #3570C0;
}

/* --- Button --- */
.btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: inherit;
  color: #FFFFFF;
  background: #2058A4;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn:hover {
  background: #A8467D;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Hidden utility --- */
.hidden {
  display: none !important;
}

/* --- Loading --- */
.loading {
  text-align: center;
  padding: 2rem 0;
}

.loading-text {
  font-size: 1.15rem;
  color: #C5C0B8;
  font-style: italic;
}

/* Animated ellipsis */
.dots::after {
  content: "";
  animation: ellipsis 1.4s steps(4, end) infinite;
}

@keyframes ellipsis {
  0%  { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* --- Error Card --- */
.error-card {
  text-align: center;
  padding: 1.5rem 2rem;
  background: rgba(180, 40, 55, 0.07);
  border: 1px solid rgba(180, 40, 55, 0.30);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
}

.error-card p {
  color: #DD4132;
  font-size: 1.05rem;
}

/* --- Result Card --- */
.result-card {
  padding: 0 2.2rem;
  max-width: 1000px;
  width: 100%;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Fade-in animation */
.result-card.fade-in {
  animation: fadeSlideUp 0.45s ease-out both;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

/* Yes! / No. badge */
.badge {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  padding: 0;
  border: none;
  background: none;
  letter-spacing: 0;
  text-transform: none;
}

.badge-pass { color: #3D9B71; }
.badge-fail { color: #DD4132; }

/* --- Did you mean hint --- */
.did-you-mean {
  font-style: italic;
  font-size: 1.4rem;
  color: #A8467D;
  margin-bottom: 0.3rem;
}

/* --- Result body (subtitle) --- */
.result-body {
  font-size: 1.6rem;
  color: #2D3039;
  max-width: 600px;
  margin: -11px auto 1.2rem;
  line-height: 1.25;
}

/* --- Result link --- */
.result-link {
  display: inline-block;
  color: #2D3039;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0;
  margin-top: -7px;
  transition: color 0.2s;
}

.result-link:hover {
  color: #A8467D;
  text-decoration: underline;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: #2D3039;
  font-size: 0.8rem;
}

.footer .lucide {
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
  fill: currentColor;
}

.footer a {
  color: #A8467D;
  text-decoration: none;
}

.footer a:hover {
  color: #2D3039;
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  #movie-input {
    min-width: 10ch;
    width: 10ch;
  }

  .container {
    padding: 5vh 1rem 0.5rem;
  }
}
