:root {
  --bg-0: #0b1418;
  --bg-1: #122026;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #f3f7f8;
  --text-muted: #9bb0b8;
  --accent: #3ecf8e;
  --accent-strong: #2bb673;
  --accent-soft: rgba(62, 207, 142, 0.16);
  --danger: #f07178;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(62, 207, 142, 0.18), transparent 55%),
    radial-gradient(800px 500px at 100% 100%, rgba(56, 120, 140, 0.18), transparent 50%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 32px 28px 28px;
  animation: rise 420ms ease-out both;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.card h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.scale-hint {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.button-group[data-scale="5"] {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.button-group[data-scale="10"] {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 480px) {
  .button-group[data-scale="10"] {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

label.radio-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease,
    color 160ms ease, box-shadow 160ms ease;
  user-select: none;
}

label.radio-button:hover {
  border-color: rgba(62, 207, 142, 0.45);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

input[type="radio"]:focus-visible + label.radio-button {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="radio"]:checked + label.radio-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #062016;
  box-shadow: 0 8px 20px rgba(62, 207, 142, 0.28);
}

.comment-field textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 14px 14px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.comment-field textarea::placeholder {
  color: #6f858e;
}

.comment-field textarea:focus {
  outline: none;
  border-color: rgba(62, 207, 142, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.button-contained {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #062016;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button-contained:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(62, 207, 142, 0.25);
}

.button-contained:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-contained.is-loading {
  pointer-events: none;
}

.status-panel {
  text-align: center;
  padding: 12px 4px 4px;
}

.status-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
}

.status-icon.success {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-icon.warn {
  background: rgba(240, 193, 75, 0.14);
  color: #f0c14b;
}

.status-icon.error {
  background: rgba(240, 113, 120, 0.14);
  color: var(--danger);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.form.is-hidden,
.loading-state.is-hidden {
  display: none;
}

.foot-note {
  margin: 18px 0 0;
  text-align: center;
  color: #6f858e;
  font-size: 0.75rem;
}
