@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Landing Page Styles */
.gradient-bg {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  position: relative;
  overflow: hidden;
}

.gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

/* Sidebar Styles */
.sidebar {
  background: linear-gradient(180deg, #581c87 0%, #7c3aed 100%);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-item {
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 2px 8px;
}

.sidebar-item:hover {
  background: rgba(124, 58, 237, 0.1);
  transform: translateX(4px);
}

.sidebar-item.active {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  transform: translateX(4px);
}

/* Card Styles */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Button Styles */
.primary-btn {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6);
}

/* Topic Card Styles */
.topic-card {
  border-left: 4px solid #7c3aed;
}

.topic-card:hover {
  border-left-color: #2563eb;
}

/* Formula Highlight Styles */
.formula-highlight {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
}

.formula-highlight:hover {
  border-color: #7c3aed;
  background: #f3f4f6;
}

/* Progress Bar Styles */
.progress-bar {
  background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
  border-radius: 8px;
}

/* Message Styles */
.success-message {
  background: linear-gradient(135deg, #10b981, #059669);
}

.error-message {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Header Styles */
.main-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(10px);
}

/* Stats Card Styles */
.stats-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

/* Icon Containers */
.icon-container {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-radius: 12px;
}

/* Answer Option Styles */
.answer-option {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.answer-option:hover {
  border-color: #7c3aed;
  background: #f3f4f6;
  transform: translateX(4px);
}

/* Modal Styles */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-radius: 16px;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="number"],
select {
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  outline: none;
}

/* Simple Animations */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.5s ease-out forwards;
  opacity: 0;
}
/* option clicking */
.answer-option.correct {
  background-color: #dcfce7;
  border-color: #22c55e;    
}

.answer-option.wrong {
  background-color: #fee2e2; 
  border-color: #ef4444;    
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hidden {
    display: none !important;
}

/* Progress dashboard styles */
.progress-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.progress-bar-animated {
    transition: all 0.8s ease-in-out;
}

.accuracy-high { background: linear-gradient(135deg, #10B981, #059669); }
.accuracy-medium { background: linear-gradient(135deg, #F59E0B, #D97706); }
.accuracy-low { background: linear-gradient(135deg, #EF4444, #DC2626); }

/* Smooth animations for progress updates */
@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--target-width); }
}

.progress-fill {
    animation: progressFill 1.5s ease-out forwards;
}


/* Progress Dashboard Styles */
.progress-dashboard {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.progress-dashboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="progressGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23progressGrid)"/></svg>');
  opacity: 0.3;
}

.progress-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.35s;
  stroke-linecap: round;
}

.progress-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-level {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-achievement {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid;
  transition: all 0.3s ease;
}

.progress-achievement:hover {
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.15);
}

.achievement-locked {
  opacity: 0.5;
  filter: grayscale(1);
}

.progress-topic-item {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.progress-topic-item.completed {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.progress-topic-item.in-progress {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.progress-topic-item.not-started {
  border-left-color: #6b7280;
  background: rgba(107, 114, 128, 0.05);
}

.progress-milestone {
  position: relative;
}

.progress-milestone::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -12px;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  transform: translateY(-50%);
}

.progress-milestone:last-child::after {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .ml-64 {
    margin-left: 0;
  }
}
