:root {
  --color-bg: white;
  --color-bg-secondary: rgb(248, 248, 248);
  --color-text: black;
  --color-text-secondary: white;
  --color-text-tertiary: rgb(120, 120, 120);
  --color-accent: #238636;
  --color-accent-hover: #1b652a;
  --color-error-box: rgb(215, 42, 42);
  --color-border-rgb: 120, 120, 120;

  --font: Poppins, Arial, sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  margin: 0;
  padding: 4.5rem 0 1.5rem;
}
p, h2, h1 {
  margin: 0;
  padding: 0;
}

.search-container {
  border: 1px solid rgba(var(--color-border-rgb), 0.3);
  border-radius: 8px;
  max-width: 900px;
  width: 87%;
  margin: 1.5rem auto;
  padding: 1rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.search-container p {
  color: var(--color-text-tertiary);
  margin-bottom: 0.8rem;
}
.search {
  position: relative;
  width: 100%;
  margin: 0 auto;
  border-radius: 8px;
}
.search:focus-within {
  outline: 1px solid blue;
}
.search-input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 100px 10px 20px; 
  line-height: 1;
  box-sizing: border-box;
  outline: none;
}
.search-button {
  position: absolute;
  right: 3px; 
  top: 3px;
  bottom: 3px;
  border: 0;
  background: var(--color-accent);
  color: var(--color-text-secondary);
  outline: none;
  margin: 0;
  padding: 0 10px;
  border-radius: 8px;
  z-index: 2;
}
.search-button:hover {
  cursor: pointer;
  background: var(--color-accent-hover);
}

.search-error-container{
  background: var(--color-error-box);
  max-width: 900px;
  width: 87%;
  margin: 0 auto;
  padding: 1rem;
  color: var(--color-text-secondary);
  border-radius: 8px;
}

.loading-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
}
.loading-icon-gif {
  max-width: 150px;
}

.profile-container {
  border: 1px solid rgba(var(--color-border-rgb), 0.3);
  border-radius: 8px;
  max-width: 900px;
  width: 87%;
  display: flex;
  margin: 0 auto;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.profile-picture-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#userAvatar {
  height: 150px;
  width: 150px;
  object-fit: cover;
  border-radius: 100%;
  margin-bottom: 1rem;
}
.view-profile-button {
  background: var(--color-accent);
  color: var(--color-text-secondary);
  border-radius: 8px;
  border: none;
  padding: 8px 18px;
  transition: background-color 0.1s ease-in-out;
  text-decoration: none;
}
.view-profile-button:hover {
  cursor: pointer;
  background: var(--color-accent-hover);
}
.profile-info-section {
  flex: 3;
}
.profile-info-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.profile-username {
  color: var(--color-accent);
}
.profile-created-date {
  color: var(--color-text-tertiary);
}

.profile-info-stats {
  display: flex;
  justify-content: space-between;
  background-color: var(--color-bg-secondary);
  padding: 1rem 2rem;
  border-radius: 8px;
}
.profile-info-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-name {
  color: var(--color-text-tertiary);
}
.stat-count {
  font-weight: bold;
  font-size: 2rem;
}

.profile-info-bio {
  color: var(--color-text-tertiary);
}
.bio-grid {
  padding: 1rem 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.5rem 0rem;
}
.bio-grid-item {
  display: flex;
}
.bio-grid-item p:first-child {
  flex: 1;
}
.bio-grid-item-value {
  flex: 2;
}

.recent-repos-container {
  border: 1px solid rgba(var(--color-border-rgb), 0.3);
  border-radius: 8px;
  max-width: 900px;
  width: 87%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.repo {
  padding: 1rem;
  display: flex;
  margin-bottom: 1rem;
  background-color: var(--color-bg-secondary);
  border-radius: 8px;
}
.repo:last-child {
  margin: 0;
}
.repo-name-section {
  flex: 1.25;
  display: flex;
  align-items: center;
  justify-content: left;
}
.repo-name-section p {
  padding-left: 0.5rem;
}
.repo-link {
  text-decoration: none;
  transition: 0.2s ease-in-out;
  position: relative;
  color: var(--color-accent);
}
.repo-link:hover {
  color: var(--color-accent-hover);
}
.repo-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent-hover);
  transition: width 0.3s;
}
.repo-link:hover::after {
  width: 100%;
}
.repo-stats-section {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.5rem 0rem;
}
.repo-stat {
  display: flex;
}
.repo-stat p:first-child {
  flex: 1;
  color: var(--color-text-tertiary);
}
.repo-stat-value {
  flex: 2;
}