body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    background-color: #f4f4f4;
}

h1 {
    color: #333;
}

.controls {
    margin: 15px 0;
    padding: 10px;
    background-color: #eee;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 90%;
    max-width: 1200px;
    justify-content: center;
}

.controls label {
    font-weight: bold;
}

.controls input[type="file"] {
    /* Basic styling for file input */
}

.controls button:hover {
    background-color: #31b0d5;
}

/* Style the trigger button */
#trigger-import-btn {
    background-color: #5cb85c;
}
#trigger-import-btn:hover {
     background-color: #4cae4c;
}

#countdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1200px;
}

.exam-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exam-card h2 {
    margin-top: 0;
    font-size: 1.1em;
    color: #0056b3;
}

.exam-card p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #555;
}

.countdown-timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #d9534f;
    margin-top: 10px;
}

.passed {
    color: #5cb85c;
}

.exam-classes {
    font-size: 0.8em;
    color: #777;
    margin-top: 8px;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px;
    border-radius: 10px;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
}

#exam-checkboxes {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #eee;
    padding: 10px;
}

#exam-checkboxes label {
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
}

#save-selection-btn {
    background-color: #0056b3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#save-selection-btn:hover {
    background-color: #004494;
}

.import-controls {
    width: 90%;
    max-width: 1200px;
    margin: 15px auto;
    padding: 15px;
    background-color: #e7f3fe;
    border: 1px solid #bce8f1;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.import-controls label {
    font-weight: bold;
    margin-bottom: 5px;
}

.import-controls textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.import-controls button {
     background-color: #5bc0de;
     color: white;
     padding: 8px 15px;
     border: none;
     border-radius: 4px;
     cursor: pointer;
     align-self: flex-start; /* Align button to the left */
}

.import-controls button:hover {
    background-color: #31b0d5;
}

/* Keep reset button style consistent */
#reset-exams-btn {
     background-color: #d9534f;
}
#reset-exams-btn:hover {
     background-color: #c9302c;
}

/* Style for the button that shows/hides the import UI */
#show-import-ui-btn {
    background-color: #6c757d; /* A neutral gray */
    padding: 8px 15px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#show-import-ui-btn:hover {
     background-color: #5a6268;
}

.loader {
  width: 175px;
  height: 80px;
  display: block;
  margin:auto;
  background-image: radial-gradient(circle 25px at 25px 25px, #FFF 100%, transparent 0), radial-gradient(circle 50px at 50px 50px, #FFF 100%, transparent 0), radial-gradient(circle 25px at 25px 25px, #FFF 100%, transparent 0), linear-gradient(#FFF 50px, transparent 0);
  background-size: 50px 50px, 100px 76px, 50px 50px, 120px 40px;
  background-position: 0px 30px, 37px 0px, 122px 30px, 25px 40px;
  background-repeat: no-repeat;
  position: relative;
  box-sizing: border-box;
}
.loader::before {
  content: '';  
  left: 60px;
  bottom: 18px;
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #FF3D00;
  background-image: radial-gradient(circle 8px at 18px 18px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 18px 0px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 0px 18px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 36px 18px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 18px 36px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 30px 5px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 30px 5px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 30px 30px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 5px 30px, #FFF 100%, transparent 0), radial-gradient(circle 4px at 5px 5px, #FFF 100%, transparent 0);
  background-repeat: no-repeat;
  box-sizing: border-box;
  animation: rotationBack 3s linear infinite;
}
.loader::after {
  content: '';  
  left: 94px;
  bottom: 15px;
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #FF3D00;
  background-image: radial-gradient(circle 5px at 12px 12px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 12px 0px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 0px 12px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 24px 12px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 12px 24px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 20px 3px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 20px 3px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 20px 20px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 3px 20px, #FFF 100%, transparent 0), radial-gradient(circle 2.5px at 3px 3px, #FFF 100%, transparent 0);
  background-repeat: no-repeat;
  box-sizing: border-box;
  animation: rotationBack 4s linear infinite reverse;
}

@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}