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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
}

.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.nav-link:hover {
  opacity: 0.8;
}

.logout-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.logout-btn:hover {
  background-color: white;
  color: #667eea;
}

.section {
  display: none;
  animation: fadeIn 0.6s ease-out;
}

.section.active {
  display: block;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slideUp 0.8s ease-out;
}

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

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInScale 0.9s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  animation: fadeInScale 1s ease-out;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  background: white;
  padding: 3rem 2rem;
  margin: 0 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-3rem);
  position: relative;
  z-index: 10;
}

.stat {
  text-align: center;
  animation: fadeInUp 0.7s ease-out 0.2s backwards;
}

.stat h3 {
  font-size: 2.5rem;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.stat p {
  color: #666;
  font-size: 1.1rem;
}

.how-it-works {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 3rem 2rem;
  text-align: center;
}

.how-it-works h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.step {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.7s ease-out;
  transition: all 0.4s ease;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.step h4 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.step p {
  color: #666;
  line-height: 1.6;
}

.featured-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 3rem 2rem;
  text-align: center;
}

.featured-section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.featured-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.featured-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: fadeInUp 0.6s ease-out;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.featured-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.featured-card h4 {
  font-size: 1.2rem;
  color: #333;
  padding: 1.5rem 1rem 0.5rem;
  margin: 0;
}

.featured-card p {
  color: #667eea;
  font-weight: 600;
  padding: 0 1rem 1.5rem;
  margin: 0;
}

.cta-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s ease;
  font-weight: 600;
}

.btn-primary {
  background-color: #667eea;
  color: white;
}

.btn-primary:hover {
  background-color: #5568d3;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: white;
  color: #667eea;
  transform: translateY(-3px);
}

.form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
  animation: slideInUp 0.7s ease-out;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-text {
  text-align: center;
  margin-top: 1rem;
  color: #666;
}

.form-text a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

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

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border-left: 4px solid #28a745;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border-left: 4px solid #f5c6cb;
}

.profile-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-card {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-picture-section {
  flex-shrink: 0;
}

.profile-picture {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  border: 3px solid #667eea;
}

.profile-info {
  flex: 1;
  min-width: 250px;
}

.profile-info h3 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.profile-type {
  display: inline-block;
  background-color: #667eea;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 600;
}

.profile-detail {
  margin-bottom: 1rem;
}

.profile-detail-label {
  font-weight: 600;
  color: #667eea;
}

.profile-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.edit-btn {
  background-color: #667eea;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.edit-btn:hover {
  background-color: #5568d3;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.delete-btn:hover {
  background-color: #c82333;
}

.search-container {
  background: transparent;
  padding: 2rem 0;
  border-radius: 0;
  box-shadow: none;
}

.search-box {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.6s ease-out;
}

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

.search-box input,
.search-box select {
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
}

.search-box input {
  flex: 1;
  min-width: 200px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  animation: fadeIn 0.6s ease-out;
}

.user-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.6s ease-out;
}

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

.user-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
  border-color: #667eea;
}

.user-card-header {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.user-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card-body {
  padding: 1.5rem;
}

.user-card-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.3rem;
}

.user-card-type {
  display: inline-block;
  background-color: #667eea;
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
}

.user-card-subject {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.user-card-bio {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.user-card-details {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.user-card-footer {
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.contact-btn {
  width: 100%;
  background-color: #667eea;
  color: white;
  padding: 0.7rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.4s ease;
}

.contact-btn:hover {
  background-color: #5568d3;
  transform: scale(1.02);
}

.no-results {
  text-align: center;
  color: #666;
  padding: 2rem;
}

.login-prompt {
  text-align: center;
  color: #666;
}

.login-prompt a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input,
  .search-box select,
  .search-box button {
    width: 100%;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
  }

  .profile-info {
    text-align: center;
  }

  .profile-buttons {
    justify-content: center;
  }

  .search-results {
    grid-template-columns: 1fr;
  }
}
