/* links.mymzw.com — MyMZW's link page. Mobile first; the WebGL scene (scene.js) sits behind everything. */
@font-face {
  font-family: 'Unbounded';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('unbounded-800-latin.woff2?v=fe6d4ea7') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #07060b;
  --ink: #f4efe4;
  --muted: rgba(244, 239, 228, 0.66);
  --gold: #f5c542;
  --gold-2: #ffe08a;
  --violet: #9146ff;
  --violet-deep: #5b2bd6;
  --orange: #ff8a2a;
  --pink: #f4a7c0;
  --live: #ff4d4d;
  --card: rgba(16, 12, 26, 0.72);
  --card-2: rgba(22, 17, 36, 0.86);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --radius: 20px;
  --font-display: 'Unbounded', 'Segoe UI Black', 'Arial Black', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Inter, sans-serif;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100);
  background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { display: block; }

/* ---------- layers ---------- */
#scene, .bg, .shade { position: fixed; inset: 0; width: 100%; height: 100%; }
#scene { z-index: 0; opacity: 0; transition: opacity 1.4s ease; }
body.scene-on #scene { opacity: 1; }
/* CSS baseline so the page never looks flat before (or without) WebGL */
.bg {
  z-index: 0;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(145, 70, 255, 0.32), transparent 70%),
    radial-gradient(45% 35% at 85% 70%, rgba(255, 138, 42, 0.16), transparent 70%),
    radial-gradient(40% 35% at 10% 85%, rgba(245, 197, 66, 0.12), transparent 70%),
    radial-gradient(50% 40% at 20% 30%, rgba(91, 43, 214, 0.28), transparent 70%),
    var(--bg);
  background-size: 160% 160%;
  animation: bgdrift 26s ease-in-out infinite alternate;
}
body.scene-on .bg { animation: none; opacity: 0; transition: opacity 1.4s ease; }
.shade {
  z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 6, 11, 0.15) 0%, rgba(7, 6, 11, 0.45) 55%, rgba(7, 6, 11, 0.8) 100%);
}
@keyframes bgdrift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* ---------- column ---------- */
.col {
  position: relative; z-index: 1;
  max-width: 520px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(36px + env(safe-area-inset-bottom, 0px));
}

