:root {
  --primary: #00A896;
  --primary-dark: #007B6F;
  --primary-light: #E6F7F5;
  --accent: #FF8C00;
  --accent-light: #FFF3E0;
  --bg: #F0F4F8;
  --white: #FFFFFF;
  --text: #1A202C;
  --text-muted: #718096;
  --border: #E2E8F0;
  --star-active: #FFB800;
  --star-inactive: #E2E8F0;
  --success: #38A169;
  --danger: #E53E3E;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.5;
}

/* ─── Layout ─────────────────────────────────────────────────── */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 48px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 440px;
}

.screen.active {
  display: block;
  animation: fadeUp 0.35s ease;
}

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

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

@media (max-width: 480px) {
  .card { padding: 28px 20px; }
}

/* ─── Header logo ─────────────────────────────────────────────── */

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo-circle {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-circle svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

/* ─── Typography ──────────────────────────────────────────────── */

.screen-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.screen-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* ─── Bonus banner ────────────────────────────────────────────── */

.bonus-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFEDCC 100%);
  border: 1.5px solid #FFD580;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 28px;
}

.bonus-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.bonus-text {
  font-size: 14px;
  color: #7A4D00;
  line-height: 1.45;
}

.bonus-text strong {
  font-size: 16px;
  color: #5C3600;
  display: block;
  margin-bottom: 2px;
}

/* ─── Stars ───────────────────────────────────────────────────── */

.stars-wrap {
  text-align: center;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

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

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

.star-btn:active {
  transform: scale(0.95);
}

.star-btn .star {
  font-size: 52px;
  color: var(--star-inactive);
  transition: color 0.18s ease, text-shadow 0.18s ease;
  display: block;
}

.star-btn.lit .star,
.star-btn.hover .star {
  color: var(--star-active);
  text-shadow: 0 2px 8px rgba(255, 184, 0, 0.4);
}

.star-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 24px;
  transition: color 0.2s;
}

.star-label.filled {
  color: var(--text);
}

/* ─── Back button ─────────────────────────────────────────────── */

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 15px;
  font-weight: 500;
  padding: 0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover { opacity: 0.75; }

/* ─── Clinic cards ────────────────────────────────────────────── */

.clinic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.clinic-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--white);
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.clinic-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 168, 150, 0.15);
  transform: translateY(-2px);
}

.clinic-card:active {
  transform: translateY(0);
}

.clinic-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clinic-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.clinic-info {
  flex: 1;
}

.clinic-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.clinic-metro {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.clinic-arrow {
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

/* ─── Platform list ───────────────────────────────────────────── */

.platforms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.platform-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.platform-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 168, 150, 0.12);
  transform: translateY(-2px);
}

.platform-card:active {
  transform: translateY(0);
}

.platform-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.platform-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.bonus-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid #FFD0A0;
}

.platforms-hint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.platforms-hint p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ─── Form ────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label span {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

/* ─── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}

.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 168, 150, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 168, 150, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

/* ─── Thanks screen ───────────────────────────────────────────── */

.thanks-wrap {
  text-align: center;
  padding: 12px 0;
}

.thanks-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thanks-icon.success { background: #E8F5E9; }
.thanks-icon.care    { background: #E3F2FD; }

.thanks-icon svg {
  width: 40px;
  height: 40px;
}

@keyframes popIn {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.thanks-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.thanks-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

/* ─── Rating badge (shown on feedback screen) ─────────────────── */

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

/* ─── Divider ─────────────────────────────────────────────────── */

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

/* ─── Hint box ────────────────────────────────────────────────── */

.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #5D4037;
  margin-bottom: 20px;
}
.hint-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── Platform checkboxes ─────────────────────────────────────── */

.confirm-platforms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.platform-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  user-select: none;
}
.platform-check-row:hover { border-color: var(--primary); background: var(--primary-light); }
.platform-check-row:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

.platform-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.platform-logo-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.platform-check-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

/* ─── Total bonus ─────────────────────────────────────────────── */

.total-bonus-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 4px;
}
.total-bonus-label { font-size: 14px; color: #2E7D32; }
.total-bonus-value { font-size: 18px; font-weight: 700; color: #2E7D32; }
