:root {
  --background-dark: #111827;
  --background-dark-lighter: #1F2937;
  --border-dark: #2D2D2D;
  --text-dark-primary: #F9FAFB;
  --text-dark-secondary: #D1D5DB;
}

.hero-safe {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-menu.active { right: 0; }

#menuBtn span {
  transform-origin: center;
  transition: transform 0.3s ease;
}

#menuBtn.active span:first-child { transform: translateY(8px) rotate(45deg); }
#menuBtn.active span:nth-child(2) { opacity: 0; }
#menuBtn.active span:last-child { transform: translateY(-8px) rotate(-45deg); }

.notification {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #1a1a1a;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: slideDown 0.3s ease-out forwards;
  z-index: 50;
}

.notification::before {
  content: '';
  position: absolute;
  top: -4px;
  right: 16px;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal {
  width: min(600px, 100%);
  max-height: 85vh;
  background: white;
  border-radius: 1rem;
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow-y: auto;
}

.modal.active {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.form-step { display: none; }
.form-step.active { display: block; }

.step-indicator {
  width: 2rem;
  height: 2rem;
  background: #e5e7eb;
  border-radius: 9999px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.step-indicator.active {
  background: #2563eb;
  color: white;
}

.notification-close {
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}

.notification-close:hover {
  background: rgba(255,255,255,0.1);
}

.faq-content,
.fa-chevron-down,
.faq-item { transition: all 0.2s ease; }

.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.modal::-webkit-scrollbar-thumb {
  background: #cdcdcd;
  border-radius: 3px;
}
.modal::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

.animate-float { animation: float 6s ease-in-out infinite; }

header .font-medium,
header a,
.mobile-menu a { transition: color 0.1s ease !important; }

.hero-safe {
  padding-top: calc(env(safe-area-inset-top) + 2rem);
  padding-bottom: env(safe-area-inset-bottom);
}

header img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

[data-theme="dark"] header img {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] header img {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] body {
  background-color: var(--background-dark);
  color: var(--text-dark-primary);
}

[data-theme="dark"] .bg-white:not(.modal),
[data-theme="dark"] .mobile-menu .bg-white\/90 {
  background-color: var(--background-dark-lighter);
}

[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .step-indicator {
  background-color: var(--background-dark);
}

[data-theme="dark"] .text-gray-900,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .font-bold:not(.text-blue-600):not(.text-white) {
  color: var(--text-dark-primary);
}

[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-500 {
  color: var(--text-dark-secondary);
}

[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border {
  border-color: var(--border-dark);
}

[data-theme="dark"] .bg-white\/80.backdrop-blur-sm {
  background-color: rgba(31, 41, 55, 0.8);
}

[data-theme="dark"] .font-bold.text-gray-900.text-2xl {
  color: var(--text-dark-primary);
}

[data-theme="dark"] .text-sm.text-gray-600:not(.text-blue-600) {
  color: var(--text-dark-secondary);
}

[data-theme="dark"] .bg-blue-50.flex.items-center.justify-center,
[data-theme="dark"] .bg-purple-50.flex.items-center.justify-center {
  background-color: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .from-blue-100\/50 { --tw-gradient-from: rgb(17 24 39 / 0.3); }
[data-theme="dark"] .to-purple-100\/50 { --tw-gradient-to: rgb(24 24 36 / 0.3); }

[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-purple-50 {
  background-color: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .hover\:text-blue-600:hover { color: #93C5FD; }
[data-theme="dark"] .text-blue-600:not(.bg-white) { color: #60A5FA; }

[data-theme="dark"] .modal,
[data-theme="dark"] .notification {
  background-color: var(--background-dark-lighter);
  border-color: var(--border-dark);
}

[data-theme="dark"] .modal input,
[data-theme="dark"] .modal textarea {
  background-color: var(--background-dark);
  border-color: var(--border-dark);
  color: var(--text-dark-primary);
}

[data-theme="dark"] .modal input::placeholder,
[data-theme="dark"] .modal textarea::placeholder {
  color: var(--text-dark-secondary);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero-safe {
    min-height: auto !important;
    padding-top: 9rem !important;
    padding-bottom: 2rem !important;
    height: auto !important;
  }

  .hero-safe h1 {
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
  }

  .hero-safe p {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.5 !important;
  }

  .hero-safe .flex-col {
    gap: 1.5rem !important;
  }

  .hero-safe button {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
  }

  .hero-safe .animate-float {
    margin-top: 1.5rem !important;
  }

  .hero-safe .grid {
    gap: 1rem !important;
  }
}