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

:root {
  --primary-color: #8be2fa;
  --primary-dark: #5cc8f6;
  --primary-light: #b5f2fd;
  --bg-dark: #1a1a1a;
  --card-bg: #252525;
  --text-light: #f3f4f6;
  --text-gray: #9ca3af;
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 10px;
  --transition: all 0.3s ease;
}

body {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 30px 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  transition: var(--transition);
}

body.light-mode {
  --bg-dark: #f5f7fa;
  --card-bg: #ffffff;
  --text-light: #333333;
  --text-gray: #666666;
  --primary-color: #5cc8f6;
  --primary-dark: #3ab4e6;
  --primary-light: #8be2fa;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
}

.container {
  width: 100%;
  max-width: 900px;
  position: relative;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

header {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeIn 0.8s ease-out;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(139, 226, 250, 0.4);
}

header p {
  color: var(--text-gray);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.search-container {
  display: flex;
  margin-bottom: 30px;
  gap: 10px;
  transition: transform 0.3s ease;
  animation: slideUp 0.6s ease-out;
}

.search-container:focus-within {
  transform: scale(1.02);
}

input[type="text"] {
  flex: 1;
  padding: 14px 18px;
  font-size: 1.1rem;
  border-radius: var(--border-radius);
  border: none;
  background-color: var(--card-bg);
  color: var(--text-light);
  outline: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

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

button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #000;
  border: none;
  border-radius: var(--border-radius);
  padding: 0 24px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

button:active {
  transform: translateY(0);
}

button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(30deg);
  transition: transform 0.6s;
}

button:hover::after {
  transform: translateY(100%) rotate(30deg);
}

#profile-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.8s ease-out;
  position: relative;
}

#profile-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--border-radius);
}

.loading-overlay .spinner {
  font-size: 3rem;
  color: var(--primary-color);
}

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

#avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(139, 226, 250, 0.3);
  transition: var(--transition);
}

#avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(139, 226, 250, 0.5);
}

.profile-info {
  flex: 1;
}

#name {
  font-size: 1.8rem;
  margin-bottom: 5px;
  color: var(--primary-light);
}

#username {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.bio {
  color: var(--text-gray);
  margin-bottom: 15px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.location-date {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
  color: var(--text-gray);
  font-size: 0.95rem;
}

.location-date i {
  color: var(--primary-color);
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #000;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.stat {
  background: linear-gradient(135deg, rgba(139, 226, 250, 0.1) 0%, rgba(92, 200, 246, 0.1) 100%);
  border-radius: var(--border-radius);
  padding: 18px;
  text-align: center;
  flex: 1;
  transition: var(--transition);
  border: 1px solid rgba(139, 226, 250, 0.1);
}

.stat:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(139, 226, 250, 0.15) 0%, rgba(92, 200, 246, 0.15) 100%);
  border-color: rgba(139, 226, 250, 0.2);
}

.stat i {
  color: var(--primary-color);
  margin-right: 8px;
  font-size: 1.2rem;
}

.stat span {
  font-size: 1.4rem;
  font-weight: 600;
  display: block;
  margin-top: 5px;
}

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

.hidden {
  display: none;
}

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

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-gray);
  font-size: 0.95rem;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.info-item:hover {
  background: rgba(0, 0, 0, 0.25);
  transform: translateX(5px);
}

.info-item i {
  color: var(--primary-color);
  width: 22px;
  text-align: center;
  font-size: 1.1rem;
}

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

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

.repos-section {
  margin-top: 35px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 25px;
}

.repos-section h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.repos-section h3 i {
  color: var(--primary-color);
}

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

.repo-card {
  background: linear-gradient(135deg, rgba(139, 226, 250, 0.1) 0%, rgba(92, 200, 246, 0.1) 100%);
  border-radius: var(--border-radius);
  padding: 18px;
  border: 1px solid rgba(139, 226, 250, 0.1);
  transition: transform 0.2s, background-color 0.2s;
  position: relative;
  overflow: hidden;
}

.repo-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(135deg, rgba(139, 226, 250, 0.15) 0%, rgba(92, 200, 246, 0.15) 100%);
  border-color: rgba(139, 226, 250, 0.2);
}

.repo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

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

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

.repo-description {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
  overflow: hidden;
  min-height: 40px;
  line-height: 1.5;
}

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

.repo-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 20px;
}

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

.loading-repos {
  color: var(--text-gray);
  text-align: center;
  padding: 30px;
  grid-column: 1 / -1;
  font-size: 1.1rem;
}

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

.chart-container {
  margin: 25px 0;
  height: 200px;
  position: relative;
}
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.3);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: var(--primary-color);
  font-size: 1.3rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: rotate(15deg);
}

.pinned-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #000;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(5px, 5px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

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

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

  .repos-container {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
}