:root {
  --bg-app: #F7F5FB;
  --bg-raised: #FFFFFF;
  --surface-lavender: #B8A6FF;
  --surface-sky: #9EC9F0;
  --surface-mint: #7DD4A8;
  --surface-peach: #FFB59E;
  --surface-pink: #F5B8D0;
  --surface-lemon: #F5D77A;
  --action-primary: #FF7A6B;
  --action-on: #FFFFFF;
  --status-archived: #C9B5FF;
  --text-strong: #2E2A3F;
  --text-muted: #6B6580;
  --border-color: #C9B5FF;
  --code-bg: #201933;
  --code-text: #C9C0E8;
  --r-card: 28px;
  --r-button: 18px;
  --r-chip: 999px;
  --r-input: 16px;
  --r-icon: 20px;
  --nav-height: 58px;

  --primary-grad: linear-gradient(135deg, var(--surface-lavender), var(--action-primary));

  --shadow-white: 8px 8px 22px rgba(140,108,255,0.16), -8px -8px 20px rgba(255,255,255,0.85), inset 3px 3px 6px rgba(255,255,255,0.7), inset -5px -5px 10px rgba(140,108,255,0.10);
  --shadow-lavender: 8px 8px 22px rgba(140,108,255,0.32), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.55), inset -5px -5px 10px rgba(140,108,255,0.28);
  --shadow-sky: 8px 8px 22px rgba(80,150,220,0.32), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.55), inset -5px -5px 10px rgba(80,150,220,0.28);
  --shadow-mint: 8px 8px 22px rgba(70,180,130,0.32), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.55), inset -5px -5px 10px rgba(70,180,130,0.28);
  --shadow-peach: 8px 8px 22px rgba(255,140,110,0.32), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.55), inset -5px -5px 10px rgba(255,140,110,0.28);
  --shadow-pink: 8px 8px 22px rgba(230,140,180,0.32), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.55), inset -5px -5px 10px rgba(230,140,180,0.28);
  --shadow-lemon: 8px 8px 22px rgba(220,180,70,0.32), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.55), inset -5px -5px 10px rgba(220,180,70,0.28);
  --shadow-coral: 8px 8px 22px rgba(230,90,75,0.35), -6px -6px 18px rgba(255,255,255,0.6), inset 3px 3px 6px rgba(255,255,255,0.5), inset -5px -5px 10px rgba(230,90,75,0.30);
  --shadow-pressed: inset 4px 4px 8px rgba(140,108,255,0.20), inset -4px -4px 8px rgba(255,255,255,0.75);
  --shadow-sm: 4px 4px 12px rgba(140,108,255,0.18), -3px -3px 10px rgba(255,255,255,0.7);
}

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

html {
  scroll-behavior: smooth;
}

button, a {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .media-container, .avatar-placeholder, .header h1, .subtitle, .social-card, .back-btn {
    opacity: 1 !important;
    transform: none !important;
  }
}

.bg-fixed-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-color: var(--bg-app);
}

body {
  background-color: transparent;
  font-family: 'Quicksand', 'Nunito', sans-serif;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
  overflow-x: hidden;
}

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

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

/* ---- Card ---- */
.media-container {
  background: var(--bg-raised);
  width: 100%;
  max-width: 520px;
  margin: auto;
  border: none;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-white);
  padding: 2rem 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.avatar-placeholder {
  width: 82px;
  height: 82px;
  margin: 0 auto 1.1rem;
  border: none;
  border-radius: 50%;
  background: var(--primary-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-coral);
  opacity: 0;
  animation: popIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

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

.header h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  color: var(--text-strong);
  overflow-wrap: break-word;
  opacity: 0;
  animation: fadeUp 0.55s ease 0.3s forwards;
}

.header h1 span {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  opacity: 0;
  animation: fadeUp 0.55s ease 0.4s forwards;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.social-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-app);
  color: var(--text-strong);
  text-decoration: none;
  border: none;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  opacity: 0;
  transform: translateY(24px);
}

.social-card.in-view {
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.social-card .info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.social-card .icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--r-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--text-strong);
  flex-shrink: 0;
}

/* Distinct on-brand-ish pastel tint per platform */
.tg .icon-wrapper { background: var(--surface-sky); box-shadow: 4px 4px 10px rgba(80,150,220,0.30), -3px -3px 8px rgba(255,255,255,0.65), inset 2px 2px 4px rgba(255,255,255,0.45); }
.ig .icon-wrapper { background: var(--surface-pink); box-shadow: 4px 4px 10px rgba(230,140,180,0.30), -3px -3px 8px rgba(255,255,255,0.65), inset 2px 2px 4px rgba(255,255,255,0.45); }
.gh .icon-wrapper { background: var(--surface-peach); box-shadow: 4px 4px 10px rgba(255,140,110,0.30), -3px -3px 8px rgba(255,255,255,0.65), inset 2px 2px 4px rgba(255,255,255,0.45); }
.tt .icon-wrapper { background: var(--surface-mint); box-shadow: 4px 4px 10px rgba(70,180,130,0.30), -3px -3px 8px rgba(255,255,255,0.65), inset 2px 2px 4px rgba(255,255,255,0.45); }
.fb .icon-wrapper { background: var(--surface-lavender); box-shadow: 4px 4px 10px rgba(140,108,255,0.30), -3px -3px 8px rgba(255,255,255,0.65), inset 2px 2px 4px rgba(255,255,255,0.45); }

.social-card .platform-name {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
}

.social-card .handle {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted);
  word-break: break-word;
}

.arrow-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.social-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lavender);
}

.social-card:hover .arrow-icon {
  transform: translateX(4px);
}

.social-card:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-pressed);
}

/* ---- Back button ---- */
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.8rem;
  width: 100%;
  padding: 14px;
  background: var(--bg-app);
  color: var(--text-strong);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  border-radius: var(--r-button);
  box-shadow: var(--shadow-lavender);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  opacity: 0;
  transform: translateY(24px);
}

.back-btn.in-view {
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.back-btn:hover {
  transform: translateY(-2px);
}

.back-btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-pressed);
}

@media (min-width: 769px) {
  body { padding: 2rem; }
  .media-container { padding: 2.6rem; border-radius: 32px; }
  .avatar-placeholder { width: 88px; height: 88px; }
  .header { margin-bottom: 2rem; }
  .header h1 { font-size: 2.3rem; }
  .subtitle { font-size: 1rem; }
  .social-links { gap: 1rem; }
  .social-card { padding: 16px 20px; }
  .social-card .icon-wrapper { width: 48px; height: 48px; }
  .social-card .platform-name { font-size: 1.05rem; }
  .back-btn { margin-top: 2rem; }
}

@media (max-width: 380px) {
  .media-container { padding: 1.5rem 1.15rem; }
  .avatar-placeholder { width: 74px; height: 74px; }
  .header h1 { font-size: 1.65rem; }
  .social-card { padding: 12px 13px; }
  .social-card .info { gap: 11px; }
  .social-card .icon-wrapper { width: 42px; height: 42px; }
}