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

:root {
  --primary-color: #1d5874;
  --primary-dark: #0284c7;
  --primary-light: #7dd3fc;
  --accent-color: #06b6d4;
  --bg-dark: #0f172a;
  --card-bg: #1e293b;
  --card-hover: #334155;
  --text-light: #f8fafc;
  --text-gray: #94a3b8;
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --border-radius: 16px;
  --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

body {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e1b4b 100%);
  background-attachment: fixed;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

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

header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

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

.search-container {
  display: flex;
  margin-bottom: 40px;
  gap: 15px;
  position: relative;
}

input[type="text"] {
  flex: 1;
  padding: 16px 24px;
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-light);
  outline: none;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.95);
}

button {
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

button:hover::before {
  left: 100%;
}

#profile-container {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 35px;
  box-shadow: var(--shadow-md);
  margin-bottom: 25px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#profile-container:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.3);
}

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

#avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid transparent;
  background: linear-gradient(var(--primary-color), var(--accent-color)) padding-box,
              var(--gradient) border-box;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

#avatar:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
}

.profile-info {
  flex: 1;
}

#name {
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-weight: 800;
}

#username {
  color: var(--primary-light);
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.bio {
  color: var(--text-gray);
  margin-bottom: 20px;
  line-height: 1.8;
}

.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;
  transition: transform 0.3s ease;
}

.location-date:hover i {
  transform: scale(1.2);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--gradient);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
}

.btn:hover::before {
  left: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 25px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 20px 15px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.stat:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--primary-color);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.2);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
  display: block;
  margin-bottom: 5px;
}

.stat-label {
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 500;
}

#error-container {
  background: rgba(239, 68, 68, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: center;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.hidden {
  display: none;
}

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

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-gray);
  font-size: 0.95rem;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.info-item:hover {
  background: rgba(14, 165, 233, 0.1);
  transform: translateX(8px);
  color: var(--text-light);
}

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

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

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

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

.repos-section h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--text-light);
  padding-bottom: 12px;
  position: relative;
}

.repos-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

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

.repo-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.repo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.repo-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.3);
}

.repo-card:hover::before {
  transform: scaleX(1);
}

.repo-name {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-light);
  text-decoration: none;
  display: block;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.repo-name:hover {
  color: white;
  text-shadow: 0 2px 10px rgba(14, 165, 233, 0.5);
}

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

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

.repo-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}

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

.repo-meta-item i {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.loading-repos,
.no-repos {
  color: var(--text-gray);
  text-align: center;
  padding: 40px 20px;
  grid-column: 1 / -1;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.no-repos {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 20px 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  
  #avatar {
    width: 80px;
    height: 80px;
  }
  
  .stats,
  .additional-info,
  .repos-container {
    grid-template-columns: 1fr;
  }
  
  .location-date {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .search-container {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  #profile-container {
    padding: 25px 20px;
  }
  
  .repo-card {
    padding: 20px;
  }
}
