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

:root {
  --purple: #8b5cf6;
  --purple-dark: #7c3aed;
  --purple-light: #f3f0ff;
  --gray: #6b7280;
  --dark: #1f2937;
  --white: #fff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
}

nav a {
  text-decoration: none;
  color: var(--gray);
  margin-left: 24px;
  font-size: 0.95rem;
}

nav a.btn-primary {
  background: var(--purple);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 6px;
  transition: background 0.2s;
}

nav a.btn-primary:hover { background: var(--purple-dark); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);
  color: var(--white);
  text-align: center;
  padding: 100px 20px;
}

.hero h2 { font-size: 2.5rem; margin-bottom: 16px; }
.hero p  { font-size: 1.15rem; opacity: 0.9; margin-bottom: 36px; }

.btn-hero {
  display: inline-block;
  background: var(--white);
  color: var(--purple-dark);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }

/* Sections */
.section { padding: 70px 0; }
.section h3 { font-size: 1.7rem; margin-bottom: 20px; color: var(--dark); }
.section p  { color: var(--gray); font-size: 1rem; max-width: 640px; }
.bg-light { background: #f9fafb; }

.steps {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step span {
  display: block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 auto 12px;
}

.step p { color: var(--dark); font-size: 0.95rem; }

.cta { text-align: center; background: var(--purple-light); }
.cta h3 { color: var(--purple-dark); }

/* Footer */
footer {
  background: var(--dark);
  color: #9ca3af;
  text-align: center;
  padding: 24px 0;
  font-size: 0.9rem;
}

/* Forms */
.form-section { padding: 60px 0; }

.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-container h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.subtitle { color: var(--gray); margin-bottom: 32px; }

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }

.form-group { margin-bottom: 20px; }
.form-row   { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.required { color: #dc2626; }

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

small { display: block; color: var(--gray); font-size: 0.82rem; margin-top: 4px; }

.terms { font-size: 0.9rem; color: var(--gray); }
.terms input { width: auto; margin-right: 8px; }

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-submit:hover { background: var(--purple-dark); }

/* Result page */
.result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-size: 2.5rem;
  line-height: 80px;
  margin: 0 auto 24px;
  font-weight: 700;
}

.result-icon.success { background: #d1fae5; color: #059669; }
.result-icon.error   { background: #fee2e2; color: #dc2626; }

.btn-primary {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--purple-dark); }
