/* ============================================
   CipherVault — Design System
   Based on UI/UX Design Guide
   Primary: #2d6a4f (light) / #40916c (dark)
   Accent:  #d4a72c (light) / #e0b94a (dark)
   ============================================ */

/* Light mode */
:root {
  --bg-body: #f5f3ef;
  --surface-card: #ffffff;
  --surface: #ebe7e1;
  --surface-hover: #e3dfd7;
  --surface-input: #f0ede8;
  --border: #d6d0c6;
  --text-primary: #1f2226;
  --text-secondary: #5c6b73;
  --muted: #8f968e;
  --accent: #d4a72c;
  --primary: #2d6a4f;
  --error: #c44545;
  --success: #2d6a4f;
  --warning: #d4a72c;
  --info: #4a9eff;
}

/* Dark mode */
.dark {
  --bg-body: #13151a;
  --surface-card: #1a1d24;
  --surface: #1b1d21;
  --surface-hover: #262a33;
  --surface-input: #1e2128;
  --border: #262a33;
  --text-primary: #d6d8dd;
  --text-secondary: #7a8b94;
  --muted: #545a64;
  --accent: #e0b94a;
  --primary: #40916c;
  --error: #d15151;
  --success: #40916c;
  --warning: #e0b94a;
  --info: #4a9eff;
}

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

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: rgba(45, 106, 79, 0.35);
  color: #ffffff;
}

.dark ::selection {
  background: rgba(64, 145, 108, 0.4);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #1b1d21;
}
::-webkit-scrollbar-thumb {
  background: #262a33;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #545a64;
}

.dark ::-webkit-scrollbar-track {
  background: #1b1d21;
}
.dark ::-webkit-scrollbar-thumb {
  background: #262a33;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #545a64;
}

/* ========== Animations ========== */

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

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

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

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

/* Animation utility classes */
.toast-enter {
  animation: slideInRight 0.3s ease;
}
.modal-enter {
  animation: scaleIn 0.2s ease;
}
.page-enter {
  animation: pageEnter 0.3s ease;
}
.list-enter {
  animation: slideUp 0.3s ease;
}

/* ========== Typography Utilities ========== */

h1 {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
}
p {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.625;
}
label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meta {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted-foreground);
}
.code {
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
}
