@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Noto+Sans+SC:wght@400;500;700&display=swap');

.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 24px;
  font-family: 'Noto Sans SC', sans-serif;
}

@media (max-width: 768px) {
  .profile-bg {
    position: relative;
    margin: -24px -9999px 0;
    padding: 24px 9999px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 50%, transparent 100%);
  }

  .profile-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at 50% 0%, var(--glow) 0%, transparent 70%);
    pointer-events: none;
  }
}

.profile-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: 0 0 40px var(--glow), 0 20px 60px rgba(0,0,0,0.5);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, var(--glow) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0.4;
}

.profile-card::after {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 60%);
  pointer-events: none;
}

.card-header {
  padding: 28px 24px 0;
  position: relative;
}

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--primary);
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--glow);
}

.rank-badge i { font-size: 12px; }

.time-text {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: #fff;
  letter-spacing: 1px;
}

.avatar-section {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.avatar-frame {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(255,255,255,0.85);
  box-shadow: 0 0 24px var(--glow), 0 8px 16px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.12);
  position: relative;
}

.avatar-frame::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.link-edit-profile {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
  transition: color 0.2s;
}

.link-edit-profile:hover {
  color: #fff;
}

.link-edit-profile i {
  font-size: 10px;
}

.user-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 80px;
}

.username {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.uid-tag {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.exp-section {
  margin-top: 12px;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.exp-track {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  box-shadow: 0 0 10px var(--glow);
  transition: width 0.6s ease;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 24px;
  margin-bottom: 24px;
}

.stat-box {
  text-align: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 14px 8px;
}

.stat-num {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
}

.stat-name {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.divider {
  height: 1px;
  margin: 0 24px;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
}

.wallet-card {
  position: relative;
  margin: 20px 16px 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  min-height: 70px;
}

.wallet-row {
  display: flex;
  align-items: center;
}

.wallet-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wallet-info {
  flex: 1;
}

.wallet-label {
  font-size: 11px;
  color: #999;
  letter-spacing: 1px;
}

.wallet-value {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.wallet-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  margin: 0 16px;
}

.wallet-link {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: opacity 0.2s;
}

.wallet-link:hover {
  opacity: 0.7;
}

.card-body {
  padding: 20px 24px 24px;
}

.exp-orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 16px 0;
  gap: 8px;
}

.exp-orb-ring {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-orb-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.exp-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}

.exp-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 289.03;
  stroke-dashoffset: calc(289.03 - (289.03 * var(--progress) / 100));
  transition: stroke-dashoffset 1s ease;
  filter: drop-shadow(0 0 6px var(--glow));
}

.exp-orb {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: none;
  box-shadow: inset 0 0 16px rgba(0,0,0,0.2);
  overflow: hidden;
}

.exp-orb-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--progress) * 1%);
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
  opacity: 0.7;
  transition: height 1s ease;
}

.exp-orb-wave {
  position: absolute;
  top: -8px;
  left: -20%;
  width: 140%;
  height: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 100%);
  border-radius: 40%;
  animation: waveMove 2s ease-in-out infinite;
}

.exp-orb-wave2 {
  top: -6px;
  left: -30%;
  width: 160%;
  height: 14px;
  animation-duration: 2.5s;
  animation-delay: -0.5s;
  opacity: 0.6;
  border-radius: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.05) 100%);
}

@keyframes waveMove {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(8px) rotate(2deg); }
  50% { transform: translateX(-4px) rotate(-1deg); }
  75% { transform: translateX(6px) rotate(1deg); }
}

.exp-orb-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.exp-orb-level {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
  line-height: 1;
}

.exp-orb-remain {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.exp-orb-label {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--glow);
}

.exp-orb-next {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1px;
}

.bottom-section {
  margin-top: 20px;
  padding: 0 4px;
}

.vip-benefits-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin: 0 4px;
}

.benefits-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.benefits-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 20px var(--glow);
}

.benefits-header-text {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px;
  transition: all 0.25s ease;
}

.benefit-item:hover .benefit-icon-wrap {
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--glow);
}

.benefit-item:hover .benefit-title {
  color: #fff;
  text-shadow: 0 0 10px var(--glow);
}

.benefit-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px var(--glow);
  flex-shrink: 0;
}

.benefit-text {
  min-width: 0;
  text-align: center;
  width: 100%;
}

.benefit-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.benefit-desc {
  display: none;
}

.disclaimer-text {
  font-size: 11px;
  color: #999;
  text-align: center;
  padding: 16px 20px 0;
  line-height: 1.8;
  letter-spacing: 0.3px;
}

.btn-logout-bottom {
  display: block;
  width: 100%;
  border: none;
  background: rgba(254,226,226,0.5);
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  border-radius: 10px;
  margin-top: 12px;
  border: 1px solid rgba(252,165,165,0.3);
}

.btn-logout-bottom:hover {
  background: rgba(254,226,226,0.8);
  color: #b91c1c;
  border-color: rgba(252,165,165,0.5);
}

