/* Carta streamer "Carte nella notte": vetrina, homepage e /da/<canale> */
.tc { --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --rz: 0deg;
  position: relative; aspect-ratio: 5 / 7; border-radius: 16px; padding: 3px; background: rgba(255,255,255,.12);
  transform: perspective(800px) rotate(var(--rz)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease, box-shadow .25s ease; }
.tc-in { position: relative; height: 100%; border-radius: 13px; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(180deg, #1d1543, #140d30); }
.tc-link { position: absolute; inset: 0; z-index: 4; border-radius: 16px; }
.tc-link:focus-visible { outline-offset: 3px; }

/* rarità */
.r-diamante { background: var(--tn-holo); }
.r-oro { background: linear-gradient(135deg, #f7d26a, #b8862b 45%, #fff1c2 60%, #b8862b); }
.r-argento { background: linear-gradient(135deg, #e6e9f0, #8e97aa 45%, #ffffff 60%, #8e97aa); }
.r-bronzo { background: linear-gradient(135deg, #e3a76f, #7c4720 45%, #f6cfa6 60%, #7c4720); }
.r-comune { background: rgba(255,255,255,.12); }
.r-diamante .tc-rarity { color: #c9b4ff; } .r-oro .tc-rarity { color: #f7d26a; }
.r-argento .tc-rarity { color: #dfe4ee; } .r-bronzo .tc-rarity { color: #e3a76f; } .r-comune .tc-rarity { color: #9d93c9; }

/* illustrazione */
.tc-art { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #241a52; }
.tc-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20,13,48,.92)); pointer-events: none; }
.tc-art-media, .tc-art-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-embed { position: absolute; inset: 0; z-index: 6; }
.tc-embed iframe { width: 100%; height: 100%; }
.tc-play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 5; border: 0; border-radius: 999px; padding: .4rem 1rem; font-weight: 800; font-size: .85rem; color: #fff;
  background: rgba(145,70,255,.9); box-shadow: 0 6px 20px rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; }
.tc:hover .tc-play, .tc-play:focus-visible { opacity: 1; }
@media (hover: none) { .tc-play { opacity: 1; } }
.tc-live { position: absolute; top: 9px; left: 9px; z-index: 3; background: var(--tn-live); color: #fff; font-size: .66rem; font-weight: 800; padding: 3px 7px; border-radius: 6px; box-shadow: 0 0 14px rgba(255,59,92,.7); }
.tc-rarity { position: absolute; top: 9px; right: 9px; z-index: 3; display: flex; align-items: center; gap: 5px; font-size: .64rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(14,9,32,.72); backdrop-filter: blur(4px); }
.tc-gem { width: 7px; height: 7px; transform: rotate(45deg); border-radius: 1px; background: currentColor; }
.tc-heart { position: absolute; top: 36px; right: 11px; z-index: 3; color: #ff7a9a; font-size: .8rem; }
.tc-num { position: absolute; left: 10px; bottom: 8px; z-index: 3; font-family: var(--tn-head); font-weight: 800; font-size: .82rem; color: rgba(255,255,255,.85); }
.tc-stamp { position: absolute; right: 10px; bottom: 8px; z-index: 3; width: 24px; height: 24px; border-radius: 50%; background: var(--tn-holo); display: grid; place-items: center; font-size: .55rem; font-weight: 800; color: #2a1460; box-shadow: 0 0 10px rgba(255,255,255,.35); }

/* testo */
.tc-info { padding: .6rem .75rem .65rem; }
.tc-name { display: flex; align-items: center; gap: 4px; font-family: var(--tn-head); font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; color: #fff; min-width: 0; }
.tc-name .badge-icon { width: 14px; height: 14px; font-size: 7px; flex-shrink: 0; }
.tc-meta { font-size: .76rem; color: var(--tn-muted); margin-top: 1px; }
.tc-tags { display: flex; gap: 4px; margin-top: .4rem; flex-wrap: wrap; max-height: 1.35rem; overflow: hidden; }
.tc-tags span { font-size: .64rem; font-weight: 700; border-radius: 6px; padding: 2px 6px; background: rgba(255,255,255,0.07); color: #d9cdff; }
.tc-stats { display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: center; margin-top: .5rem; padding-top: .45rem; border-top: 1px dashed rgba(255,255,255,.12); font-size: .66rem; color: var(--tn-muted); }
.tc-stats b { display: block; color: #fff; font-size: .8rem; font-family: var(--tn-head); }
.tc-twitch { position: relative; z-index: 5; color: var(--tn-muted); font-size: 1rem; padding: 2px 4px; }
.tc-twitch:hover { color: #fff; }

/* riflesso e luce */
.tc-foil { position: absolute; inset: 3px; border-radius: 13px; pointer-events: none; z-index: 3; mix-blend-mode: color-dodge; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.55), transparent 40%), var(--tn-holo); background-blend-mode: overlay; }
.r-diamante .tc-foil { opacity: .2; } .r-oro .tc-foil { opacity: .1; }
.tc.is-live { box-shadow: 0 18px 60px -12px rgba(173,140,255,.6), 0 0 0 1px rgba(255,59,92,.25); }
@media (hover: hover) and (pointer: fine) {
  .tc:hover { transition: transform .06s linear, box-shadow .25s; box-shadow: 0 24px 50px rgba(0,0,0,.5); }
  .tc:hover .tc-foil { opacity: .5; }
}
@media (prefers-reduced-motion: reduce) { .tc { transform: rotate(var(--rz)) !important; transition: none; } .tc-foil { transition: none; } }

/* griglie */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
@media (max-width: 575.98px) { .tc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } .tc-info { padding: .5rem .55rem; } .tc-name { font-size: .9rem; } }
.tc.is-playing { transform: none !important; }
.tc.is-playing .tc-link { display: none; }

/* Collezione: carta da scoprire, distintivo dello streamer, retro */
.r-scoperta { background: rgba(255,255,255,.08); }
.r-scoperta .tc-art-media { filter: grayscale(1) brightness(.55); }
.r-scoperta .tc-rarity { color: #8a83a8; }
.r-scoperta .tc-foil { display: none; }
.tc-vip { position: absolute; top: 34px; right: 9px; z-index: 3; font-size: .6rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: rgba(14,9,32,.72); color: var(--tn-muted); }
.tc-flip { position: relative; z-index: 4; border: 0; background: none; color: var(--tn-muted); padding: 0 .25rem; }
.tc-flip:hover { color: #fff; }
.tc-back { position: absolute; inset: 3px; z-index: 5; border-radius: 13px; padding: 1.1rem; display: flex; flex-direction: column; justify-content: center; gap: .45rem; text-align: center;
  background: linear-gradient(180deg, #241a52, #140d30); opacity: 0; visibility: hidden; transform: rotateY(90deg); transition: transform .35s, opacity .2s, visibility 0s .35s; }
.tc.is-flipped .tc-back { opacity: 1; visibility: visible; transform: none; transition: transform .35s, opacity .2s; }
.tc-back-title { font-family: var(--tn-head); font-weight: 800; font-size: 1.1rem; }
.tc-back-tier { font-weight: 800; color: var(--tn-primary-2); }
.tc-back-row { font-size: .85rem; } .tc-back-muted { color: var(--tn-muted); font-size: .75rem; }
.tc-back-close { position: absolute; top: 8px; right: 8px; }
@media (prefers-reduced-motion: reduce) { .tc-back, .tc.is-flipped .tc-back { transform: none; transition: none; } }
@media (min-width: 576px) { .tc-grid-3 { grid-template-columns: repeat(auto-fill, minmax(180px, 220px)); } }
