/* Smooth press effect: quick squeeze when touched, soft spring back on release */
a, button, [role="button"], summary, input[type="button"], input[type="submit"], .qr-copy, .chat-item, .del-btn, .guest-tag, .lock-box button, .reply-bar button, .to-top {
  transition: transform .26s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease, filter .2s ease, opacity .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
a:active, button:active, [role="button"]:active, summary:active, input[type="button"]:active, input[type="submit"]:active, .qr-copy:active, .chat-item:active, .del-btn:active, .guest-tag:active, .lock-box button:active, .reply-bar button:active, .to-top:active { transform: scale(.94); transition: transform .08s ease-out, box-shadow .08s ease-out; }
button:active, [role="button"]:active, .qr-copy:active, .hero a:active, .del-btn:active { box-shadow: 0 0 24px rgba(40,140,255,.6); }
button:disabled:active { transform: none; box-shadow: none; }
.social-card { transition: transform .26s cubic-bezier(.34,1.56,.64,1), border-color .25s ease, background .25s ease, box-shadow .28s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.social-card:active { transform: scale(.95); box-shadow: 0 0 28px rgba(40,140,255,.55); transition: transform .08s ease-out, box-shadow .08s ease-out; }
/* Liquid glass shine also fires on touch (phones have no hover) */
.social-card:active:after { transform: translateX(120%); }
/* Profile photo: soft pulsing blue glow ring */
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(255,255,255,.055), 0 0 28px rgba(35,117,255,.45); }
  50% { box-shadow: 0 0 0 10px rgba(255,255,255,.08), 0 0 56px rgba(52,215,242,.8); }
}
.avatar-wrap { animation: ringPulse 3.6s ease-in-out infinite; }
/* Reveal on scroll (only active when reveal.js has started) */
html.rv-on .section { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
html.rv-on .section.rv-show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .avatar-wrap { animation: none; }
  html.rv-on .section { opacity: 1; transform: none; transition: none; }
}

