:root {
  /* Clean Green & White Palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --accent: #15803d; /* Professional Green */
  --accent-hover: #166534;
  --accent-soft: #f0fdf4;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --radius: 16px;
  --font-main: "Mulish", sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f9fafb;
  --text-secondary: #94a3b8;
  --accent: #22c55e;
  --accent-hover: #4ade80;
  --accent-soft: rgba(34, 197, 94, 0.1);
  --border: #334155;
  --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

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

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

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Navigation --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.nav li {
  list-style: none;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.theme-toggle {
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Theme Toggle Icon Animation */
.theme-toggle i {
  font-size: 1.25rem;
  color: var(--accent);
  position: absolute;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
}

.theme-toggle .moon {
  transform: translateY(0);
  opacity: 1;
}

.theme-toggle .sun {
  transform: translateY(40px);
  opacity: 0;
}

.dark-theme .theme-toggle .moon {
  transform: translateY(-40px);
  opacity: 0;
}

.dark-theme .theme-toggle .sun {
  transform: translateY(0);
  opacity: 1;
}

/* --- Hero Section --- */
#hero-sec {
  padding: 6rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-text h2 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

#hero-sec p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.compliant {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--accent-soft);
  border-radius: 999px;
}

button.primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 15px -3px rgba(21, 128, 61, 0.2);
}

button.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(21, 128, 61, 0.25);
}

.what-changed-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.what-changed-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --- How It Works --- */
.how-it-works {
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.how-it-works h3 {
  font-size: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

/* --- Questionnaire & Workflow Consistency --- */
.app {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: 90%;
}

.progress-container {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  margin-bottom: 3.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.question {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answer-btn {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.answer-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.answer-btn.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.nav-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 3.5rem;
}

#prevBtn,
#nextBtn {
  padding: 1.1rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
}

#prevBtn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

#nextBtn {
  background: var(--accent);
  color: white;
  border: none;
}

#back {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 2rem auto 0;
  transition: var(--transition);
}

#back:hover {
  transform: scale(1.1);
  color: var(--accent);
}

/* --- Summary & Results --- */
.container {
  max-width: 650px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.upper,
.card,
.card1,
.highlight {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.upper h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.highlight {
  background: var(--accent);
  color: white;
  border: none;
}

.highlight h3 {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.amount {
  font-size: 3rem;
  font-weight: 900;
  margin: 0.5rem 0;
}

#back2home {
  background: var(--accent);
  color: white;
  border: none;
  padding: 1.25rem;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

/* --- What Changed Page --- */
.what-changed-card {
  max-width: 800px;
  margin: 3rem auto;
  padding: 3rem;
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.what-changed p {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

footer span {
  font-weight: 700;
  color: var(--accent);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .hero-text h2 {
    font-size: 2.5rem;
  }
  .app {
    padding: 1.5rem;
    width: 95%;
  }
  .container {
    padding: 1rem;
  }
}
