* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, #74ebd5, #acb6e5);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

header {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease-in-out;
}

.student-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-bar {
  text-align: center;
  margin-bottom: 20px;
}

.search-bar input {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.student-form input, .student-form button {
  padding: 10px;
  border-radius: 5px;
  border: none;
  font-size: 1rem;
}

.student-form button {
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.student-form button:hover {
  transform: scale(1.05);
}

.student-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInUp 1s ease-in-out;
}

.student-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.5s ease;
}

.status-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.present {
  background-color: #4CAF50;
  color: white;
}

.absent {
  background-color: #f44336;
  color: white;
}

.summary {
  margin-top: 20px;
  text-align: center;
  font-size: 1.2rem;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* dark mode */
.theme-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(24px);
}
body.dark-mode {
  background: linear-gradient(135deg, #1e1e1e, #2c2c2c);
  color: #f5f5f5;
}

body.dark-mode .student-form button {
  background-color: #444;
  color: #fff;
}

body.dark-mode .student-card {
  background-color: #333;
  color: #f5f5f5;
}

body.dark-mode .present {
  background-color: #2e7d32;
  color: white;
}

body.dark-mode .absent {
  background-color: #c62828;
  color: white;
}

body.dark-mode .search-bar input,
body.dark-mode .student-form input {
  background-color: #555;
  color: #fff;
  border: 1px solid #777;
}
