@import "tailwindcss";

:root {
  --background: #0f0f1a;
  --foreground: #f8fafc;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #14b8a6;
  --accent: #f59e0b;
  --card: rgba(30, 30, 45, 0.7);
  --border: rgba(255, 255, 255, 0.1);
  --muted: #64748b;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-primary: var(--primary);
  --color-primary-hover: var(--primary-hover);
  --color-secondary: var(--secondary);
  --color-accent: var(--accent);
  --color-card: var(--card);
  --color-border: var(--border);
  --color-muted: var(--muted);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
  color: var(--foreground);
  font-family: var(--font-sans), system-ui, sans-serif;
  min-height: 100vh;
}

/* Glass morphism cards */
.glass-card {
  background: rgba(30, 30, 45, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #14b8a6 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient border */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #6366f1, #14b8a6, #f59e0b);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Glow effect */
.glow {
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.3), 0 0 80px rgba(20, 184, 166, 0.2);
}

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #14b8a6 100%);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Timer */
.timer {
  font-variant-numeric: tabular-nums;
}

/* Question option */
.question-option {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.question-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}
.question-option.selected {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
}
.question-option.correct {
  background: rgba(20, 184, 166, 0.2);
  border-color: #14b8a6;
}
.question-option.incorrect {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

/* Score display */
.score-display {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #14b8a6 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Domain score bar */
.domain-score-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.domain-score-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 1s ease;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}
.animate-pulse-glow {
  animation: pulse-glow 2s ease infinite;
}

@keyframes count-up {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.animate-count-up {
  animation: count-up 0.5s ease forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}
