:root {
  --bg-color: #141d2f;
  --glass-bg: rgba(30, 42, 71, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-secondary: #94a3b8;
  --accent: #0079ff;
}

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

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  font-family: 'Space Mono', monospace;
  color: var(--text-main);
  padding: 20px;
  overflow-x: hidden;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(80px) brightness(0.3);
  transition: background-image 1s ease;
}

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

.header {
  margin-bottom: 30px;
}

.logo {
  font-size: 26px;
}

.search-container {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 20px;
  position: relative;
}

.search-container input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 10px;
  font-family: inherit;
  outline: none;
  font-size: 16px;
}

.search-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.search-btn:hover {
  opacity: 0.8;
}

.error-msg {
  color: #f74646;
  font-weight: bold;
  position: absolute;
  right: 130px;
  display: none;
}

.profile-card {
  position: relative;
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  display: none;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--card-img);
  background-size: cover;
  background-position: center;
  filter: blur(100px) opacity(0.2);
  z-index: -1;
}

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

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--glass-border);
}

.profile-info {
  flex: 1;
}

.info-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.name {
  font-size: 24px;
  font-weight: bold;
}

.joined-date {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
}

.username {
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin-top: 5px;
}

.bio {
  margin: 25px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.stats-container {
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  padding: 20px 30px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  margin-top: 5px;
}

.links-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.link-item svg {
  width: 18px;
  fill: var(--text-main);
}

.link-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.link-item.unavailable {
  opacity: 0.4;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .search-container {
    flex-direction: column;
    padding: 15px;
    height: auto;
    gap: 10px;
  }

  .error-msg {
    position: static;
    text-align: center;
    width: 100%;
    order: 2;
  }

  .search-btn {
    width: 100%;
    order: 3;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .info-top {
    flex-direction: column;
    align-items: center;
  }

  .links-container {
    grid-template-columns: 1fr;
  }
}

.loader {
  display: none;
  justify-content: center;
  margin: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--glass-border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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