/* Base Styles - Consistent across all pages */
:root {
  --white: #ffffff;
  --black: #000000;
  --primary: #ef070a;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-400: #a1a1aa;
  --gray-600: #52525b;
  --gray-900: #18181b;
  --scroll-track: #f4f4f5;
  --scroll-thumb: #b0b6c0;
}

html[data-theme="dark"] {
  --white: #0f1115;
  --black: #f5f6f7;
  --primary: #ef070a;
  --gray-50: #0c0e12;
  --gray-100: #12141b;
  --gray-200: #191c25;
  --gray-400: #8b90a2;
  --gray-600: #b8bcc9;
  --gray-900: #e6e7eb;
  --scroll-track: #0f1115;
  --scroll-thumb: #2a2f3a;
}
html.dark {
  --white: #0f1115;
  --black: #f5f6f7;
  --primary: #ef070a;
  --gray-50: #0c0e12;
  --gray-100: #12141b;
  --gray-200: #191c25;
  --gray-400: #8b90a2;
  --gray-600: #b8bcc9;
  --gray-900: #e6e7eb;
}

html[data-theme="dark"] .btn-primary {
  --white: #f5f6f7;
}

html[data-theme="dark"] .logo {
  filter: brightness(0) saturate(100%) invert(1);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 8px;
  border: 3px solid var(--scroll-track);
}

*::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(180deg, #e9edf3 0%, #e3e7ee 100%);
  color: #98a1b0;
  box-shadow: -3px -3px 8px rgba(255, 255, 255, 0.7),
    3px 3px 12px rgba(0, 0, 0, 0.16);
  transition: all 0.2s ease;
}

.theme-toggle::before {
  content: none;
}

.theme-toggle i {
  font-size: 18px;
  color: #9aa3b2;
}
.theme-toggle.is-dark i {
  left: calc(100% - 38px);
}

.theme-toggle.is-dark::before {
  content: none;
}

html[data-theme="dark"] .theme-toggle {
  background: linear-gradient(180deg, #2b313b 0%, #232a34 100%);
  color: #e6e7eb;
  box-shadow: -3px -3px 8px rgba(255, 255, 255, 0.08),
    3px 3px 12px rgba(0, 0, 0, 0.45);
}
html.dark .theme-toggle {
  background: linear-gradient(180deg, #2b313b 0%, #232a34 100%);
  color: #e6e7eb;
  box-shadow: -3px -3px 8px rgba(255, 255, 255, 0.08),
    3px 3px 12px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .theme-toggle::before {
  content: none;
}
html.dark .theme-toggle::before {
  content: none;
}

html[data-theme="dark"] .theme-toggle i {
  color: #e6e7eb;
}
html.dark .theme-toggle i {
  color: #e6e7eb;
}

.theme-floating {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
}

@media (max-width: 480px) {
  .theme-floating {
    right: 1.25rem;
    bottom: 1.5rem;
    transform: scale(0.94);
  }
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Remove default button styles */
button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* Remove default input styles */
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Remove focus outline for mouse users, keep for keyboard */
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.25rem;
  }
  h2 {
    font-size: 1.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.modal-content {
  background: var(--white);
  color: var(--black);
}

html[data-theme="dark"] .modal .form-section {
  border-color: var(--gray-200) !important;
}
.page-enter-animate {
  animation: pageFadeIn 260ms ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
