:root {
  --primary: #c8a97e;
  --primary-dark: #a8845a;
  --secondary: #f9f0e6;
  --accent: #e8c9a0;
  --dark: #2c1810;
  --text: #4a3728;
  --text-light: #8a7060;
  --white: #ffffff;
  --border: #e5d5c0;
  --success: #6dbf8b;
  --error: #e57373;
  --warning: #ffb74d;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
}

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

body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.7;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); border-bottom: 2px solid var(--primary); }

.nav-auth { display: flex; gap: 1rem; align-items: center; }

.btn {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(200,169,126,0.4); }

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

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #d32f2f; }

.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 0.3rem 1rem; font-size: 0.8rem; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Page sections */
.page { display: none; padding-top: 70px; }
.page.active { display: block; }

/* Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #fff8f0 0%, #fde8d0 50%, #f9d4b0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200,169,126,0.15) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 0.3rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 em { color: var(--primary); font-style: normal; }

.hero p {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-btns .btn { font-size: 1rem; padding: 0.75rem 2rem; }

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}
.stat-label { font-size: 0.85rem; color: var(--text-light); }

/* Section */
.section { padding: 5rem 2rem; }
.section-alt { background: var(--secondary); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.75rem;
}
.section-header p { color: var(--text-light); font-size: 1rem; max-width: 500px; margin: 0 auto; }

.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 1rem auto;
  border-radius: 2px;
}

/* Services */
.services-filter {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1.2rem;
  border: 2px solid var(--border);
  background: white;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.service-cat {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }

.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.service-duration { font-size: 0.85rem; color: var(--text-light); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: white;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-q {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--secondary); }

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.3s;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
  color: var(--text-light);
  font-size: 0.95rem;
}
.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}

/* Booking form */
.booking-container {
  max-width: 800px;
  margin: 0 auto;
}

.booking-steps {
  display: flex;
  gap: 0;
  margin-bottom: 2.5rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.step {
  flex: 1;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid var(--border);
  transition: all 0.2s;
}
.step.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--secondary);
}
.step.done {
  color: var(--success);
  border-bottom-color: var(--success);
}

.booking-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
}
.form-group label.required::after { content: ' *'; color: var(--error); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.75rem;
}

.time-btn {
  padding: 0.6rem;
  border: 2px solid var(--border);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}
.time-btn:hover { border-color: var(--primary); color: var(--primary); }
.time-btn.selected { background: var(--primary); color: white; border-color: var(--primary); }
.time-btn.disabled { opacity: 0.4; cursor: not-allowed; background: #f0f0f0; }

.booking-summary {
  background: var(--secondary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.booking-summary h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.summary-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.summary-row .label { color: var(--text-light); }
.summary-row .value { font-weight: 600; }
.summary-row.total .value { color: var(--primary); font-size: 1.2rem; font-weight: 800; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--secondary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all 0.2s;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.tab-btns {
  display: flex;
  gap: 0;
  background: var(--secondary);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.tab-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all 0.2s;
}
.tab-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow); }

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border-left: 4px solid var(--primary);
  max-width: 320px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.toast.error { border-left-color: var(--error); }
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Profile / Dashboard */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.profile-sidebar {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  height: fit-content;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.profile-name { text-align: center; font-size: 1.2rem; font-weight: 700; margin-bottom: 0.25rem; }
.profile-phone { text-align: center; color: var(--text-light); font-size: 0.9rem; margin-bottom: 1.5rem; }

.profile-menu { list-style: none; }
.profile-menu li a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.profile-menu li a:hover, .profile-menu li a.active {
  background: var(--secondary);
  color: var(--primary);
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--dark); }

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending { background: #fff3e0; color: #f57c00; }
.badge-confirmed { background: #e3f2fd; color: #1976d2; }
.badge-completed { background: #e8f5e9; color: #388e3c; }
.badge-cancelled { background: #fce4ec; color: #c62828; }
.badge-paid { background: #e8f5e9; color: #388e3c; }
.badge-unpaid { background: #fff3e0; color: #f57c00; }

/* Booking list */
.booking-list { display: flex; flex-direction: column; gap: 1rem; }

.booking-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.booking-item:hover { border-color: var(--primary); }

.booking-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.booking-item-header h4 { font-size: 1rem; font-weight: 700; }

.booking-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}
.booking-meta span { display: flex; align-items: center; gap: 0.3rem; }

.booking-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.price-tag { font-size: 1.1rem; font-weight: 800; color: var(--primary); }

/* Features section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-item { text-align: center; padding: 1.5rem; }
.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}
.feature-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-item p { font-size: 0.875rem; color: var(--text-light); }

/* Footer */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 2rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto 2rem;
}
.footer-col h4 { color: white; font-size: 1rem; margin-bottom: 1rem; }
.footer-col p, .footer-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1.8;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links, .nav-auth {
    display: none;
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  .nav-links.open, .nav-auth.open { display: flex; }

  .profile-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
  .hero-stats { gap: 2rem; }
  .modal { margin: 0 0.5rem; }
  .services-grid { grid-template-columns: 1fr; }

  .nav-menu-wrapper {
    display: none;
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 999;
  }
  .nav-menu-wrapper.open { display: flex; }
  .nav-menu-wrapper .nav-links { display: flex; position: static; flex-direction: column; padding: 0; align-items: flex-start; }
  .nav-menu-wrapper .nav-auth { display: flex; position: static; flex-direction: row; padding: 1rem 0 0; }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}
.empty-state p { margin-top: 0.5rem; font-size: 0.9rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: var(--secondary);
  color: var(--primary-dark);
  border: 1px solid var(--accent);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}
