/* =====================================================================
   Attention animations: "Buy me a coffee" button + "FREE" badge
   (pages: /software, /screen-recorder, /tibetan-design, /tibetan-design-layout)
   ===================================================================== */

/* ---- Buy me a coffee: soft pulsing glow, light sweep, wiggling cup ---- */
[data-donate] {
    position: relative; overflow: hidden; isolation: isolate;
    animation: bmc-pulse 2.6s ease-in-out infinite;
}
[data-donate]:hover { animation-play-state: paused; box-shadow: 0 16px 34px -10px rgba(255,196,57,.9); }
[data-donate]::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 38%; z-index: 1; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
    transform: skewX(-20deg);
    animation: bmc-shine 3.8s ease-in-out infinite;
}
[data-donate] svg, [data-donate] .bmc-ico {
    display: inline-block; transform-origin: 50% 90%;
    animation: bmc-cup 3.4s ease-in-out infinite;
}
@keyframes bmc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,196,57,.55), 0 10px 24px -10px rgba(255,196,57,.55); }
    50%      { box-shadow: 0 0 0 12px rgba(255,196,57,0), 0 14px 30px -8px rgba(255,196,57,.85); }
}
@keyframes bmc-shine { 0% { left: -60%; } 55%, 100% { left: 140%; } }
@keyframes bmc-cup {
    0%, 68%, 100% { transform: rotate(0); }
    74% { transform: rotate(-16deg); } 80% { transform: rotate(13deg); }
    86% { transform: rotate(-9deg); }  92% { transform: rotate(5deg); }
}

/* ---- FREE badge: breathing green glow + shimmer ---- */
.free-anim, .free-pill {
    display: inline-block; position: relative; overflow: hidden; isolation: isolate;
    animation: free-glow 2.2s ease-in-out infinite;
}
.free-anim::after, .free-pill::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
    transform: skewX(-20deg);
    animation: free-shine 2.8s ease-in-out infinite;
}
@keyframes free-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,.65); transform: scale(1); }
    50%      { box-shadow: 0 0 0 9px rgba(52,211,153,0); transform: scale(1.08); }
}
@keyframes free-shine { 0% { left: -70%; } 60%, 100% { left: 150%; } }

@media (prefers-reduced-motion: reduce) {
    [data-donate], [data-donate]::after, [data-donate] svg, [data-donate] .bmc-ico,
    .free-anim, .free-anim::after, .free-pill, .free-pill::after { animation: none !important; }
}

/* version line beside the download buttons (app pages and /software cards) */
.ver-line { margin-top: 12px; font-size: 14.5px; line-height: 1.5; font-weight: 600; color: #38425E; }
.ver-line b { font-weight: 800; color: #0B1230; }
.ver-line a { font-weight: 800; color: #0A45D6; text-decoration: underline; }
html.dark .ver-line { color: rgba(230,236,255,.88); }
html.dark .ver-line b { color: #fff; }
html.dark .ver-line a { color: #FFD98A; }
/* the /software cards sit on a dark gradient in both themes */
.sw-card .ver-line, html.dark .sw-card .ver-line { display: inline-block; margin: 10px 0 12px; padding: 6px 13px; border-radius: 16px; font-size: 13.5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25); }

/* "on this page" bar under the hero of each program's own page */
.app-subnav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 6px; overflow-x: auto; padding: 10px 16px; background: rgba(252,248,252,.94); border-block: 1px solid rgba(11,18,48,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); scrollbar-width: none; }
.app-subnav::-webkit-scrollbar { display: none; }
.app-subnav a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: #0B1230; white-space: nowrap; }
.app-subnav a:hover { background: rgba(11,18,48,.08); }
.app-subnav a:focus-visible { outline: 3px solid #0A45D6; outline-offset: -3px; }
.app-subnav .app-subnav-back { color: #6B4600; margin-right: 6px; }
html.dark .app-subnav { background: rgba(10,11,16,.92); border-color: rgba(240,204,120,.22); }
html.dark .app-subnav a { color: #EEF2FB; }
html.dark .app-subnav a:hover { background: rgba(255,255,255,.1); }
html.dark .app-subnav .app-subnav-back { color: #FFD98A; }
.app-subnav ~ section[id] { scroll-margin-top: 62px; }
#portable { scroll-margin-top: 72px; }
@media (max-width: 900px) { .app-subnav { justify-content: flex-start; } }
