@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");

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

body {
  background: #f4f4f9;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;   
  padding: 40px 20px;    
  transition: background 0.3s, color 0.3s;
}


.center-container {
  text-align: center;
  margin-top: 80px;   
  margin-bottom: 40px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  margin-top: 80px;
  color: #007bff;
  text-align: center;
}


.search-box {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.search-box input {
  padding: 16px 18px;   
  width: 500px;      
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid #007bff;
  outline: none;
}

.search-box button {
  padding: 16px 24px;
  border: none;
  border-radius: 10px;
  background: #007bff;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.search-box button:hover {
  background: #0056b3;
}


#toggle {
  position: absolute;
  top: 15px;
  right: 20px;
  border: none;
  padding: 8px 12px;
  background: #333;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

#toggle:hover {
  background: #007bff;
}


.card {
  max-width: 600px;
  margin: auto;
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 120px;
  border-radius: 50%;
  border: 3px solid #007bff;
}

.user-info h2 {
  margin-bottom: 10px;
  color: #007bff;
}

.user-info p {
  margin-bottom: 10px;
}

.user-info ul {
  display: flex;
  gap: 15px;
  list-style: none;
  margin-top: 10px;
}

.user-info ul li strong {
  color: #007bff;
}

.repos a {
  display: inline-block;
  background: #ff4500;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  margin: 5px 5px 0 0;
  text-decoration: none;
  transition: 0.3s;
}

.repos a:hover {
  background: #e63900;
}


.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 50px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


body.dark-mode {
  background: #121212;
  color: #f5f5f5;
}

body.dark-mode h1 {
  color: #90caf9;
}

body.dark-mode .card {
  background: #1e1e1e;
  color: #fff;
}

body.dark-mode .search-box input {
  background: #333;
  color: #fff;
  border: 2px solid #90caf9;
}

body.dark-mode .search-box button {
  background: #90caf9;
  color: #000;
}

body.dark-mode .repos a {
  background: #3949ab;
}

body.dark-mode #toggle {
  background: #90caf9;
  color: #000;
}
