/* Custom styles for the web application */

:root {
  --primary-color: #2196F3;
  --secondary-color: #FFC107;
  --success-color: #4CAF50;
  --danger-color: #F44336;
  --warning-color: #FF9800;
  --info-color: #2196F3;
  --light-color: #F5F5F5;
  --dark-color: #212121;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-color);
}

/* Navigation Styles */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

/* Card Styles */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  font-weight: 600;
}

/* Button Styles */
.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #1976D2;
  border-color: #1976D2;
}

/* Form Styles */
.form-control {
  border-radius: 0.375rem;
  border: 1px solid #ddd;
  padding: 0.75rem;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1976D2 100%);
  min-height: 500px;
}

/* Dashboard Stats */
.stats-card {
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.stats-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stats-label {
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  font-weight: 600;
}

/* Table Styles */
.table {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
}

.table thead th {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background-color: rgba(33, 150, 243, 0.05);
}

/* Exam Interface */
.exam-container {
  max-width: 1200px;
  margin: 0 auto;
}

.question-card {
  margin-bottom: 2rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
}

.question-header {
  background-color: var(--light-color);
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
}

.question-content {
  padding: 1.5rem;
}

.option-item {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-item:hover {
  background-color: var(--light-color);
}

.option-item.selected {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Timer */
.exam-timer {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--danger-color);
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  z-index: 1000;
}

/* Navigation Panel */
.question-nav {
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 1rem;
  position: sticky;
  top: 20px;
}

.question-nav-item {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin: 0.25rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.question-nav-item.answered {
  background-color: var(--success-color);
  color: white;
}

.question-nav-item.marked {
  background-color: var(--warning-color);
  color: white;
}

.question-nav-item.current {
  background-color: var(--primary-color);
  color: white;
}

.question-nav-item.unanswered {
  background-color: var(--light-color);
  border: 1px solid #ddd;
}

/* Charts */
.chart-container {
  position: relative;
  height: 400px;
  margin: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 400px;
    text-align: center;
  }
  
  .stats-card {
    margin-bottom: 1rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .exam-timer {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 1rem;
  }
  
  .question-nav-item {
    width: 35px;
    height: 35px;
    line-height: 35px;
    margin: 0.125rem;
  }
}

/* Loading Spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  z-index: 1050;
}

/* Footer */
footer {
  margin-top: auto;
}

/* Print Styles */
@media print {
  .navbar, .btn, .card-header {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}