:root {
  --primary-bg: #34e7ea;
  --text-color: #010101;
  --card-bg: #fbfaf9;
  --link-bg: #e4e5e6;
  --link-hover: #d4d5d6;
  --promo-bg: #f5ede4;
  --promo-border: #d4b48c;
  --promo-text: #4a2f1a;
  --promo-code-bg: #2e241f;
  --promo-code-color: #ffddb0;
  --footer-bg: #f3ede7;
  --footer-text: #553b22;
  --toast-bg: #1e1a16;
  --toast-color: #ffefdf;
  --shadow: rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--primary-bg);
  font-family: 'Roboto Serif', 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

main {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  background: transparent;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: var(--primary-bg);
  z-index: -2;
  border-radius: 0;
  overflow: hidden;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
}

.hero-bg-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  mix-blend-mode: overlay;
  filter: blur(10px);
  transform: scale(1.05);
}

.avatar-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--primary-bg);
  mask: radial-gradient(110% 100% at 50% 0%, #000 48%, rgba(0,0,0,0.99) 53%, rgba(0,0,0,0.96) 58%, rgba(0,0,0,0.9) 63%, rgba(0,0,0,0.8) 68%, rgba(0,0,0,0.6) 74%, rgba(0,0,0,0.3) 82%, transparent 100%);
  -webkit-mask: radial-gradient(110% 100% at 50% 0%, #000 48%, rgba(0,0,0,0.99) 53%, rgba(0,0,0,0.96) 58%, rgba(0,0,0,0.9) 63%, rgba(0,0,0,0.8) 68%, rgba(0,0,0,0.6) 74%, rgba(0,0,0,0.3) 82%, transparent 100%);
  margin-bottom: 0;
  transition: var(--transition);
  animation: fadeIn 1s ease-in;
}

.avatar-hero.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-content-wrapper {
  position: relative;
  z-index: 5;
  margin-top: -20px;
  background: transparent;
  border-radius: 32px 32px 0 0;
  padding: 0 14px 20px;
}

.links-card-bg {
  background: var(--card-bg);
  border-radius: 32px 32px 24px 24px;
  padding: 24px 14px 28px;
  box-shadow: 0 12px 28px var(--shadow);
  animation: slideUp 0.8s ease-out;
}

.profile-title {
  text-align: center;
  margin-bottom: 4px;
}

.profile-title h1 {
  font-family: 'Roboto Serif', serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.profile-bio {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  margin: 8px 0 12px;
  padding: 0 12px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 24px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 999px;
  transition: var(--transition);
  cursor: pointer;
}

.social-icon:hover, .social-icon:focus {
  transform: scale(1.07);
}

.social-icon i {
  font-size: 32px;
  color: var(--text-color);
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--link-bg);
  border-radius: 28px;
  margin-bottom: 14px;
  padding: 10px 12px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: none;
  border: none;
  cursor: pointer;
  min-height: 72px;
}

.link-item:hover, .link-item:focus {
  background: var(--link-hover);
  transform: translateY(-1px);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.link-thumb {
  width: 48px;
  height: 48px;
  background: #fff0e4;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.link-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-info {
  flex: 1;
}

.link-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text-color);
  word-break: break-word;
}

.link-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: #5e5e5e;
  margin-top: 2px;
}

.arrow-icon {
  color: var(--text-color);
  opacity: 0.6;
  font-size: 1rem;
  transition: var(--transition);
}

.link-item:hover .arrow-icon, .link-item:focus .arrow-icon {
  transform: translateX(4px);
  opacity: 1;
}

.promo-section {
  background: var(--promo-bg);
  border-radius: 60px;
  margin: 12px 0 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px dashed var(--promo-border);
}

.promo-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--promo-text);
}

.promo-code {
  background: var(--promo-code-bg);
  padding: 8px 18px;
  border-radius: 60px;
  color: var(--promo-code-color);
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
}

.promo-code:hover, .promo-code:focus {
  transform: scale(1.05);
}

.promo-note {
  font-size: 0.7rem;
  text-align: center;
  color: #aa7b4c;
  margin: 4px 0 12px;
}

.shop-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--footer-bg);
  border-radius: 60px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--footer-text);
  margin: 12px 0 0;
}

hr {
  margin: 20px 0 12px;
  border: none;
  height: 1px;
  background: #e2dbd2;
}

.footer-note {
  text-align: center;
  font-size: 0.7rem;
  margin-top: 24px;
  color: #3a2a1c;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-note a {
  color: #1f1a15;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.7rem;
}

header {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  position: relative;
  z-index: 20;
}

.top-btn {
  background: rgba(255,255,240,0.85);
  backdrop-filter: blur(8px);
  border-radius: 40px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color);
}

.top-btn:hover, .top-btn:focus {
  transform: scale(1.02);
}

.top-btn i {
  font-size: 0.9rem;
}

.top-btn.small {
  padding: 8px 12px;
}

.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: var(--toast-color);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  z-index: 200;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  font-family: monospace;
}

.show-toast {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  main {
    max-width: 500px;
  }
  .profile-title h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .profile-content-wrapper {
    padding: 0 12px 16px;
  }
  .links-card-bg {
    padding: 20px 12px 24px;
  }
  .link-title {
    font-size: 0.9rem;
  }
  .link-thumb {
    width: 46px;
    height: 46px;
  }
  .promo-section {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .profile-content-wrapper {
    padding: 0 10px 14px;
  }
  .links-card-bg {
    padding: 18px 10px 20px;
  }
  .link-title {
    font-size: 0.85rem;
  }
  .link-thumb {
    width: 44px;
    height: 44px;
  }
  .social-icon i {
    font-size: 28px;
  }
  .top-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}