/* 1. The Golden Rule of CSS Layout */
/* This ensures padding/borders don't break your widths. Essential. */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Modern HTML Setup */
html {
  font-size: 100%; /* Respects user browser settings */
  scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

/* 3. The Polished Body */
body {
  /* Typography */
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Bumped to 1rem (usually 16px). 14px is too small for a directory site. */
  font-size: 1rem; 
  line-height: 1.6; /* Slightly looser for better readability */
  color: #1f2937; /* A softer, richer charcoal than generic #222 */
  
  /* Layout & Background */
  background: #f9fafb; /* Very light grey is often more "premium" than stark white #fff */
  min-height: 100vh; /* Ensures the body fills the screen even with little content */
  margin: 0;
  
  /* Text Rendering Smoothing (Keep this, it's good) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 4. Form Elements Inheritance */
/* Inputs/Buttons don't inherit font-family by default. This fixes that. */
input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ===================================================================
   MESSAGE TOAST NOTIFICATIONS
   =================================================================== */

.messages-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-toast {
  background: white;
  color: #1f2937;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 4.7s;
  animation-fill-mode: forwards;
}

.message-toast.success {
  border-left: 4px solid #10b981;
}

.message-toast.success i {
  color: #10b981;
  font-size: 1.25rem;
}

.message-toast.error {
  border-left: 4px solid #ef4444;
}

.message-toast.error i {
  color: #ef4444;
}

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

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

/* ===================================================================
   DARK MODE - BASE STYLES
   =================================================================== */

html.dark body {
  background: #111111;
  color: #e5e7eb;
}

html.dark main {
  background: #111111;
}