/* MSP Glam — landing page. Vivid candy-gradient glass, centered. */
:root {
  --bg: #c2189a;
  --surface: rgba(255, 255, 255, .16);
  --surface-hover: rgba(255, 255, 255, .28);
  --line: rgba(255, 255, 255, .38);
  --text: #ffffff;
  --muted: #ffe3f4;
  --pink: #ffd23f;          /* accent (sunny gold) — name kept so the admin panel keys still work */
  --pink-hover: #ffc414;
  --pink-ink: #c4136f;
  --menu: #4a1590;
  --font: "Outfit", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --g1: #ff2d8a; --g2: #d11fc0; --g3: #6a36ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }
img { display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- animated background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(150deg, var(--g1) 0%, var(--g2) 48%, var(--g3) 100%); background-size: 160% 160%; animation: gradMove 16s ease-in-out infinite alternate; }
@keyframes gradMove { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.b1 { width: 42vmax; height: 42vmax; left: -12vmax; top: -14vmax; background: #ffd23f; opacity: .38; animation: drift1 22s ease-in-out infinite alternate; }
.b2 { width: 40vmax; height: 40vmax; right: -14vmax; top: 18vh; background: #19d3ff; opacity: .34; animation: drift2 26s ease-in-out infinite alternate; }
.b3 { width: 36vmax; height: 36vmax; left: 22vw; bottom: -20vmax; background: #ff7ac8; opacity: .55; animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, 12vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(14vw, -14vh) scale(1.2); } }
.grid-fx { position: absolute; inset: 0; opacity: .55;
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 10%, transparent 68%); mask-image: radial-gradient(ellipse at 50% 35%, #000 10%, transparent 68%); }
.sp { position: absolute; fill: #fff; opacity: 0; filter: drop-shadow(0 0 7px rgba(255,235,150,1)); animation: floatUp linear infinite, twinkle ease-in-out infinite; }
@keyframes floatUp { from { transform: translateY(30px) rotate(0deg); } to { transform: translateY(-80px) rotate(45deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0; } 50% { opacity: .95; } }

.topbar, .hero, .site-footer { position: relative; z-index: 2; }
.topbar { z-index: 5; }

/* ---------- language switch ---------- */
.topbar { display: flex; justify-content: flex-end; padding: 16px 20px 0; padding-top: max(16px, env(safe-area-inset-top)); animation: dropIn .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.lang-switch { position: relative; z-index: 120; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer;
  font: 600 14.5px/1 var(--font); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color .2s, transform .2s, border-color .2s;
}
.lang-btn:hover { background: var(--surface-hover); border-color: rgba(255,255,255,.7); transform: translateY(-1px); }
.lang-btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.lang-btn .chev { font-size: 11px; opacity: .9; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; max-height: min(62vh, 440px); overflow-y: auto;
  list-style: none; padding: 6px; background: var(--menu); border: 1px solid rgba(255,255,255,.2); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(40, 0, 80, .55); animation: menuIn .18s ease-out; transform-origin: top right;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.lang-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; text-align: left; font: 500 15px/1.2 var(--font); }
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.lang-menu button[aria-selected="true"] { font-weight: 700; color: var(--pink); }

/* ---------- centered hero ---------- */
.hero { flex: 1 0 auto; width: 100%; max-width: 480px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; align-items: center; text-align: center; }

.mark-wrap { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.mark { position: relative; z-index: 2; width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(90,0,80,.45)) drop-shadow(0 0 20px rgba(255,220,100,.7));
  animation: pop 1s cubic-bezier(.2,1.3,.4,1) both, bob 5s ease-in-out 1s infinite; }
@keyframes pop { from { opacity: 0; scale: .3; rotate: -30deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -8px; rotate: 5deg; } }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.65); animation: ripple 3.6s ease-out infinite; }
.r2 { animation-delay: 1.8s; }
@keyframes ripple { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }

.brand { margin-top: 16px; font: 800 clamp(46px, 10.5vw, 68px) / 1 var(--font); letter-spacing: -.03em; filter: drop-shadow(0 6px 18px rgba(90, 0, 90, .35)); animation: rise .8s .15s cubic-bezier(.2,.8,.2,1) both; }
.brand .accent {
  background: linear-gradient(100deg, #ffd23f 10%, #fff6b8 40%, #ffd23f 70%, #ffb300 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 4.5s linear infinite;
}
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: -220% 0; } }
.tagline { margin-top: 12px; font: 500 18px/1.5 var(--font); color: var(--muted); letter-spacing: .01em; animation: rise .8s .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.actions { width: 100%; margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.act {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  min-height: 70px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  color: var(--text); text-decoration: none; text-align: left; -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(80, 0, 90, .18);
  opacity: 0; animation: rise .7s cubic-bezier(.2,.8,.2,1) forwards;
  transition: transform .25s ease, background-color .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.act:nth-child(1) { animation-delay: .42s; } .act:nth-child(2) { animation-delay: .54s; } .act:nth-child(3) { animation-delay: .66s; }
.act::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.act:hover { transform: translateY(-3px); background: var(--surface-hover); border-color: rgba(255,255,255,.8); box-shadow: 0 18px 38px rgba(70, 0, 90, .3); }
.act:hover::after { left: 125%; }
.act:active { transform: translateY(0); }
.act:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.act .ic { width: 28px; height: 28px; flex: none; fill: currentColor; transition: transform .3s ease; }
.act:hover .ic { transform: scale(1.15) rotate(-6deg); }
.act-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.act-title { font: 700 17px/1.2 var(--font); }
.act-sub { font: 400 13.5px/1.3 var(--font); color: var(--muted); }
.rec { flex: none; padding: 5px 10px; font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--pink-ink); background: #fff; border-radius: 999px; }

.act.is-primary {
  background: #fff; border-color: #fff; color: #3a0a52;
  animation: rise .7s .42s cubic-bezier(.2,.8,.2,1) forwards, glow 2.8s 1.3s ease-in-out infinite;
}
.act.is-primary .act-title { color: #b10f66; }
.act.is-primary .act-sub { color: #7a4a8c; }
.act.is-primary .rec { color: #fff; background: linear-gradient(135deg, #ff2d8a, #d11fc0); }
.act.is-primary:hover { background: #fff8fd; }
@keyframes glow { 0%, 100% { box-shadow: 0 14px 36px rgba(60,0,100,.35), 0 0 0 0 rgba(255,255,255,.65); } 50% { box-shadow: 0 14px 36px rgba(60,0,100,.35), 0 0 0 11px rgba(255,255,255,0); } }

.ic-win { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 9%; padding: 1px; width: 28px; height: 28px; }
.ic-win i { background: currentColor; border-radius: 1px; }

.discord { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; font: 600 15px/1.2 var(--font); color: var(--muted); text-decoration: none; border-radius: 12px; transition: color .2s, transform .2s; animation: rise .7s .8s cubic-bezier(.2,.8,.2,1) both; }
.discord svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.discord:hover { color: #fff; transform: translateY(-2px); }
.discord:hover span { text-decoration: underline; text-underline-offset: 4px; }
.discord:focus-visible { outline: 3px solid var(--text); }

/* ---------- footer ---------- */
.site-footer { flex: none; padding: 18px 16px 22px; padding-bottom: max(22px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.22); text-align: center; font: 500 13.5px/1.8 var(--font); color: var(--muted); background: rgba(70, 0, 110, .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: rise .8s 1s ease both; }
.site-footer .sep { opacity: .6; margin: 0 7px; }
.site-footer .legal a { color: #fff; text-decoration: none; white-space: nowrap; transition: color .2s; }
.site-footer .legal a:hover { color: var(--pink); }
.site-footer .fine { font-size: 12.5px; opacity: .9; }

/* ---------- notice popup ---------- */
.notice-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(50, 5, 80, .62); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); animation: fadeIn .25s ease-out; }
.notice-card { width: min(540px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 30px 80px rgba(40,0,80,.55); animation: cardIn .4s cubic-bezier(.2,.9,.3,1.1); }
@supports (height: 100dvh) { .notice-card { max-height: calc(100dvh - 32px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.notice-head { flex: none; padding: 26px 24px 4px; text-align: center; }
.notice-kicker { display: inline-block; font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--pink-ink); }
.notice-card h2 { margin-top: 8px; font: 800 clamp(22px, 5vw, 27px) / 1.2 var(--font); color: #3a0a52; }
#fanNoticeText { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px; color: #4a2c5c; }
.notice-card p { margin: 12px 0 0; font: 400 15px/1.6 var(--font); }
.notice-card strong { font-weight: 700; color: #3a0a52; }
.notice-card a { color: var(--pink-ink); font-weight: 700; text-underline-offset: 3px; }
.notice-fine { font-size: 12.5px !important; line-height: 1.5 !important; color: #86708f; }
.notice-contact { padding-top: 12px; border-top: 1px solid #f0d9ee; }
.notice-foot { flex: none; display: flex; justify-content: center; padding: 18px 24px 22px; }
.notice-close { min-width: 200px; height: 50px; padding: 0 24px; border: 0; border-radius: 16px; background: linear-gradient(135deg, #ff2d8a, #d11fc0 60%, #8a3cff); color: #fff; cursor: pointer; font: 700 16px/1 var(--font); transition: transform .2s, box-shadow .2s; }
.notice-close:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(209,31,192,.5); }
.notice-close:focus-visible { outline: 3px solid #3a0a52; outline-offset: 3px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 520px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 12px; }
  .mark-wrap { width: 96px; height: 96px; } .mark { width: 70px; height: 70px; }
  .tagline { font-size: 16.5px; }
  .actions { margin-top: 26px; }
  .act { padding: 12px 14px; gap: 12px; }
  .site-footer { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg, .blob, .sp, .mark, .ring, .brand, .brand .accent, .tagline, .discord, .topbar, .site-footer, .act.is-primary, .lang-menu, .notice-overlay, .notice-card { animation: none !important; }
  .act { opacity: 1; animation: none !important; }
  .brand .accent { background: none; -webkit-text-fill-color: var(--pink); color: var(--pink); }
}