/* Moving stars + blue glow (pure CSS, no JavaScript) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(40,130,255,.30), transparent 46%),
    radial-gradient(circle at 90% 88%, rgba(52,215,242,.22), transparent 44%);
  animation: glowPulse 8s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; left: 0; top: 0; width: 100%; height: calc(100% + 500px);
  z-index: -1; pointer-events: none; will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22250%22 height=%22250%22%3E%3Ccircle cx=%2286%22 cy=%22246%22 r=%220.7%22 fill=%22%23ffffff%22 fill-opacity=%220.54%22/%3E%3Ccircle cx=%22141%22 cy=%2228%22 r=%220.8%22 fill=%22%23ffffff%22 fill-opacity=%220.95%22/%3E%3Ccircle cx=%2258%22 cy=%2213%22 r=%220.6%22 fill=%22%23cfe4ff%22 fill-opacity=%220.53%22/%3E%3Ccircle cx=%2227%22 cy=%22145%22 r=%220.8%22 fill=%22%23ffffff%22 fill-opacity=%220.97%22/%3E%3Ccircle cx=%22165%22 cy=%22164%22 r=%220.9%22 fill=%22%23ffffff%22 fill-opacity=%220.79%22/%3E%3Ccircle cx=%22105%22 cy=%2216%22 r=%221.1%22 fill=%22%23ffffff%22 fill-opacity=%220.78%22/%3E%3Ccircle cx=%2238%22 cy=%2278%22 r=%220.8%22 fill=%22%23ffffff%22 fill-opacity=%220.79%22/%3E%3Ccircle cx=%22147%22 cy=%22212%22 r=%220.9%22 fill=%22%23ffffff%22 fill-opacity=%220.79%22/%3E%3Ccircle cx=%22167%22 cy=%2252%22 r=%220.8%22 fill=%22%23ffffff%22 fill-opacity=%220.78%22/%3E%3Ccircle cx=%22162%22 cy=%2256%22 r=%220.8%22 fill=%22%23cfe4ff%22 fill-opacity=%220.89%22/%3E%3Ccircle cx=%22123%22 cy=%22153%22 r=%221.1%22 fill=%22%23cfe4ff%22 fill-opacity=%220.65%22/%3E%3Ccircle cx=%22207%22 cy=%2250%22 r=%220.9%22 fill=%22%23ffffff%22 fill-opacity=%220.54%22/%3E%3Ccircle cx=%2280%22 cy=%22138%22 r=%220.8%22 fill=%22%23cfe4ff%22 fill-opacity=%220.86%22/%3E%3Ccircle cx=%2277%22 cy=%22159%22 r=%221.1%22 fill=%22%23ffffff%22 fill-opacity=%220.76%22/%3E%3Ccircle cx=%2246%22 cy=%22197%22 r=%220.8%22 fill=%22%23cfe4ff%22 fill-opacity=%220.71%22/%3E%3Ccircle cx=%22175%22 cy=%2223%22 r=%221.0%22 fill=%22%23cfe4ff%22 fill-opacity=%220.67%22/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22500%22 height=%22500%22%3E%3Ccircle cx=%22183%22 cy=%22308%22 r=%221.4%22 fill=%22%239fd0ff%22 fill-opacity=%220.53%22/%3E%3Ccircle cx=%2251%22 cy=%22487%22 r=%221.3%22 fill=%22%237fe3ff%22 fill-opacity=%220.83%22/%3E%3Ccircle cx=%2235%22 cy=%22378%22 r=%221.5%22 fill=%22%237fe3ff%22 fill-opacity=%220.79%22/%3E%3Ccircle cx=%22352%22 cy=%22424%22 r=%221.4%22 fill=%22%237fe3ff%22 fill-opacity=%220.69%22/%3E%3Ccircle cx=%22346%22 cy=%22181%22 r=%221.1%22 fill=%22%239fd0ff%22 fill-opacity=%220.68%22/%3E%3Ccircle cx=%22316%22 cy=%2263%22 r=%221.4%22 fill=%22%23ffffff%22 fill-opacity=%220.88%22/%3E%3Ccircle cx=%2270%22 cy=%22382%22 r=%221.2%22 fill=%22%239fd0ff%22 fill-opacity=%220.96%22/%3E%3Ccircle cx=%22258%22 cy=%2245%22 r=%221.2%22 fill=%22%239fd0ff%22 fill-opacity=%220.77%22/%3E%3Ccircle cx=%22456%22 cy=%2274%22 r=%221.6%22 fill=%22%237fe3ff%22 fill-opacity=%220.64%22/%3E%3Ccircle cx=%22216%22 cy=%22187%22 r=%221.5%22 fill=%22%239fd0ff%22 fill-opacity=%220.98%22/%3E%3Ccircle cx=%2281%22 cy=%2246%22 r=%221.2%22 fill=%22%23ffffff%22 fill-opacity=%220.83%22/%3E%3Ccircle cx=%2210%22 cy=%22252%22 r=%221.6%22 fill=%22%23ffffff%22 fill-opacity=%220.63%22/%3E%3C/svg%3E");
  background-size: 250px 250px, 500px 500px;
  animation: starDrift 110s linear infinite, starTwinkle 5s ease-in-out infinite alternate;
}
@keyframes starDrift { to { transform: translateY(-500px); } }
@keyframes starTwinkle { from { opacity: .55; } to { opacity: 1; } }
@keyframes glowPulse { from { opacity: .65; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

/* Lamp + edge light */
#lamp-btn, #star-btn { position: fixed; bottom: 18px; z-index: 45; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; padding: 0; cursor: pointer; color: #cfe4ff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 24px rgba(0,0,0,.35); }
#lamp-btn { left: 16px; } #star-btn { left: 72px; font-size: 20px; }
#lamp-btn .bulb { fill: rgba(255,255,255,.12); stroke: #cfe4ff; stroke-width: 1.6; transition: fill .4s ease, filter .4s ease; }
#lamp-btn .cap { fill: #7f97c4; }
html.lamp-on #lamp-btn { border-color: rgba(124,238,255,.8); box-shadow: 0 0 26px rgba(57,213,239,.75), inset 0 1px 0 rgba(255,255,255,.4); }
html.lamp-on #lamp-btn .bulb { fill: #aeeeff; stroke: #fff; filter: drop-shadow(0 0 7px #39d5ef); }
#edge-light { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  box-shadow: inset 0 0 60px 4px rgba(57,213,239,.5), inset 0 0 170px 14px rgba(30,120,255,.3);
  background: radial-gradient(ellipse at 50% 0%, rgba(124,238,255,.12), transparent 55%); }
html.lamp-on #edge-light { opacity: 1; animation: edgePulse 4.5s ease-in-out infinite alternate; }
@keyframes edgePulse { from { filter: brightness(.8); } to { filter: brightness(1.25); } }
/* Floating stars + sparkle trail */
.float-star { position: fixed; z-index: 60; pointer-events: none; color: #9fe9ff; text-shadow: 0 0 10px #39d5ef, 0 0 18px #1677ff; opacity: 0; transform: translate(-50%, 0); animation: floatStar 1.4s ease-out forwards; }
@keyframes floatStar { 0% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -170px) scale(1.2) rotate(50deg); } }
.spark { position: fixed; z-index: 60; pointer-events: none; width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%; background: radial-gradient(circle, #fff, #39d5ef 55%, transparent 72%); box-shadow: 0 0 10px #39d5ef; animation: sparkFade .7s ease-out forwards; }
@keyframes sparkFade { to { opacity: 0; transform: translate(var(--dx), 22px) scale(.2); } }
@media (prefers-reduced-motion: reduce) { html.lamp-on #edge-light { animation: none; } }
