@import url("variables.css");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.85;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 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-width: 0;
}

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-error { color: var(--error); }
.text-success { color: var(--success); }

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 420px;
}

.toast {
  pointer-events: auto;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--white);
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-12px);
  animation: toastIn var(--transition-normal) forwards;
}

.toast.toast-out {
  animation: toastOut var(--transition-normal) forwards;
}

.toast--error {
  border-color: var(--error);
  background: #1a0507;
}

.toast--success {
  border-color: var(--success);
  background: #041a10;
}

.toast--warning {
  border-color: var(--warning);
  background: #1a1500;
}

@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
  html { font-size: 15px; }
}
