@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@700;800&display=swap');

/* CSS Variables */
:root {
  --bg:        #08091a;
  --surface:   #0f1030;
  --card:      rgba(255,255,255,0.04);
  --border:    rgba(180,100,240,0.25);
  --border-hi: rgba(220,150,255,0.5);
  --accent:    #c760b0;
  --accent-hi: #e491c9;
  --glow:      rgba(199,96,176,0.35);
  --text:      #f0e6ff;
  --text-muted:#a07ac0;
  --radius:    1.25rem;
  --mono:      'Space Mono', monospace;
  --display:   sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Body */
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, #1e0840 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 85% 90%, #120430 0%, transparent 55%),
    repeating-linear-gradient(0deg,   transparent, transparent 72px, rgba(148,60,180,0.05) 72px, rgba(148,60,180,0.03) 73px),
    repeating-linear-gradient(90deg,  transparent, transparent 72px, rgba(148,60,180,0.05) 72px, rgba(148,60,180,0.03) 73px);
  font-family: var(--mono);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.25rem 5rem;
  gap: 2.5rem;
}

/*Header*/
header {
  width: 100%;
  max-width: 680px;
  text-align: center;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, #f0c0e8 0%, #e491c9 45%, #c760b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px rgba(199,96,176,0.4));
}

/*Search Container */
.container {
  width: 100%;
  max-width: 680px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(180,100,240,0.08),
    0 12px 40px rgba(100,20,140,0.3),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 40%);
  border-radius: inherit;
  pointer-events: none;
}

.container:hover {
  box-shadow:
    0 0 0 1px rgba(220,150,255,0.18),
    0 16px 56px rgba(140,40,160,0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

input {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: rgba(8,6,20,0.6);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  color: var(--text);
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

input::placeholder {
  color: rgba(160,122,192,0.45);
  font-size: 0.82rem;
}

input:focus {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px rgba(199,96,176,0.15);
}

#findBtn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  color: #12022a;
  border: none;
  border-radius: 0.65rem;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 16px var(--glow);
  flex-shrink: 0;
}

#findBtn:hover {
  background: linear-gradient(135deg, #f5d0f0, var(--accent-hi));
  box-shadow: 0 4px 28px rgba(199,96,176,0.65);
  transform: translateY(-1px);
}

#findBtn:active {
  transform: translateY(0);
  box-shadow: 0 1px 8px var(--glow);
}

/*Profile Card */
.profile-card {
  width: 100%;
  max-width: 680px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  flex-direction: column;
  gap: 2rem;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(180,100,240,0.08),
    0 12px 40px rgba(100,20,140,0.3),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(180,100,240,0.06) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

/* Identity */
.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--border-hi);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 24px var(--glow), 0 4px 12px rgba(0,0,0,0.5);
}

.profile-info {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.username {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text);
  line-height: 1.1;
}

.nameTag {
  font-size: 0.75rem;
  color: var(--accent-hi);
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.3rem;
}

.link-account {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  color: var(--accent-hi);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.25s ease;
}

.link-account::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #c084fc, #e879f9);
  transition: width 0.3s ease;
}

.link-account:hover::after {
  width: 100%;
}

/* Container untuk bagian kontribusi */
.profile-contributions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin-top: 0.5rem;
}

.profile-contributions h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Memaksa gambar grafik menjadi responsif */
#contributionGraph {
  width: 100%; 
  max-width: 100%; 
  height: auto; 
  border-radius: 0.8rem; 
  object-fit: contain; 
  display: block;
}

/* Stats */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: rgba(8,6,20,0.45);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem 0.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.stat:hover {
  border-color: var(--border-hi);
  background: rgba(199,96,176,0.07);
}

.stat-value {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Meta */
.profile-meta {
  display: flex;
  gap: 0.75rem 2rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.profile-meta p {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1.5;
}



/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 2rem 1rem 4rem;
    gap: 1.75rem;
  }

  .container {
    padding: 1.25rem 1.25rem;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  #findBtn {
    width: 100%;
    padding: 0.75rem;
    text-align: center;
  }

  .profile-card {
    padding: 1.5rem 1.25rem;
    gap: 1.5rem;
  }

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

  .profile-info {
    text-align: center;
    align-items: center;
  }

  .photo {
    width: 80px;
    height: 80px;
  }

  .profile-meta {
    justify-content: center;
    text-align: center;
  }

  .link-account{
    align-self: center;
  }

}