/* Pastel Theme Styles */
body {
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #fce4ec, #e0f7fa);
  margin: 0;
  padding: 0;
  color: #4a4a4a;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark {
  background: #2e2e2e;
  color: #eee;
}

body.dark .container,
body.dark .card {
  background-color: #3c3c3c;
  color: #fff;
}

#toggle-theme {
  position: absolute;
  right: 20px;
  top: 20px;
  padding: 8px 12px;
  background: #dd6e95;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #4a148c;
  box-shadow: 0 0 6px #f8bbd0;
}

body.dark #toggle-theme {
  background: #ba68c8;
  color: #fff;
  box-shadow: 0 0 6px #ba68c8;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  background: #f3c1d3;
  border-bottom: 2px solid #ce93d8;
  position: relative;
}

.brand-logo {
  height: 68px;
  width: auto;
}

.brand-title {
  font-size: 28px;
  font-weight: bold;
  color: #4a148c;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: #ffffffcc;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  margin-bottom: 20px;
  border: 2px solid #ce93d8;
  border-radius: 8px;
  background: #fff;
  color: #4a4a4a;
  box-sizing: border-box;
}

input:focus {
  outline: 2px solid #ba68c8;
}

button {
  width: 10vh;
  padding: 12px;
  font-size: 16px;
  color: #fff;
  background-color: #f48fb1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

button:hover {
  background-color: #ec407a;
}

.card {
  background: #fff3e0;
  border-radius: 12px;
  padding: 30px;
  margin: 30px auto;
  max-width: 700px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.5s ease-in-out;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.02);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card img {
  max-width: 130px;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.assignment-status {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assignment-status span {
  background: #fce4ec;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #6a1b9a;
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: #ab47bc;
  text-decoration: none;
  font-weight: 600;
}

.card a:hover {
  text-decoration: underline;
}

canvas {
  max-width: 50vh;
  height: auto !important;
  margin: 20px auto;
  display: block;
  border: 2px solid #ce93d8;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #ba68c8;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

.hidden {
  display: none;
}

.toast {
  visibility: hidden;
  min-width: 220px;
  background-color: #ce93d8;
  color: #4a148c;
  text-align: center;
  border-radius: 6px;
  padding: 14px;
  position: fixed;
  z-index: 999;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
  box-shadow: 0 0 10px #ce93d8;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}

@media (max-width: 600px) {
  .container {
    padding: 20px;
  }
  .card {
    padding: 20px;
  }
  input[type="text"],
  button {
    font-size: 14px;
  }
}
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
}

.modal-content {
  position: relative;
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  box-shadow: 0 0 20px #000;
}

.certificate-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.close {
  position: absolute;
  top: 10px; right: 16px;
  font-size: 24px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
}

.hidden {
  display: none;
}
