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

:root {
  --teal: #2a7c6f;
  --teal-light: #e8f5f3;
  --teal-mid: #3a9e8e;
  --cream: #faf9f7;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --star-on: #f59e0b;
  --star-off: #d1d5db;
  --error: #dc2626;
  --success-bg: #f0fdf4;
  --success-text: #166534;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* MAIN */
main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 64px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 44px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 8px 32px rgba(0, 0, 0, 0.04);
}

.card-header {
  text-align: center;
  margin-bottom: 36px;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--teal-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
}

.card-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.card-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* STAR RATING */
.star-section {
  margin-bottom: 28px;
  text-align: center;
}

.star-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.stars {
  display: inline-flex;
  gap: 6px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: transform 0.15s ease;
  line-height: 1;
}

.star-btn:hover {
  transform: scale(1.15);
}

.star-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.star-btn svg {
  width: 36px;
  height: 36px;
  fill: var(--star-off);
  transition: fill 0.15s ease;
}

.star-btn.active svg,
.star-btn.hovered svg {
  fill: var(--star-on);
}

.star-caption {
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 500;
  margin-top: 10px;
  min-height: 20px;
  transition: opacity 0.2s;
}

.star-error {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 6px;
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.optional {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

input,
textarea {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 124, 111, 0.1);
  background: #fff;
}

input.invalid,
textarea.invalid {
  border-color: var(--error);
}

.field-error {
  font-size: 0.72rem;
  color: var(--error);
}

/* SUBMIT */
.btn-submit {
  width: 100%;
  margin-top: 24px;
  padding: 15px;
  background: var(--teal);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--teal-mid);
  box-shadow: 0 4px 14px rgba(42, 124, 111, 0.3);
}

.btn-submit:active {
  transform: scale(0.99);
}

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

/* SUCCESS STATE */
.success-state {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: #16a34a;
}

.success-state h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.success-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.success-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 16px 0;
}

.success-stars svg {
  width: 24px;
  height: 24px;
  fill: var(--star-on);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* SPINNER */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 560px) {
  .card {
    padding: 32px 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .card-header h1 {
    font-size: 1.3rem;
  }
}
