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

body {
  font-family: 'Inter', sans-serif;
  background: #f0f2f5;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  padding: 18px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

main {
  flex: 1;
  padding: 40px 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.search-section {
  margin-bottom: 40px;
}

.container {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.section-heading {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 24px;
}

.input-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  background: #f8fafc;
}

input[type="text"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background: #fff;
}

input[type="text"]::placeholder {
  color: #94a3b8;
}

button {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

button:active {
  transform: translateY(0);
}

.spinner-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 5px solid #e2e8f0;
  border-top: 5px solid #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

.result-section {
  animation: fadeIn 0.5s ease;
}

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

.card {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  max-width: 800px;
  margin: 0 auto;
  animation: cardPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardPop {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #eef2ff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto 20px;
  transition: transform 0.3s ease;
}

.card img:hover {
  transform: scale(1.05);
}

.card h3 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-bottom: 18px;
}

.card p {
  font-size: 14px;
  color: #475569;
  margin: 8px 0;
  text-align: center;
  line-height: 1.7;
}

.card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 20px 0 12px;
  text-align: center;
}

.card .assignment-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card .assignment-status span {
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card .assignment-status span:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

#toast {
  visibility: hidden;
  min-width: 280px;
  background: #0f172a;
  color: #f8fafc;
  text-align: center;
  border-radius: 12px;
  padding: 16px 24px;
  position: fixed;
  z-index: 999;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  main {
    padding: 24px 16px;
  }

  .container {
    padding: 28px 24px;
  }

  .section-heading {
    font-size: 22px;
  }

  .brand-title {
    font-size: 19px;
  }

  .brand-tagline {
    font-size: 12px;
  }

  .card h3 {
    font-size: 20px;
  }

  .card {
    padding: 28px 24px;
  }

  .input-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-inner {
    flex-direction: column;
    text-align: center;
  }

  .brand-left {
    justify-content: center;
  }

  .section-heading {
    font-size: 20px;
  }

  .container {
    padding: 22px 18px;
  }

  .card {
    padding: 22px 18px;
  }

  .card img {
    width: 100px;
    height: 100px;
  }

  .card h3 {
    font-size: 18px;
  }

  #toast {
    min-width: auto;
    left: 16px;
    right: 16px;
    transform: translateY(20px);
  }

  #toast.show {
    transform: translateY(0);
  }
}
