body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f8;
  margin: 0;
  padding: 0;
  color: #333;
}

body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.container {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

.dark-mode .container {
  background-color: #1e1e1e;
}

h1 {
  text-align: center;
  color: #2c3e50;
}

.dark-mode h1 {
  color: #ffffff;
}

form {
  margin-top: 20px;
}

input, select, button {
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Unified Button Style */
button {
  background-color: #0069d9;
  color: white;
  font-weight: 500;
  border: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

button:hover {
  background-color: #0051b3;
}

/* Primary buttons */
button#add-course {
  background-color: #28a745;
}

button#add-course:hover {
  background-color: #218838;
}

button#clear-data {
  background-color: #ffc107;
  color: #212529;
}

button#clear-data:hover {
  background-color: #e0a800;
}

button#export-csv {
  background-color: #17a2b8;
}

button#export-csv:hover {
  background-color: #138496;
}

/* Delete Course Button */
button.delete-course {
  background-color: #dc3545;
  color: white;
}

button.delete-course:hover {
  background-color: #b52a38;
}

/* Course Row Layout */
.course-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.course-row input,
.course-row select {
  flex: 1;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #ddd;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: #28a745;
  transition: width 0.5s ease-in-out;
}

.result {
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

/* Dark mode button group */
.toggle-buttons {
  text-align: right;
  margin-top: -30px;
}

.toggle-btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.toggle-btn-group button {
  background-color: #6c757d;
  color: #fff;
}

.toggle-btn-group button:hover {
  background-color: #5a6268;
}

.dark-mode .toggle-btn-group button {
  background-color: #999;
  color: #000;
}

/* Responsive Layout */
@media (max-width: 600px) {
  .course-row {
    flex-direction: column;
  }

  .toggle-btn-group {
    flex-direction: column;
    align-items: flex-end;
  }
}
