/* Social Feed (social-feed.html): scuro come il gioco, oro per i Rank e le leggende, verde per la prima volta */
@font-face { font-family: 'Enchanted Land'; src: url('/static/fonts/enchanted_land/enchanted-land.otf') format('opentype'); font-display: swap; }
:root { --bg: #0b0b0b; --panel: #151515; --line: #2a2a2a; --ink: #f3efe4; --muted: #9a9a9a; --gold: #d9a520; --green: #7fcf9a; --pumpkin: #ff8a1f; --violet: #b48cff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg) radial-gradient(1200px 600px at 50% -200px, #1d1a12, transparent) no-repeat; color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100%; }
.sf { max-width: 680px; margin: 0 auto; padding: 28px 16px 48px; }
.sf__head { text-align: center; margin-bottom: 26px; }
.sf__logo img { width: min(280px, 70vw); height: auto; }
.sf__title { font-family: 'Enchanted Land', serif; font-weight: 400; font-size: 3rem; color: var(--gold); margin: 12px 0 2px; letter-spacing: .02em; }
.sf__sub { margin: 0; color: var(--muted); }
.sf__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sf-item { display: flex; gap: 14px; align-items: center; padding: 14px 2px; border-top: 1px solid var(--line); }
.sf-item:first-child { border-top: 0; }
.sf-item.is-new { animation: sf-in .6s ease-out both; }
@keyframes sf-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.sf-item__body { min-width: 0; flex: 1; }
.sf-item__text { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.sf-item__extra { margin: 3px 0 0; color: var(--gold); font-size: .9rem; }
.sf-item--first .sf-item__extra { color: var(--green); }
.sf-item__time { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.sf-badge { flex: none; position: relative; width: 52px; height: 52px; border-radius: 50%; background: #000; display: grid; place-items: center; box-shadow: 0 0 0 2px #2f2f2f; }
.sf-badge.is-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: none; }
.sf-badge--legend, .sf-badge--rank { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(217,165,32,.35); }
.sf-badge--first { box-shadow: 0 0 0 2px var(--green), 0 0 14px rgba(127,207,154,.35); }
.sf-badge--halloween { box-shadow: 0 0 0 2px var(--pumpkin), 0 0 14px rgba(255,138,31,.35); }
.sf-badge__ic { width: 62%; height: 62%; background-color: #fff; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.sf-badge--halloween .sf-badge__ic { background-color: var(--pumpkin); }
.sf-badge.is-frame { background: radial-gradient(circle, #000 52%, var(--frame) 54%, var(--frame) 66%, #000 68%); }
.sf-badge__n { /* (solo sul Rank: il numero del Rank raggiunto) */ position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--gold); color: #000; font-size: .78rem; display: grid; place-items: center; }
.sf__empty { text-align: center; color: var(--muted); padding: 30px 0; }
.sf__back { text-align: center; margin-top: 28px; }
.sf__btn { display: inline-block; padding: .7em 1.4em; border-radius: 999px; background: var(--gold); color: #000; font-weight: 700; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .sf-item.is-new { animation: none; } }
@media (max-width: 480px) { .sf__title { font-size: 2.4rem; } .sf-item { padding: 12px 2px; gap: 12px; } .sf-badge { width: 44px; height: 44px; } }

/* barra in basso fissa (torna alla lobby); la pagina lascia spazio per non coprire l'ultima riga */
.sf { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.sf-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(11,11,11,.92); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.sf-bar__btn { display: inline-flex; align-items: center; gap: 8px; padding: .7em 1.5em; border-radius: 999px; background: var(--gold); color: #000; font-weight: 700; text-decoration: none; }
.sf-bar__btn:hover { filter: brightness(1.08); }
/* titolo nuovo (Fighter… Legend): oro più acceso; benvenuto nell'arena: grigio chiaro */
.sf-badge--tier { box-shadow: 0 0 0 2px #f1c24a, 0 0 18px rgba(241,194,74,.55); }
.sf-badge--turnRecord { box-shadow: 0 0 0 2px #7fc8ff, 0 0 18px rgba(127,200,255,.5); } /* record di turni */
.sf-badge--topWeek, .sf-badge--topMonth { box-shadow: 0 0 0 2px #d9a520, 0 0 0 5px #141414, 0 0 0 6px rgba(217,165,32,.6); } /* recap: eroe più giocato */
.sf-item--topWeek .sf-item__text, .sf-item--topMonth .sf-item__text { font-weight: 700; }
.sf-badge--welcome { box-shadow: 0 0 0 2px #8a8a8a; }
/* pallino rosso sul tasto per tornare alla lobby: qualcuno cerca uno sfidante (client/lobby-alert.js) */
.sf-bar__btn { position: relative; }
.sf-bar__dot { position: absolute; top: -4px; left: -4px; width: 14px; height: 14px; border-radius: 50%; background: #ff2d3d;
  box-shadow: 0 0 0 2px #0b0b0b, 0 0 10px rgba(255,45,61,.7); animation: sf-dot 1.6s ease-in-out infinite; }
.sf-bar__dot[hidden] { display: none; }
@keyframes sf-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .sf-bar__dot { animation: none; } }
/* pagina /news: una news dopo l'altra, separate da una riga grigia (come nella lobby) */
.nw__list { display: flex; flex-direction: column; }
.news__item { padding: 18px 2px; border-top: 1px solid var(--line); }
.news__item:first-child { border-top: 0; padding-top: 4px; }
.news__date { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.news__head { margin: 4px 0 8px; font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; }
.news__text { margin: 0; font-size: 1.02rem; line-height: 1.55; color: #d9d4c7; }
/* pagine del Social Feed */
.sf__pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 0; }
.sf__pager[hidden] { display: none; }
.sf__pager .btn:disabled { opacity: .35; cursor: default; }
.sf__page { color: var(--muted); font-size: .9rem; }

/* tab della pagina (come nelle impostazioni: board-tab di style.css) */
.sf__tabs { justify-content: center; margin-bottom: 14px; }
.sf__tabs .board-tab { font-size: 1rem; font-weight: 700; letter-spacing: .04em; }
.sf__intro { margin: 0 0 8px; text-align: center; color: var(--muted); font-size: .92rem; }
.sf__left { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; color: var(--gold); font-family: 'Enchanted Land', serif; font-size: 1.7rem; line-height: 1.15; }
/* gli stemmi più rari (in cima alle Discoveries) */
.sf-rare { margin: 0 0 26px; }
.sf-rare__title { margin: 4px 0 10px; text-align: center; font-family: 'Enchanted Land', serif; font-weight: 400; font-size: 2rem; color: var(--gold); }
.sf-rare__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sf-rare__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sf-badge--rare { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(217,165,32,.35); width: 46px; height: 46px; }
.sf-rare__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-rare__name { font-size: 1rem; }
.sf-rare__who { color: var(--muted); font-size: .88rem; }
.sf-badge--announce { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(217,165,32,.35); }
.sf-badge--announce .sf-badge__ic { background-color: var(--gold); }
/* Discoveries: fumetto dello stemma (nome e frase evocativa), toccando lo stemma */
.sf-badge--tap { cursor: pointer; transition: transform .15s ease; }
.sf-badge--tap:hover { transform: scale(1.06); }
.sf-badge--tap:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sf-pop { position: absolute; z-index: 50; max-width: min(300px, calc(100vw - 16px)); padding: 10px 14px; border-radius: 12px; background: #000; color: var(--ink);
  border: 1px solid var(--gold); box-shadow: 0 10px 26px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 4px; animation: sf-pop-in .18s ease-out; }
.sf-pop__name { color: var(--gold); font-size: .95rem; }
.sf-pop__tip { font-style: italic; font-size: .92rem; line-height: 1.35; }
.sf-pop__note { color: var(--muted); font-size: .8rem; }
@keyframes sf-pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sf-pop { animation: none; } }
