/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */

/* Reset all default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Set base font and background */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f4f7fc;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Root element styles */
#root {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

/* ============================================
   SCROLLBAR STYLES (optional)
   ============================================ */

/* Custom scrollbar for WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c1c7cd;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0aab4;
}

/* ============================================
   LINK STYLES
   ============================================ */

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ============================================
   BUTTON RESET
   ============================================ */

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================
   INPUT RESET
   ============================================ */

input, textarea, select {
  font-family: inherit;
}

/* ============================================
   SELECTION STYLES
   ============================================ */

::selection {
  background: #2563eb;
  color: white;
}

::-moz-selection {
  background: #2563eb;
  color: white;
}

/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */

:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }
}

/* ============================================
   UTILITY CLASSES (optional)
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: #6b7280;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
  animation: slideIn 0.3s ease-in-out;
}

/* ============================================
   LOADING SPINNER (global)
   ============================================ */

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   CARD SHADOW (global)
   ============================================ */

.card-shadow {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border-radius: 2.5rem;
  background: #ffffff;
  padding: 2rem 2.5rem;
}

@media (max-width: 700px) {
  .card-shadow {
    padding: 1.5rem;
    border-radius: 1.5rem;
  }
}

/* ============================================
   APP WRAPPER (global container)
   ============================================ */

.app-wrapper {
  max-width: 1300px;
  width: 100%;
  background: #ffffff;
  border-radius: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  padding: 2rem 2.5rem;
  transition: all 0.2s ease;
  min-height: 90vh;
}

@media (max-width: 700px) {
  .app-wrapper {
    padding: 1.5rem;
    border-radius: 1.5rem;
    min-height: 95vh;
  }
}

@media (max-width: 480px) {
  .app-wrapper {
    padding: 1rem;
    border-radius: 1rem;
  }
}