.btn-login-bottom {
  display: block;
  width: 100%;
  border: none;
  background: rgba(168,85,247,0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  border-radius: 10px;
  margin-top: 12px;
  border: 1px solid rgba(168,85,247,0.2);
}

.btn-login-bottom:hover {
  background: rgba(168,85,247,0.2);
  border-color: rgba(168,85,247,0.4);
}

@media (max-width: 768px) {
  .card-header {
    padding: 20px 16px 0;
  }
  .avatar-frame {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
  .username {
    font-size: 18px;
  }
  .stats-grid {
    padding: 0 16px;
    gap: 8px;
  }
  .stat-box {
    padding: 10px 6px;
  }
  .stat-num {
    font-size: 17px;
  }
  .card-body {
    padding: 16px 16px 20px;
  }
}

.profile-card.vip-tier-2 {
  border: 1px solid rgba(212,168,64,0.5);
  animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
  0%, 100% { box-shadow: 0 0 30px rgba(196,149,32,0.15), 0 20px 60px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 40px rgba(196,149,32,0.25), 0 20px 60px rgba(0,0,0,0.5), inset 0 0 20px rgba(212,168,64,0.06); }
}

.profile-card.vip-tier-2::before {
  background: radial-gradient(ellipse at 50% -20%, rgba(212,168,64,0.2) 0%, transparent 70%);
}

.profile-card.vip-tier-2 .vip-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(212,168,64,0.9), transparent),
    radial-gradient(1.5px 1.5px at 80% 20%, rgba(212,168,64,0.7), transparent),
    radial-gradient(2.5px 2.5px at 50% 70%, rgba(212,168,64,0.8), transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(212,168,64,0.6), transparent),
    radial-gradient(2px 2px at 70% 50%, rgba(212,168,64,0.7), transparent),
    radial-gradient(1.5px 1.5px at 40% 10%, rgba(212,168,64,0.8), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(212,168,64,0.6), transparent),
    radial-gradient(2.5px 2.5px at 30% 90%, rgba(212,168,64,0.7), transparent),
    radial-gradient(1.5px 1.5px at 60% 40%, rgba(245,208,96,0.5), transparent),
    radial-gradient(2px 2px at 15% 55%, rgba(245,208,96,0.6), transparent);
  animation: goldParticles 6s linear infinite;
  pointer-events: none;
  border-radius: 20px;
}

@keyframes goldParticles {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-20px); }
}

.profile-card.vip-tier-3 {
  border: 1px solid rgba(142,202,230,0.4);
  animation: prismShimmer 3s ease-in-out infinite;
}

@keyframes prismShimmer {
  0%, 100% { box-shadow: 0 0 30px rgba(110,180,217,0.15), 0 20px 60px rgba(0,0,0,0.5); }
  33% { box-shadow: 0 0 35px rgba(110,180,217,0.2), 0 20px 60px rgba(0,0,0,0.5), 0 0 60px rgba(160,140,220,0.1); }
  66% { box-shadow: 0 0 35px rgba(110,180,217,0.2), 0 20px 60px rgba(0,0,0,0.5), 0 0 60px rgba(140,200,180,0.1); }
}

.profile-card.vip-tier-3::before {
  background: linear-gradient(135deg,
    rgba(110,180,217,0.2) 0%,
    rgba(160,140,220,0.12) 25%,
    rgba(140,200,180,0.12) 50%,
    rgba(180,160,200,0.12) 75%,
    rgba(110,180,217,0.2) 100%
  );
  background-size: 200% 200%;
  animation: prismShift 4s linear infinite;
}

@keyframes prismShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.profile-card.vip-tier-3 .vip-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 15% 25%, rgba(142,202,230,0.95), transparent),
    radial-gradient(1.5px 1.5px at 75% 15%, rgba(160,140,220,0.8), transparent),
    radial-gradient(3px 3px at 45% 65%, rgba(142,202,230,0.9), transparent),
    radial-gradient(1.5px 1.5px at 85% 75%, rgba(140,200,180,0.75), transparent),
    radial-gradient(2px 2px at 25% 85%, rgba(160,140,220,0.7), transparent),
    radial-gradient(1.5px 1.5px at 55% 35%, rgba(142,202,230,0.8), transparent),
    radial-gradient(2.5px 2.5px at 65% 90%, rgba(140,200,180,0.85), transparent),
    radial-gradient(1.5px 1.5px at 35% 50%, rgba(180,160,200,0.7), transparent),
    radial-gradient(2px 2px at 90% 40%, rgba(142,202,230,0.8), transparent),
    radial-gradient(1.5px 1.5px at 5% 60%, rgba(160,140,220,0.7), transparent),
    radial-gradient(2px 2px at 50% 10%, rgba(200,180,240,0.6), transparent),
    radial-gradient(2.5px 2.5px at 70% 30%, rgba(142,202,230,0.7), transparent);
  animation: diamondParticles 5s linear infinite;
  pointer-events: none;
  border-radius: 20px;
}

@keyframes diamondParticles {
  0% { opacity: 0; transform: translateY(0) scale(1); }
  15% { opacity: 1; }
  50% { transform: translateY(-15px) scale(1.05); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-30px) scale(1); }
}