* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.container {
  width: 100%;
  max-width: 480px;
}

h1 {
  text-align: center;
  margin-bottom: 32px;
  color: white;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.search-box {
  background: white;
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

#usernameInput {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  background: transparent;
  color: #2d3748;
  outline: none;
  font-weight: 400;
}

#usernameInput::placeholder {
  color: #a0aec0;
  font-weight: 400;
}

#searchBtn {
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
  white-space: nowrap;
}

#searchBtn:hover {
  background: linear-gradient(135deg, #3182ce, #2c5282);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

#searchBtn:active {
  transform: translateY(0);
}

.profile.hidden,
.error.hidden {
  display: none;
}

.profile-card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-card img {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  object-fit: cover;
  margin: 0 auto 20px auto;
  display: block;
  border: 4px solid #f7fafc;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.profile-details h2 {
  font-size: 24px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.profile-details p {
  font-size: 15px;
  color: #718096;
  margin-bottom: 20px;
  line-height: 1.5;
  font-weight: 400;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.profile-stats div {
  text-align: center;
  font-size: 13px;
  color: #4a5568;
  font-weight: 500;
}

.profile-stats span {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-top: 2px;
}

.repo-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.repo-list::-webkit-scrollbar {
  width: 4px;
}

.repo-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.repo-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.repo-list::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.repo-list a {
  text-decoration: none;
  background: #f7fafc;
  padding: 12px 16px;
  border-radius: 10px;
  color: #4a5568;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

.follow-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(45deg, #5b5f97, #9d7edc);

  .follow-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
    filter: brightness(1.1);
  }

  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(72, 187, 120, 0.2);
}

.follow-btn:active {
  transform: translateY(0);
}

.error {
  text-align: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 16px;
  border-radius: 12px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media screen and (max-width: 480px) {
  .container {
    margin-top: 20px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .search-box {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  #usernameInput {
    padding: 16px;
  }

  #searchBtn {
    justify-content: center;
    padding: 16px;
  }

  .profile-card {
    padding: 20px;
  }

  .profile-card img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .profile-details h2 {
    font-size: 20px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .profile-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .profile-stats span {
    margin-top: 0;
    font-size: 16px;
  }
}

@media screen and (max-width: 320px) {
  body {
    padding: 16px;
  }

  .profile-card {
    padding: 16px;
  }

  h1 {
    font-size: 22px;
  }
}
