:root {
  --bg: #0c1020;
  --card: #11162b;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f3f6ff;
  --muted: #c2c7d6;
  --accent: #7c5dff;
  --accent-2: #3ae1ff;
  --glow: 0 20px 60px rgba(124, 93, 255, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 93, 255, 0.22), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(58, 225, 255, 0.16), transparent 26%),
    linear-gradient(145deg, #0d1124 0%, #090c1a 60%, #050711 100%);
  display: block;
  padding: 40px 16px 64px;
  line-height: 1.6;
}

.page {
  width: min(1000px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 18px 45px rgba(5, 9, 20, 0.55);
  backdrop-filter: blur(10px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(124, 93, 255, 0.9);
}

.brand-text {
  font-size: 15px;
}

.language-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(124, 93, 255, 0.28), rgba(58, 225, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--glow);
}

.language-pill select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f3f6ff;
  font-weight: 700;
  font-size: 14px;
  outline: none;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lang-icon {
  font-size: 15px;
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(124, 93, 255, 0.12);
  color: #c9b6ff;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

h1 {
  margin: 0;
  font-size: clamp(36px, 3.6vw, 52px);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
}

.main-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  color: #dce2ff;
}

.target-words-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.label-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.target-words-input {
  max-width: 200px;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f3f6ff;
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(124, 93, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(124, 93, 255, 0.35), 0 12px 30px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

select option {
  background: rgba(11, 14, 26, 0.9);
  color: #f3f6ff;
}

select:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

.word-counter {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(58, 225, 255, 0.16);
  color: #a8eeff;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#intensityRange {
  accent-color: var(--accent);
}

.intensity-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.toggle-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.humanize-toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.humanize-toggle-button {
  white-space: normal;
  padding: 4px 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transition: var(--transition);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background-color: #0c1020;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.switch input:checked + .slider {
  background: linear-gradient(120deg, #7c5dff, #3ae1ff);
  border-color: rgba(124, 93, 255, 0.8);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
  background: #f3f6ff;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  flex: 1 1 220px;
  min-width: 180px;
}

.result-word-count {
  color: var(--muted);
  font-size: 12px;
  align-self: flex-end;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn,
.btn,
.guides-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  background: linear-gradient(120deg, #7c5dff, #3ae1ff);
  color: #05060f;
  font-weight: 700;
  padding: 13px 18px;
  border-radius: 14px;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow var(--transition), filter var(--transition), opacity var(--transition), background 0.2s ease;
  box-shadow: 0 16px 40px rgba(58, 225, 255, 0.22), 0 12px 30px rgba(124, 93, 255, 0.32);
  text-decoration: none;
}

.primary-btn:hover,
.btn:hover,
.guides-link-button:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.04);
}

.primary-btn:active,
.btn:active,
.guides-link-button:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.human-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.btn.secondary,
.guides-link-button {
  background: rgba(255, 255, 255, 0.08);
  color: #e8ecfb;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.btn.secondary:hover,
.guides-link-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}

h2,
h3 {
  margin: 0;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.result-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 93, 255, 0.4);
  box-shadow: var(--glow);
}

.result-card strong {
  font-size: 14px;
  color: var(--muted);
}

.result-card p {
  margin: 0;
  line-height: 1.6;
  color: #e6e9f7;
}

.status,
.error {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(124, 93, 255, 0.35);
  background: rgba(124, 93, 255, 0.08);
  color: var(--text);
}

.error {
  border-color: rgba(58, 225, 255, 0.5);
  background: rgba(58, 225, 255, 0.08);
}

.status.loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status.loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-btn,
.favorite-btn {
  align-self: flex-start;
}

.favorite-btn.active {
  background: rgba(124, 93, 255, 0.18);
  color: var(--accent-2);
  border-color: rgba(58, 225, 255, 0.6);
  box-shadow: var(--glow);
}

.muted {
  color: var(--muted);
  grid-column: 1 / -1;
}

.examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.example-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.example-card:hover {
  transform: translateY(-2px);
  border-color: rgba(58, 225, 255, 0.6);
  box-shadow: var(--glow);
}

.example-card h4 {
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 93, 255, 0.18);
  color: #dfe7ff;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

.example-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.example-btn {
  width: fit-content;
}

.ia-notice {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.guides-teaser {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  box-shadow: 0 14px 32px rgba(5, 9, 20, 0.45);
}

.guides-teaser h2 {
  margin: 0;
  letter-spacing: -0.01em;
}

.guides-teaser p {
  margin: 0;
  color: var(--muted);
}

.guides-teaser .guides-link-button {
  align-self: center;
  min-width: 160px;
}


.site-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 40px;
  padding: 20px 0;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.7);
}

.footer-inner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  margin: 0;
}

.footer-nav {
  display: flex;
  align-items: center;
}

.footer-nav a {
  color: rgba(226, 232, 240, 0.9);
  margin-left: 16px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-nav a:hover {
  color: #ffffff;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(124, 93, 255, 0.3);
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 10, 20, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 18px;
  display: none;
  z-index: 30;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cookie-banner.visible {
  display: flex;
}

.cookie-banner a {
  color: var(--accent-2);
  text-decoration: underline;
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  body {
    padding: 24px 12px 40px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn {
    width: 100%;
  }

  .language-pill {
    width: 100%;
    justify-content: flex-end;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav a {
    margin-left: 0;
    margin-right: 12px;
  }
}
