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

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a2e;
  --color-text-secondary: #555770;
  --color-border: #e0e0e6;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #f59e0b;
  --color-warning-text: #92400e;
  --max-width: 740px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f0f1a;
    --color-surface: #1a1a2e;
    --color-text: #e8e8f0;
    --color-text-secondary: #a0a0b8;
    --color-border: #2a2a40;
    --color-accent: #60a5fa;
    --color-accent-hover: #93bbfd;
    --color-warning-bg: #451a03;
    --color-warning-border: #b45309;
    --color-warning-text: #fde68a;
  }
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover {
  color: var(--color-accent);
}

nav a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Main content */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 0.85rem;
  color: var(--color-text);
}

.subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

ul,
ol {
  margin-bottom: 0.85rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* Conditional sections - hidden by default */
.conditional {
  display: none;
}

.conditional.visible {
  display: block;
}

/* Info boxes */
.info-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Warning boxes */
.warning-box {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.92rem;
  color: var(--color-warning-text);
}

.warning-box a {
  color: inherit;
  text-decoration: underline;
}

.warning-box p:last-child {
  margin-bottom: 0;
}

/* Form styles (delete-account) */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

input[type="email"],
input[type="text"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  width: auto;
  flex-shrink: 0;
}

button[type="submit"] {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover {
  background: var(--color-accent-hover);
}

/* Success message */
.success-message {
  display: none;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  .success-message {
    background: #064e3b;
    border-color: #047857;
    color: #a7f3d0;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 1.5rem 1rem 3rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 0.8rem;
  }
}
