*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #f0a500;
  --gold-light: #ffd166;
  --gold-deep: #c47d00;
  --gold-pale: #fff8e7;
  --gold-mid: #fceec8;
  --text-primary: #1a1207;
  --text-secondary: #5c4a1e;
  --text-muted: #9b8558;
  --surface: #ffffff;
  --surface-2: #fffbf2;
  --surface-3: #fff5d6;
  --border: rgba(240, 165, 0, 0.18);
  --border-strong: rgba(240, 165, 0, 0.35);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-strong: rgba(255, 255, 255, 0.88);
  --shadow-sm: 0 2px 12px rgba(196, 125, 0, 0.1);
  --shadow-md: 0 8px 32px rgba(196, 125, 0, 0.13);
  --shadow-lg: 0 20px 60px rgba(196, 125, 0, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

* {
  font-family: "Geom", sans-serif !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Geom", sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background: #ffffff;
}

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f5e9c8 0%, #fff3d6 50%, #f5e9c8 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-block {
  border-radius: 8px;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: auto;
  width: 120px;
  object-fit: contain;
}

.nav-logo-text {
  font-family: "Geom", sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-logo-text span {
  color: var(--gold);
}

.nav-badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--gold-deep);
  background: var(--gold-mid);
  border: 1px solid rgba(240, 165, 0, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ── Cover ── */
.cover-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  width: 74%;
  margin: auto;
  display: flex;
  align-items: center;
}

.cover-wrap img {
  width: -webkit-fill-available;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Profile section ── */
.profile-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -52px;
  margin-bottom: 16px;
  position: relative;
  z-index: 10;
}

.avatar-wrap {
  position: relative;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 17%;
  border: 5px solid #ffffff;
  object-fit: cover;
  display: block;
  background: var(--gold-mid);
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 8px 16px;
  border-radius: 40px;
  background: #ffd73c;
  color: #000000;
  border: 0px;
  box-shadow: 0px 0px 4px #ffcf3c;
}

.type-badge i {
  font-size: 12px;
  color: #000000;
}

/* ── Identity ── */
.identity {
  margin-bottom: 20px;
}

.display-name {
  font-family: "Clash Display", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.username-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.username {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.username strong {
  color: var(--gold-deep);
  font-weight: 600;
}

.ambassador-id {
  font-size: 12px;
  color: var(--text-muted);
  font-family: "DM Sans", monospace;
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.country-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.country-row i {
  font-size: 15px;
  color: var(--gold);
}

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold-mid), var(--gold-pale));
  border: 1px solid rgba(240, 165, 0, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.stat-icon i {
  font-size: 18px;
  color: var(--gold-deep);
}

.stat-value {
  font-family: "Clash Display", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Social links ── */
.socials-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--glass-bg-strong);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.social-link i {
  font-size: 16px;
}

.social-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 4px 16px rgba(240, 165, 0, 0.3);
  transform: translateY(-1px);
}

.social-link.twitter i {
  color: #1da1f2;
}

.social-link.facebook i {
  color: #1877f2;
}

.social-link.youtube i {
  color: #ff0000;
}

.social-link.tiktok i {
  color: #000;
}

.social-link:hover i {
  color: #fff !important;
}

/* ── Invite CTA ── */
.invite-card {
  background: linear-gradient(135deg, #fff8e7 0%, #fff3cc 100%);
  border: 1.5px solid rgba(240, 165, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.invite-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.invite-label i {
  font-size: 14px;
}

.invite-message {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 480px;
}

.invite-message strong {
  color: var(--text-primary);
  font-weight: 600;
}

.invite-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.invite-code-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: "Syne", monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 2px;
  box-shadow: var(--shadow-sm);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.2px;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(240, 165, 0, 0.35);
}

.copy-btn:hover {
  background: var(--gold-deep);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: scale(0.97);
}

.copy-btn i {
  font-size: 15px;
}

.play-store-btn {
  display: inline-flex;
  gap: 10px;
  padding: 11px 22px;
  background: #ffffff;
  color: #000000;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.play-store-btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.play-store-btn .ps-text {
  text-align: left;
  line-height: 1.2;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.play-store-btn .ps-sub {
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.3px;
  color: #373737;
}

.play-store-btn .ps-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #000;
}

.play-store-btn i {
  font-size: 27px;
}

.ps-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 32px 20px 40px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer a {
  color: var(--gold-deep);
  text-decoration: none;
}

/* ── Animations ── */
.fade-in {
  animation: fadeIn 0.5s ease both;
}

.fade-in-up {
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* ── Skeleton state ── */
#skeleton-view {
  display: block;
}

#profile-view {
  display: none;
}

#error-view {
  display: none;
}

.skeleton-avatar {
    width: 104px;
    height: 104px;
    border-radius: 12%;
    border: 4px solid #fff;
}

.sk-line {
  height: 14px;
  margin-bottom: 10px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .cover-wrap {
    height: 105px;
    width: 100%;
  }

  .display-name {
    font-size: 17px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-value {
    font-size: 11px;
  }

  .invite-card {
    padding: 20px 16px;
  }

  .invite-code-box {
    font-size: 17px;
    letter-spacing: 1px;
  }

  .avatar {
    width: 88px;
    height: 88px;
  }

  .install-text{
    display: none;
  }
}

@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-label {
    font-size: 8px;
  }

  .social-link {
    width: 48%;
  }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1207;
  color: #fff;
  padding: 10px 22px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast i {
  color: var(--gold);
  font-size: 16px;
}

/* Divider */
.section-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-strong),
    transparent
  );
  margin: 4px 0 20px;
}

.install-box {
  background: black;
  border-radius: 20px;
  padding: 12px;
}

.install-box img {
  width: 70px;
  border-radius: 13px;
  margin-right: 12px;
}

.install-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.install-content p {
  font-size: 11px;
}

.install-content div {
  display: flex;
  color: white;
  align-items: center;
}
