:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --background-color: #f5f6fa;
  --text-color: #2c3e50;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

.mark-sheet {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

h1 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

h4 {
  color: var(--secondary-color);
  margin: 1.5rem 0;
}

.row {
  margin-bottom: 1rem;
}

label {
  font-weight: 500;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 2rem;
}

button:hover {
  background-color: #2980b9;
}

/* Overlay Styles */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-width: 90%;
  width: 600px;
  z-index: 1000;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  position: relative;
  margin-bottom: 1rem;
  text-align: center;
}

.close-btn {
  position: absolute;
  right: 0;
  top: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin: 0;
  color: var(--text-color);
}

.close-btn:hover {
  color: var(--secondary-color);
}

.modal-body {
  padding: 1rem 0;
}

#popup h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

#popup p {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 1.1rem;
}

.student-info p {
  margin-bottom: 1rem;
}

.result-info p {
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mark-sheet {
    margin: 1rem;
    padding: 1rem;
  }

  .row {
    margin-bottom: 1.5rem;
  }

  .col-md-3 {
    margin-bottom: 1rem;
  }

  input[type="text"] {
    margin-bottom: 0.5rem;
  }

  button {
    width: 100%;
  }

  .modal {
    width: 95%;
    padding: 1rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mark-sheet {
  animation: fadeIn 0.5s ease-out;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2980b9;
}