/* ---------- hero ---------- */
.hero { text-align: center; margin-bottom: 16px; }
.avatar {
  position: relative; display: inline-block; width: 100px; height: 100px; border-radius: 50%;
  margin-bottom: 10px; text-decoration: none; isolation: isolate;
}
.avatar img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--bg); position: relative; z-index: 1; }
.avatar .ring {
  position: absolute; inset: -4px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, var(--gold), var(--violet), var(--orange), var(--gold-2), var(--gold));
  animation: spin 7s linear infinite;
  filter: drop-shadow(0 0 18px rgba(245, 197, 66, 0.28));
}
.avatar::after {
  content: ''; position: absolute; inset: -22px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(145, 70, 255, 0.35), transparent 62%);
}
@keyframes spin { to { transform: rotate(360deg); } }
.chip {
  position: absolute; z-index: 2; right: -6px; top: -2px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 999px; background: var(--live); color: #fff;
  font: 800 11px/1 var(--font-display); letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(255, 77, 77, 0.45);
}
.chip[hidden] { display: none; }
.chip.soon { background: linear-gradient(135deg, var(--orange), #ff5e1a); box-shadow: 0 6px 18px rgba(255, 138, 42, 0.45); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
body.is-live .avatar .ring { background: conic-gradient(from 0deg, var(--live), var(--orange), #ff2d75, var(--live)); animation-duration: 2.6s; filter: drop-shadow(0 0 20px rgba(255, 77, 77, 0.5)); }

.wordmark {
  margin: 0 0 6px; font: 800 clamp(38px, 11.5vw, 56px)/1 var(--font-display); letter-spacing: -0.02em;
  display: flex; justify-content: center; gap: 0.01em;
}
.wordmark span {
  display: inline-block; padding-bottom: 0.18em; margin-bottom: -0.18em;
  background: linear-gradient(180deg, #fff6d6 0%, var(--gold) 55%, #d99a1e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 22px rgba(245, 197, 66, 0.22));
  animation: pop 0.7s var(--ease) both; animation-delay: calc(0.12s + var(--k) * 0.05s);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.92); } to { opacity: 1; transform: none; } }
.tagline { margin: 0 0 6px; font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-2); opacity: 0.9; }
.bio { margin: 0 auto; max-width: 34ch; color: var(--muted); font-size: 14px; line-height: 1.4; white-space: pre-line; }

/* ---------- countdown to the next stream (filled by app.js from the bot's schedule) ---------- */
.count { margin: 14px auto 0; }
.count[hidden] { display: none; }
.count-title { margin: 0 0 8px; font: 700 11px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2); }
.tiles { display: flex; justify-content: center; gap: 8px; }
.tile {
  --c: var(--gold); --c2: #d99a1e; --glow: rgba(245, 197, 66, 0.3);
  display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 8px 6px 6px;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(16, 12, 26, 0.7));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 24px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tile.t-d { --c: #b07cff; --c2: var(--violet); --glow: rgba(145, 70, 255, 0.35); }
.tile.t-m { --c: var(--orange); --c2: #d9480f; --glow: rgba(255, 138, 42, 0.3); }
.tile.t-s { --c: #ff6aa8; --c2: #ff2d75; --glow: rgba(255, 45, 117, 0.3); }
.tile[hidden] { display: none; }
.tile b {
  font: 800 24px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff 0%, var(--c) 55%, var(--c2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tile small { color: var(--c); opacity: 0.85; }
.tile small { margin-top: 4px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tile.tick b { animation: flip 0.35s var(--ease); }
.tile.t-s.tick b { animation: soft 0.6s ease-out; }
@keyframes soft { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes flip { from { transform: translateY(-6px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.count-when { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.soon-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), #ff5e1a); color: #fff; font: 800 14px/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(255, 138, 42, 0.45); animation: breathe 1.6s ease-in-out infinite;
}
.soon-badge[hidden] { display: none; }
.soon-badge i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 14px 38px rgba(255, 138, 42, 0.6); } }
.count.away .tiles, .count.soon .tiles { display: none; }
.count.away .count-title { color: var(--muted); }
body.is-soon .avatar .ring { background: conic-gradient(from 0deg, var(--orange), var(--gold), #ff5e1a, var(--orange)); animation-duration: 3s; filter: drop-shadow(0 0 20px rgba(255, 138, 42, 0.5)); }

/* ---------- cards ---------- */
.links { display: flex; flex-direction: column; gap: 12px; }
.card {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; overflow: hidden;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
  will-change: transform; -webkit-tap-highlight-color: transparent;
}
.card::after { /* shine sweep */
  content: ''; position: absolute; top: -40%; bottom: -40%; width: 38%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  transform: skewX(-18deg); transition: left 0s; pointer-events: none;
}
.card:active { transform: scale(0.975); }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 197, 66, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
  .card:hover::after { left: 130%; transition: left 0.75s ease; }
  .tilt { transform: perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-2px); transition: transform 0.08s linear, border-color 0.28s, box-shadow 0.28s; }
}
.ico {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px rgba(0, 0, 0, 0.3);
}
.ico svg { width: 24px; height: 24px; fill: currentColor; }
.ico-twitch { background: linear-gradient(145deg, #a970ff, #7b3fe4); }
.ico-discord { background: linear-gradient(145deg, #6d7cff, #4a56d6); }
.ico-youtube { background: linear-gradient(145deg, #ff3b3b, #c80000); }
.ico-tiktok { background: #111; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08), -2px 0 10px rgba(37, 244, 238, 0.35), 2px 0 10px rgba(254, 44, 85, 0.35); }
.ico-instagram { background: linear-gradient(45deg, #f9a53a 0%, #e6313c 45%, #b532c4 80%, #5b51d8 100%); }
.ico-gift { background: linear-gradient(145deg, var(--gold-2), #d99a1e); color: #2a1a00; }
.ico-streamlabs { background: linear-gradient(145deg, #4ad6a6, #1f9e78); }
.ico-star { background: linear-gradient(145deg, var(--pink), #e86aa0); color: #3a0a22; }
.ico-trophy { background: linear-gradient(145deg, #ffd166, var(--orange)); color: #3a1a00; }
.txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.label { font-weight: 700; font-size: 16px; line-height: 1.2; }
.sub { font-size: 13px; color: var(--muted); line-height: 1.3; }
.arrow { flex: 0 0 auto; width: 22px; height: 22px; color: var(--muted); transition: transform 0.28s var(--ease), color 0.28s; }
.arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .arrow { transform: translateX(3px); color: var(--gold-2); }

/* primary (Twitch) card: animated halo border */
.halo { position: relative; border-radius: calc(var(--radius) + 2px); padding: 2px; overflow: hidden; isolation: isolate; }
.halo::before {
  content: ''; position: absolute; z-index: -1; inset: -60%;
  background: conic-gradient(from 0deg, var(--violet), var(--gold), var(--orange), var(--violet-deep), var(--violet));
  animation: spin 5s linear infinite;
}
.halo::after { content: ''; position: absolute; z-index: -1; inset: 2px; border-radius: var(--radius); background: var(--card-2); }
.card.primary {
  min-height: 84px; padding: 18px 16px; border: 0; background: linear-gradient(135deg, rgba(145, 70, 255, 0.28), rgba(91, 43, 214, 0.12) 60%, rgba(245, 197, 66, 0.08));
  box-shadow: 0 16px 40px rgba(91, 43, 214, 0.35);
}
.card.primary .label { font: 800 17px/1.2 var(--font-display); letter-spacing: -0.01em; }
.card.primary .ico { width: 52px; height: 52px; flex-basis: 52px; }
.card.primary .ico svg { width: 28px; height: 28px; }
body.is-live .halo::before { background: conic-gradient(from 0deg, var(--live), var(--orange), #ff2d75, var(--live)); animation-duration: 2.2s; }
body.is-live .card.primary { background: linear-gradient(135deg, rgba(255, 77, 77, 0.3), rgba(255, 138, 42, 0.12)); box-shadow: 0 16px 44px rgba(255, 77, 77, 0.35); }
body.is-live .card.primary .ico { background: linear-gradient(145deg, var(--live), #c81e1e); }
body.is-soon .halo::before { background: conic-gradient(from 0deg, var(--orange), var(--gold), #ff5e1a, var(--orange)); animation-duration: 2.6s; }
body.is-soon .card.primary { background: linear-gradient(135deg, rgba(255, 138, 42, 0.28), rgba(245, 197, 66, 0.1)); box-shadow: 0 16px 44px rgba(255, 138, 42, 0.3); }
body.is-soon .card.primary .ico { background: linear-gradient(145deg, var(--orange), #d9480f); }
body.is-live .card.primary .label::before {
  content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--live); margin: 0 8px 1px 0;
  box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6); animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); } }

.card.featured { border-color: rgba(245, 197, 66, 0.35); background: linear-gradient(135deg, rgba(245, 197, 66, 0.14), var(--card)); }

.section {
  margin: 14px 0 0; font: 700 11px/1 var(--font-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.section::before, .section::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.grid { display: grid; gap: 12px; }
@media (min-width: 430px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .card { min-height: 64px; }
  .grid .arrow { display: none; }
}

/* ---------- footer ---------- */
.foot { margin-top: 30px; text-align: center; }
.bot {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 auto 14px; padding: 7px 14px 7px 7px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 12, 26, 0.55); color: var(--muted);
  font: 500 13px/1.3 var(--font-body); text-align: left; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform 0.25s var(--ease), border-color 0.25s;
}
.bot { max-width: calc(100% - 72px); position: relative; overflow: visible; margin: 44px 36px 14px; }
.bot-txt { flex: 1; min-width: 0; }
.bot b { color: var(--pink); font-weight: 700; }
.bot img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.cta { position: absolute; left: 3px; top: 3px; transform: translate(-50%, -50%) rotate(-45deg); pointer-events: none; }
.cta-in {
  position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--orange)); color: #1a0f05; font: 800 10px/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(245, 197, 66, 0.4); animation: nudge 2.4s ease-in-out infinite;
}
.cta-in svg { width: 12px; height: 12px; fill: currentColor; }
.cta-in::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7), transparent); transform: skewX(-20deg); animation: sheen 2.4s ease-in-out infinite;
}
@keyframes nudge { 0%, 70%, 100% { transform: none; } 78% { transform: scale(1.08); } 86% { transform: scale(1.04); } }
@keyframes sheen { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
@media (hover: hover) { .bot:hover .cta-in { filter: brightness(1.08); } }
.bot.oink .cta-in { animation: none; transform: scale(0.9); }
.bot:active { transform: scale(0.96); }
@media (hover: hover) { .bot:hover { border-color: var(--pink); transform: translateY(-1px); } }
.bot.oink img { animation: wiggle 0.5s ease; }
@keyframes wiggle { 25% { transform: rotate(-14deg) scale(1.15); } 75% { transform: rotate(12deg) scale(1.1); } }
.fine { margin: 0; font-size: 12px; color: var(--muted); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.fine a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.fine a:hover { color: var(--gold-2); border-color: var(--gold-2); }

/* ---------- entrance ---------- */
.reveal { animation: rise 0.7s var(--ease) both; animation-delay: calc(0.05s + var(--i, 0) * 0.07s); }
@keyframes rise { from { opacity: 0.001; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal.halo { animation-name: rise-halo; }
@keyframes rise-halo { from { opacity: 0.001; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ---------- burst (carrots thrown on tap) ---------- */
#burst { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
#burst svg { position: absolute; width: 26px; height: 26px; left: var(--x); top: var(--y); margin: -13px 0 0 -13px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }

/* ---------- toast (carrot tally) ---------- */
#toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 6; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 12, 26, 0.85); color: var(--ink);
  font: 600 13px/1.2 var(--font-body); white-space: nowrap; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- bigger screens ---------- */
@media (min-width: 720px) {
  .col { max-width: 560px; padding-top: 56px; }
  .hero { margin-bottom: 24px; }
  .avatar, .avatar img { width: 132px; height: 132px; }
  .avatar { margin-bottom: 16px; }
  .tagline { font-size: 13px; letter-spacing: 0.14em; }
  .bio { font-size: 16px; max-width: 40ch; }
  .tile { min-width: 68px; padding: 10px 8px 8px; }
  .tile b { font-size: 30px; }
  .count-when { font-size: 14px; }
  .wordmark { font-size: 68px; }
  .card { padding: 16px 18px; }
  .card.primary { min-height: 92px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.fx) *, html:not(.fx) *::before, html:not(.fx) *::after { animation: none !important; transition: none !important; }
  html:not(.fx) .reveal, html:not(.fx) .wordmark span { opacity: 1; transform: none; }
  html:not(.fx) .card::after { display: none; }
}
