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

/* THEME VARIABLES */
:root {
  --primary-color: #a78bfa;
  --primary-dark: #8b5cf6;
  --primary-light: #c4b5fd;
  --bg-color: #1a1a1a;
  --card-bg: #252525;
  --text-color: #f3f4f6;
  --text-muted: #9ca3af;
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 10px;
}

body.light-mode {
  --bg-color: #f9f9f9;
  --card-bg: #ffffff;
  --text-color: #1a1a1a;
  --text-muted: #4b5563;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 30px 15px;
  font-family: sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

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

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.search-container {
  display: flex;
  margin-bottom: 30px;
  gap: 10px;
}

input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: none;
  background-color: var(--card-bg);
  color: var(--text-color);
  outline: none;
}

input[type="text"]:focus {
  box-shadow: 0 0 0 2px var(--primary-color);
}

button {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: var(--border-radius);
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: var(--primary-dark);
}

#profile-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  margin-bottom: 25px;
}

#avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.profile-info {
  flex: 1;
}

#name {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

#username {
  color: var(--primary-color);
  margin-bottom: 10px;
}

#bio {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.location-date {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.location-date i {
  color: var(--primary-color);
  margin-right: 5px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: #000;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--primary-dark);
}

.stats {
  display: flex;
  gap: 15px;
  justify-content: space-between;
}

.stat {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 12px;
  text-align: center;
  flex: 1;
  color: var(--text-muted);
}

.stat i {
  color: var(--primary-color);
  margin-right: 5px;
}

#error-container {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 15px;
  border-radius: var(--border-radius);
  text-align: center;
}

.hidden {
  display: none;
}

.additional-info {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-item i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.info-item a {
  color: var(--text-muted);
  text-decoration: none;
  word-break: break-word;
}

.info-item a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.repos-section {
  margin-top: 30px;
}

.repos-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-color);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.repos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.repo-card {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s, background-color 0.2s;
  color: var(--text-muted);
}

.repo-card:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.05);
}

.repo-name {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-light);
  text-decoration: none;
  display: block;
}

.repo-name:hover {
  text-decoration: underline;
}

.repo-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  overflow: hidden;
  min-height: 35px;
}

.repo-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.repo-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.repo-meta-item i {
  color: var(--primary-color);
}

.loading-repos {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  grid-column: 1 / -1;
}

.no-repos {
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
}

@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .location-date {
    justify-content: center;
    flex-direction: column;
    gap: 5px;
  }

  .stats,
  .additional-info {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .info-item {
    justify-content: center;
  }
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border: none;
  background-color: var(--card-bg);
  color: var(--text-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--primary-light);
  color: #000;
}

#theme-icon {
  font-size: 1.2rem;
}


body.light-mode .stat,
body.light-mode .repo-card {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
}

body.light-mode .repo-card:hover {
  background-color: #eaeaea;
}

body.light-mode .additional-info {
  border-top: 1px solid #ddd;
}

body.light-mode .repos-section h3 {
  border-bottom: 1px solid #ddd;
}
