/* ================= VARIABLES ================= */
:root {
  --bg-body: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --bg-card: #ffffff;
  --bg-input: #f5f5f5;
  --border-color: #eeeeee;
  --nav-bg: #ffffff;
  --primary-color: #4CAF50;
  --primary-hover: #45a049;
  --btn-pill-bg: #eeeeee;
  --btn-pill-hover: #e0e0e0;
  --btn-pill-primary-bg: #000000;
  --btn-pill-primary-hover: #333333;
  --hero-bg: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  --hero-text: #ffffff;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --checkbox-bg: #f4f4f4;
  --checkbox-hover: #eaeaea;
  --footer-bg: #f5f5f5;
}

[data-theme="dark"] {
  --bg-body: #0a0a0a;
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  --bg-card: #1a1a1a;
  --bg-input: #2d2d2d;
  --border-color: #333333;
  --nav-bg: #0f0f0f;
  --primary-color: #5cb85c;
  --primary-hover: #4cae4c;
  --btn-pill-bg: #2d2d2d;
  --btn-pill-hover: #3d3d3d;
  --btn-pill-primary-bg: #4CAF50;
  --btn-pill-primary-hover: #45a049;
  --hero-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --hero-text: #e0e0e0;
  --shadow-sm: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  --checkbox-bg: #2d2d2d;
  --checkbox-hover: #3d3d3d;
  --footer-bg: #0f0f0f;
}

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html[lang="zh-hk"] {
  font-family: 'Noto Sans TC', sans-serif;
}

html[lang="zh-cn"] {
  font-family: 'Noto Sans SC', sans-serif;
}

html[lang="en"] {
  font-family: 'Inter', sans-serif;
}

body {
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  transition: background-color 0.3s, color 0.3s;
}

/* Containers */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Links and buttons */
a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

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

.btn-pill {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  background: var(--btn-pill-bg);
  color: var(--text-main);
}

.btn-pill:hover {
  background: var(--btn-pill-hover);
}

.btn-pill.btn-primary {
  background: var(--btn-pill-primary-bg);
  color: #ffffff;
}

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

.btn-text {
  background: transparent;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.btn-text:hover {
  background: rgba(128, 128, 128, 0.1);
}

.btn-icon {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: bold;
}

.btn-icon:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.btn-icon .icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Navbar */
.navbar {
  background-color: var(--nav-bg);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s, border-bottom 0.3s;
}

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

.navbar .logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px 15px 120px;
  background: var(--hero-bg);
  color: var(--hero-text);
  transition: background 0.3s;
}

.hero-title {
  font-size: 2.8rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Service Request Section */
.request-section {
  margin: -60px auto 40px;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  border: 1px solid var(--border-color);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.request-section h2 {
  margin-bottom: 24px;
  font-size: 28px;
  text-align: center;
  color: var(--text-main);
}

.request-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

input,
select {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.checkbox-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--checkbox-bg);
  cursor: pointer;
  font-size: 14px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.checkbox-group label:hover {
  background: var(--checkbox-hover);
  transform: translateY(-1px);
}

.checkbox-group input {
  accent-color: var(--primary-color);
}

.request-form button[type="submit"] {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 16px;
  font-size: 16px;
  border-radius: 12px;
}

.form-note {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* How it Works Section */
.how-it-works {
  text-align: center;
  margin: 60px auto;
  max-width: 900px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
}

.step {
  padding: 30px 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-card);
  transition: all 0.3s;
  flex: 1;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

/* Features Section */
.features {
  text-align: center;
  margin: 60px auto;
  max-width: 900px;
}

.feature-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
}

.feature {
  padding: 30px 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-card);
  transition: all 0.3s;
  flex: 1;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: background-color 0.3s, border-top 0.3s;
}

/* Responsive */
@media (min-width: 768px) {

  .steps,
  .feature-items {
    flex-direction: row;
    gap: 20px;
  }

  .step,
  .feature {
    flex: 1;
  }

  .hero {
    padding: 100px 15px 150px;
  }
}

@media (max-width: 768px) {
  .request-form {
    grid-template-columns: 1fr;
  }

  .request-section {
    padding: 24px;
    margin-top: -40px;
  }

  .hero-title {
    font-size: 2rem;
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* ================= MODALS ================= */
.lang-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.lang-modal-content {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  position: relative;
  min-width: 320px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
}

.lang-modal h2 {
  margin-bottom: 24px;
  color: var(--text-main);
  font-size: 1.5rem;
}

.lang-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-lang {
  padding: 14px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-lang:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* ================= CUSTOM TOOLTIP ================= */
.theme-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 1000;
}

.theme-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-card);
}

.btn-icon:hover .theme-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Center Notification */
.notify {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 280px;
  max-width: 90%;
  padding: 16px 24px;
  border-radius: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 1000;
}

.notify.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.notify.success {
  background: #e6f4ea;
  color: #1a7f37;
}

.notify.error {
  background: #fdecea;
  color: #c62828;
}