@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #6366f1; /* Indigo 500 */
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-secondary: #ec4899; /* Pink 500 */
  --color-accent: #14b8a6; /* Teal 500 */
  
  --color-bg: #0f172a; /* Slate 900 */
  --color-surface: #1e293b; /* Slate 800 */
  --color-surface-hover: #334155; /* Slate 700 */
  
  --color-text: #f8fafc; /* Slate 50 */
  --color-text-muted: #94a3b8; /* Slate 400 */
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-light);
}

button {
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Glassmorphism Utilities & Components */
.glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-glass);
  border-radius: 1rem;
}

/* Glow Text */
.text-glow {
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Text Gradient */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Shared UI Components */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  outline: none;
  cursor: pointer;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  outline: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Forms */
.input-field {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.input-field::placeholder {
  color: var(--color-text-muted);
}

select.input-field {
  appearance: auto;
  padding-right: 2rem;
}

/* Utility layout helper rules */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

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

/* Shake Animation for incorrect choices */
.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Pulse Green Animation for correct choices */
.pulse-green {
  animation: pulseGreen 0.6s cubic-bezier(0.25, 0, 0, 1) both;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7); transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { box-shadow: 0 0 0 12px rgba(20, 184, 166, 0); transform: scale(1); }
}

/* Slide-in Overlay Backdrop for Responsive Sidebars */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Global Responsive Margin/Padding Helper */
@media (max-width: 640px) {
  .container {
    padding: 0 1rem !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-hover);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

