:root {
  /* Dark theme variables (default) */
  --brand-primary: #00f6c9;
  --brand-primary-dark: #00d4ac; /* Darker version for hover effects */
  --brand-bg: #0C1A24;
  --brand-card-bg: #111a22;
  --brand-border: #1d2d3b;
  --text-color: #e0e0e0;
  --text-secondary: #c0c0c0;
  --text-muted: #c0c0c0;
}

/* Light theme variables */
[data-theme="light"] {
  --brand-primary: #00a88a; /* Darker shade of teal for better contrast on light bg */
  --brand-primary-dark: #008c73; /* Even darker for hover effects */
  --brand-bg: #f8f9fa;
  --brand-card-bg: #ffffff;
  --brand-border: #dee2e6;
  --text-color: #212529;
  --text-secondary: #6c757d;
  --text-muted: #6c757d;
}

/* Base styles that apply to both themes */
body {
  background-color: var(--brand-bg);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.text-brand {
  color: var(--brand-primary) !important;
}

.bg-brand {
  background-color: var(--brand-bg) !important;
}

.bg-card {
  background-color: var(--brand-card-bg);
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

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

.nav-link:hover {
  color: var(--brand-primary) !important;
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background-color: var(--brand-primary);
  color: var(--brand-bg);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  opacity: 0.9;
}

/* Icons for theme toggle */
.theme-toggle .light-icon,
.theme-toggle .dark-icon {
  display: none;
}

.theme-toggle img {
  width: 20px;
  height: 20px;
}

/* Make moon icon white in light mode */
[data-theme="light"] .theme-toggle .light-icon img {
  filter: brightness(0) saturate(100%) invert(1);
}

/* Make sun icon dark in dark mode */
[data-theme="dark"] .theme-toggle .dark-icon {
  color: #0C1A24;
  display: block;
}

[data-theme="light"] .theme-toggle .light-icon {
  display: block;
}

/* Placeholder styling */
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  color: var(--text-muted);
  opacity: 0.7;
}
::-moz-placeholder { /* Firefox 19+ */
  color: var(--text-muted);
  opacity: 0.7;
}
:-ms-input-placeholder { /* IE 10+ */
  color: var(--text-muted);
  opacity: 0.7;
}
::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Ensure placeholder is gray in light mode */
[data-theme="light"] input::-webkit-input-placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}
[data-theme="light"] input::-moz-placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}
[data-theme="light"] input:-ms-input-placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}
[data-theme="light"] input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Custom tooltip styling */
.tooltip {
  font-size: 0.875rem;
}

.tooltip .tooltip-inner {
  background-color: var(--brand-primary);
  color: var(--brand-bg);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  max-width: 250px;
}

.tooltip .tooltip-arrow::before {
  border-top-color: var(--brand-primary);
}

/* Asterisk tooltip styling */
.asterisk-tooltip {
  cursor: help;
  color: var(--brand-primary);
  font-size: 1.2em;
  font-weight: bold;
  padding: 0 2px;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
}

.asterisk-tooltip:hover {
    transform: scale(1.2);
    text-shadow: 0 0 3px var(--brand-primary);
}

/* Page specific styles */
/* Index page */
.btn-brand {
    background-color: var(--brand-primary);
    color: var(--brand-bg);
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.btn-brand:hover {
    background-color: var(--brand-primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-brand:focus, .btn-brand:active {
    background-color: var(--brand-primary-dark);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 246, 201, 0.3);
    outline: none;
}

/* Adjust focus ring color for light theme */
[data-theme="light"] .btn-brand:focus, [data-theme="light"] .btn-brand:active {
    box-shadow: 0 0 0 3px rgba(0, 168, 138, 0.3);
}

.demo-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    padding: 1.75rem 1.75rem 0;
}

.demo-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 246, 201, 0.2);
}

.demo-avatar {
    background-color: var(--brand-border);
    color: var(--brand-primary);
}

.demo-section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-primary);
    font-weight: 500;
}

.demo-section-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 400;
}

.demo-tool {
    font-weight: 500;
    color: var(--text-color);
}

@media (max-width: 576px) {
    .demo-section-title {
        font-size: 0.8rem;
    }

    .demo-section-content {
        font-size: 0.95rem;
    }
}

/* Border for vertical layout on mobile */
@media (max-width: 767.98px) {
    .demo-section-border {
        border-bottom: 1px solid var(--brand-border);
    }
}

/* Beta announcement styling */
[data-theme="dark"] .alert-success {
    background-color: rgba(0, 246, 201, 0.15);
    border-color: rgba(0, 246, 201, 0.3);
    color: var(--text-color);
}

[data-theme="dark"] .alert-success a.btn-brand {
    background-color: var(--brand-primary-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alert-success a.btn-brand:hover {
    background-color: var(--brand-primary);
}

/* Privacy and Legal pages */
h1 {
    font-size: 1.8rem;
}

.logo {
    max-width: 30vw;
    height: auto;
    margin-bottom: 2rem;
}
