/* StrongDad Design System - Dark Mode */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-input: #1a1a25;
  --accent: #22d68a;
  --accent-dim: #1aad6e;
  --accent-glow: rgba(34, 214, 138, 0.15);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #555570;
  --border: #222235;
  --border-focus: #22d68a;
  --orange: #ff7a2e;
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.15);
  --blue: #4285f4;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

/* Navigation */
.sd-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.sd-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sd-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sd-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--bg-primary);
  font-weight: 700;
}

.sd-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.sd-nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.sd-nav-links a:hover { color: var(--text-primary); opacity: 1; }

.sd-nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

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

.btn-primary:hover { background: var(--accent-dim); opacity: 1; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--text-muted); }

.btn-danger {
  background: var(--red-glow);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-muted); }

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 0.4rem;
}

/* Auth page layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 2rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--orange));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a { font-weight: 500; }

/* Alert boxes */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: none;
}

.alert.show { display: block; }

.alert-success {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(34, 214, 138, 0.3);
}

.alert-error {
  background: var(--red-glow);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
  background: rgba(66, 133, 244, 0.1);
  color: var(--blue);
  border: 1px solid rgba(66, 133, 244, 0.3);
}

/* Content pages */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

.content-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.content-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.content-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-primary);
}

.content-page p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.content-page ul, .content-page ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content-page li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Settings page */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.settings-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.settings-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.settings-row:first-of-type { border-top: none; }

.settings-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.settings-value {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 26px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  background: var(--accent);
  transform: translateX(22px);
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item.open { border-color: var(--accent-dim); }

.faq-question {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  user-select: none;
}

.faq-question:hover { color: var(--accent); }

.faq-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 500px; }

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-category {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

/* Chatbot Widget */
.chatbot-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(34, 214, 138, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}

.chatbot-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(34, 214, 138, 0.4);
}

.chatbot-panel {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 380px;
  max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-panel.open { display: flex; }

.chatbot-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
}

.chatbot-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  min-height: 250px;
}

.chatbot-msg {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.chatbot-msg.bot {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 12px 4px;
  color: var(--text-secondary);
}

.chatbot-msg.user {
  background: var(--accent-glow);
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 4px 12px;
  color: var(--accent);
  text-align: right;
}

.chatbot-input {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

.chatbot-input input {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.chatbot-input input:focus { border-color: var(--accent); }

.chatbot-input button {
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  z-index: 2000;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cookie-banner.show { display: block; }

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cookie-text a { font-weight: 500; }

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-details {
  margin-top: 1rem;
  display: none;
}

.cookie-details.show { display: block; }

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.cookie-option:last-child { border-bottom: none; }

.cookie-option-info {
  flex: 1;
}

.cookie-option-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.cookie-option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--accent);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Empfohlen';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: 20px;
}

.pricing-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pricing-period {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  padding: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--accent);
  font-weight: 700;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-btn .spinner {
  margin-right: 0.5rem;
}

/* MFA code input */
.mfa-input {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.mfa-input input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Space Grotesk', monospace;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.mfa-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green { background: var(--accent-glow); color: var(--accent); }
.badge-orange { background: rgba(255,122,46,0.15); color: var(--orange); }
.badge-red { background: var(--red-glow); color: var(--red); }
.badge-blue { background: rgba(66,133,244,0.12); color: var(--blue); }

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

.sd-footer a {
  color: var(--text-secondary);
  margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card { padding: 2rem 1.5rem; }
  .content-page { padding: 6rem 1.5rem 3rem; }
  .settings-section { padding: 1.5rem; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .cookie-actions { justify-content: center; }
  .chatbot-panel { right: 1rem; left: 1rem; width: auto; }
  .sd-nav { padding: 0.8rem 1.5rem; }
  .mfa-input input { width: 42px; height: 48px; font-size: 1.3rem; }
  .pricing-grid { grid-template-columns: 1fr; }
}
