/* lmfgtfy.lol — minimal Google-parody theme */
:root {
  --g-blue: #4285f4;
  --g-red: #ea4335;
  --g-yellow: #fbbc05;
  --g-green: #34a853;
  --bg: #060810;
  --surface: #0d1117;
  --border: #232a35;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --input-bg: #0d1117;
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --border: #dadce0;
  --text: #202124;
  --muted: #5f6368;
  --input-bg: #ffffff;
  --shadow: 0 1px 6px rgba(32, 33, 36, 0.16);
  color-scheme: light;
}

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

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; display: flex; flex-direction: column; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Google letter colors */
.c-blue { color: var(--g-blue); }
.c-red { color: var(--g-red); }
.c-yellow { color: var(--g-yellow); }
.c-green { color: var(--g-green); }
.c-muted { color: var(--muted); }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Creator view */
.creator-view {
  width: min(640px, 100% - 32px);
  margin: 0 auto;
  padding: 6vh 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.wordmark {
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1;
  user-select: none;
}

.wordmark-md { font-size: clamp(36px, 8vw, 56px); letter-spacing: -2px; }

.tagline {
  margin: 18px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

form { width: 100%; }

/* Search input — Google pill */
.search-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 0 20px;
  height: 54px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.search-shell:focus-within { border-color: var(--g-blue); }
.search-shell svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.search-shell input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
}
.search-shell input::placeholder { color: var(--muted); }
.char-count { flex: none; color: var(--muted); font-size: 12px; }

.field-error {
  min-height: 20px;
  margin-top: 8px;
  color: var(--g-red);
  font-size: 14px;
}

/* Tone picker */
.tone-fieldset { border: none; margin: 10px 0 24px; }

.tone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tone-option { position: relative; }
.tone-option input { position: absolute; opacity: 0; }

.tone-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.tone-card strong { font-size: 15px; }
.tone-card small { color: var(--muted); font-size: 12px; }

.tone-blue input:checked + .tone-card { border-color: var(--g-blue); }
.tone-yellow input:checked + .tone-card { border-color: var(--g-yellow); }
.tone-red input:checked + .tone-card { border-color: var(--g-red); }
.tone-option input:focus-visible + .tone-card { outline: 2px solid var(--g-blue); outline-offset: 2px; }
.tone-card:hover { border-color: var(--muted); }

/* Buttons */
.primary-button {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 24px;
  background: var(--g-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}
.primary-button:hover:not(:disabled) { filter: brightness(1.1); }
.primary-button:disabled { opacity: 0.45; cursor: default; }

.secondary-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.secondary-button:hover { border-color: var(--g-blue); }

/* Result box */
.result-box {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--g-green);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}
.result-box > strong {
  display: block;
  color: var(--g-blue);
  font-size: 14px;
  font-weight: 400;
  word-break: break-all;
  margin-bottom: 12px;
}
.result-actions { display: flex; gap: 10px; }

/* Trust row */
.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  margin-top: 44px;
  color: var(--muted);
  font-size: 13px;
}
.trust-row strong { display: block; font-size: 14px; margin-bottom: 2px; }

/* Experience view */
.experience-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.experience-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.skip-button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.skip-button:hover { color: var(--text); border-color: var(--muted); }

.experience-stage {
  flex: 1;
  width: min(640px, 100% - 32px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding-bottom: 8vh;
}

.experience-kicker {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.experience-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 14px 20px;
  box-shadow: var(--shadow);
  text-align: left;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.experience-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }

.experience-caret {
  flex: none;
  width: 2px; height: 22px;
  background: var(--g-blue);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.experience-quip { color: var(--muted); font-size: 15px; min-height: 22px; }

.experience-view .primary-button { max-width: 320px; }

.redirect-status { width: 100%; max-width: 320px; }
.redirect-track {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.redirect-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--g-blue), var(--g-red), var(--g-yellow), var(--g-green));
  transition: width 0.1s linear;
}
.redirect-status p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.redirect-status strong { color: var(--text); }

.experience-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  color: var(--muted);
  font-size: 12px;
}
.experience-footer a { color: var(--g-blue); text-decoration: none; font-weight: 700; }

/* Footer */
.site-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .tone-grid { grid-template-columns: 1fr; }
  .tone-card { flex-direction: row; align-items: center; justify-content: space-between; }
  .char-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
