@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Default Light Palette */
:root {
  --bg-color: #ffffff;
  --text-color: #222222;
  --text-muted: #555555;
  --primary-accent: #673AB7;
  --accent-text: #673AB7;
  --callout-bg: #f7f7f7;
  --callout-border: #673AB7;
  --callout-neutral-border: #666666;
  --divider-color: #eeeeee;
  --link-color: #673AB7;
}

/* System Dark Mode (when not explicitly forced to light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #b0b0b0;
    --primary-accent: #B388FF;
    --accent-text: #B388FF;
    --callout-bg: #1e1e1e;
    --callout-border: #B388FF;
    --callout-neutral-border: #B388FF;
    --divider-color: #333333;
    --link-color: #82B1FF;
  }
}

/* Forced Dark Mode (via data-theme attribute) */
:root[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --text-muted: #b0b0b0;
  --primary-accent: #B388FF;
  --accent-text: #B388FF;
  --callout-bg: #1e1e1e;
  --callout-border: #B388FF;
  --callout-neutral-border: #B388FF;
  --divider-color: #333333;
  --link-color: #82B1FF;
}

/* Forced Light Mode (overrides OS dark mode completely) */
:root[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #222222;
  --text-muted: #555555;
  --primary-accent: #673AB7;
  --accent-text: #673AB7;
  --callout-bg: #f7f7f7;
  --callout-border: #673AB7;
  --callout-neutral-border: #666666;
  --divider-color: #eeeeee;
  --link-color: #673AB7;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* High-Impact Header matching Flutter Design */
.legal-header {
  width: 100%;
  background: linear-gradient(135deg, #673AB7 0%, #7E57C2 50%, #E91E63 100%);
  padding: 30px 20px 38px 20px;
  border-radius: 0 0 32px 32px;
  box-shadow: 0 8px 24px rgba(103, 58, 183, 0.3);
  text-align: center;
  color: #ffffff;
}

.nav-bar {
  max-width: 800px;
  margin: 0 auto 12px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.home-btn,
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.home-btn:hover,
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Feedback Pill Badge (matches Flutter WebLandingScreen AnimatedSwitcher toast) */
.theme-feedback-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-feedback-pill.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.theme-feedback-pill svg {
  flex-shrink: 0;
}

/* Theme toggle icon switching: 3-mode support (light / dark / system) */
.theme-toggle-btn .theme-icon,
.theme-toggle-btn .sun-icon,
.theme-toggle-btn .moon-icon,
.theme-toggle-btn .system-icon {
  display: none;
}

:root[data-theme-mode="light"] .theme-toggle-btn .icon-light,
:root[data-theme-mode="light"] .theme-toggle-btn .sun-icon {
  display: block;
}

:root[data-theme-mode="dark"] .theme-toggle-btn .icon-dark,
:root[data-theme-mode="dark"] .theme-toggle-btn .moon-icon {
  display: block;
}

:root[data-theme-mode="system"] .theme-toggle-btn .icon-system,
:root[data-theme-mode="system"] .theme-toggle-btn .system-icon,
:root:not([data-theme-mode]) .theme-toggle-btn .icon-system,
:root:not([data-theme-mode]) .theme-toggle-btn .system-icon {
  display: block;
}

@media (max-width: 480px) {
  .nav-bar {
    gap: 8px;
  }
  .nav-actions {
    gap: 6px;
  }
  .brand-pill {
    padding: 4px 10px;
    font-size: 11px;
  }
}

.brand-pill {
  font-size: 13px;
  letter-spacing: 1px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-circle {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
  color: #ffffff !important;
}

.header-subtitle {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85) !important;
  margin: 0;
}

.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 20px 60px 20px;
}

.content-container p,
.content-container li,
.content-container strong,
.content-container em,
.content-container td,
.content-container th {
  color: var(--text-color);
}

.content-container h1,
.content-container h2,
.content-container h3 {
  color: var(--primary-accent) !important;
}

.effective-bar {
  display: flex;
  align-items: center;
  margin: 24px 0 20px 0;
  gap: 12px;
}

.accent-line {
  width: 4px;
  height: 24px;
  background: var(--primary-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.effective-text {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-text);
  letter-spacing: 0.2px;
}

.callout-box {
  padding: 15px;
  border-left: 4px solid var(--callout-border);
  background: var(--callout-bg);
  margin-top: 10px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.callout-box-neutral {
  padding: 15px;
  border-left: 4px solid var(--callout-neutral-border);
  background: var(--callout-bg);
  margin-top: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

a {
  color: var(--link-color);
}

hr {
  border: 0;
  border-top: 1px solid var(--divider-color);
}
