/* ═══════════════════════════════════════════════════════════════════
   TOKEN CLASH — shared UI DNA (tc-ui)
   Cyber-arena design system reused across all screens:
   navy + hex, gold→cyan brand split, gunmetal notched panels,
   Space Grotesk + JetBrains Mono numbers, hex-frame line icons.
   SVG icons reference the global gradients (#tcGold / #tcCyanPurple)
   defined once in index.html.
   ═══════════════════════════════════════════════════════════════════ */

.tc-page { max-width: 1080px; margin: 0 auto; padding: 22px 18px 64px; }
.tc-brandgrad {
    background: linear-gradient(96deg, #FFC95C 0%, #FFE6A6 35%, #9CEBFF 70%, #46E0FF 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tc-mono { font-family: 'JetBrains Mono', monospace; font-weight: 800; }

/* ── page header: back + gradient title + status ── */
.tc-crumbs { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.tc-crumbs .tc-left { display: flex; align-items: center; gap: 14px; }
.tc-back {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    color: #8595b0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px;
    padding: 8px 13px; border: 1px solid rgba(120,160,210,.16); border-radius: 10px; background: rgba(13,19,32,.5);
}
.tc-back:hover { color: #cfe0f5; border-color: rgba(120,160,210,.34); }
.tc-title { display: flex; align-items: center; gap: 11px; }
.tc-title h1 { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: 3px; margin: 0; }
.tc-title .tc-ico { width: 28px; height: 28px; flex-shrink: 0; }
/* rendered menu-icon art in a screen header (framed app-icon look) */
.tc-title-art { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
    background: linear-gradient(#0a0f1c, #0a0f1c) padding-box, linear-gradient(120deg, #FFC95C, #46E0FF) border-box;
    border: 1.4px solid transparent; box-shadow: 0 4px 12px rgba(0,0,0,.45); display: inline-block; }
.tc-title-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #7fe3b0; font-weight: 600; }
.tc-status .tc-dot { width: 9px; height: 9px; border-radius: 50%; background: #43e08a; box-shadow: 0 0 10px #43e08a; }

/* ── grid ── */
.tc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .tc-grid-2 { grid-template-columns: 1fr; } }

/* ── panel (gunmetal + gradient edge + corner notch) ── */
.tc-panel {
    position: relative; border-radius: 16px; padding: 20px; display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(20,28,46,.85), rgba(10,14,24,.92));
    border: 1px solid rgba(120,160,210,.14); overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.tc-panel::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
    background: linear-gradient(96deg, #FFC95C, #46E0FF); opacity: .9; }
.tc-panel.tc-alt::before { background: linear-gradient(96deg, #46E0FF, #8a6bff); }
.tc-panel.tc-locked { opacity: .62; }

.tc-phead { display: flex; align-items: center; gap: 13px; margin-bottom: 4px; }
.tc-phead .tc-hexico { width: 48px; height: 48px; flex-shrink: 0; }
.tc-phead h2 { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 700; letter-spacing: .5px; margin: 0; }
.tc-phead .tc-tag { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 12px;
    padding: 4px 9px; border-radius: 8px; background: rgba(70,224,255,.1); border: 1px solid rgba(70,224,255,.35); color: #46E0FF; }
.tc-psub { color: #8595b0; font-size: 13px; margin: 2px 0 16px 61px; }

/* ── segmented control ── */
.tc-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.tc-seg-btn {
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13px; color: #e8eefb;
    padding: 12px 0; border-radius: 11px; background: rgba(13,19,32,.6); border: 1px solid rgba(120,160,210,.16);
    cursor: pointer; letter-spacing: .5px; text-transform: uppercase; text-align: center;
}
.tc-seg-btn.on, .tc-seg-btn.selected, .tc-seg-btn.active {
    border-color: rgba(255,201,92,.6); background: linear-gradient(180deg, rgba(255,201,92,.14), rgba(255,201,92,.03));
    color: #FFE6A6; box-shadow: 0 0 16px rgba(255,201,92,.12);
}

/* ── stat row ── */
.tc-statrow { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 12px;
    background: rgba(8,12,22,.6); border: 1px solid rgba(120,160,210,.14); margin-bottom: 10px; }
.tc-statrow .tc-hexico { width: 36px; height: 36px; flex-shrink: 0; }
.tc-statrow .tc-lbl { font-size: 11px; color: #8595b0; letter-spacing: 1px; text-transform: uppercase; }
.tc-statrow .tc-sub { font-size: 12px; color: #8595b0; }
.tc-statrow .tc-rt { margin-left: auto; text-align: right; }
.tc-statrow .tc-val { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 15px; color: #e8eefb; }

/* ── CTA button ── */
.tc-cta { width: 100%; border: none; cursor: pointer; margin-top: auto; padding: 15px; border-radius: 13px;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: 2px; font-size: 14px; color: #0a0a12;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    background: linear-gradient(96deg, #FFC95C 0%, #FFE6A6 30%, #9CEBFF 70%, #46E0FF 100%);
    box-shadow: 0 10px 26px rgba(70,224,255,.22), 0 4px 10px rgba(255,201,92,.18); }
.tc-cta .tc-ico { width: 18px; height: 18px; }
.tc-cta.tc-alt { background: linear-gradient(96deg, #8a6bff, #46E0FF); color: #0a0a12; }
.tc-cta:disabled, .tc-cta.tc-disabled, .tc-cta.btn-disabled {
    filter: grayscale(.55) brightness(.65); cursor: not-allowed; box-shadow: none; }
.tc-cta + .tc-cta { margin-top: 9px; }

/* ── misc helpers ── */
.tc-hexico svg, .tc-ico svg, .tc-cta .tc-ico svg, .tc-title .tc-ico svg { width: 100%; height: 100%; display: block; }
.tc-note { margin-top: 12px; padding: 11px 13px; border-radius: 11px; font-size: 13px; color: #cfe0f5;
    background: rgba(8,12,22,.6); border: 1px solid rgba(120,160,210,.14); display: flex; align-items: center; gap: 9px; }
.tc-note.tc-warn { border-color: rgba(255,180,80,.4); background: rgba(255,170,60,.08); color: #ffd9a6; }
.tc-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #cfe0f5; font-size: 14px;
    border: 1px solid rgba(120,160,210,.14); padding: 12px 15px; border-radius: 12px; background: rgba(13,19,32,.5); cursor: pointer; }
.tc-toggle input { width: 16px; height: 16px; accent-color: #46E0FF; }
/* footer row: Custom Match (expandable) + Auto-Battle chip side by side */
.tc-footrow { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; flex-wrap: wrap; }
.tc-footrow .custom-match-section { flex: 1 1 280px; margin-top: 0; }
.tc-footrow .tc-toggle { margin-top: 0; flex: 0 0 auto; }
/* re-skin the legacy Custom Match to TC-DNA (scoped to beat play.css load order) */
.tc-page .custom-match-section { border: 1px solid rgba(120,160,210,.14); border-radius: 12px;
    background: rgba(13,19,32,.5); padding: 0; overflow: hidden; }
.tc-page .custom-match-toggle { display: flex; align-items: center; justify-content: space-between;
    padding: 13px 15px; cursor: pointer; color: #cfe0f5; font-weight: 600; font-family: 'Space Grotesk', sans-serif; list-style: none; }
.tc-page .custom-match-toggle::-webkit-details-marker { display: none; }
.tc-page .custom-match-content { padding: 0 15px 14px; display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.tc-page .custom-match-content input { flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 9px;
    border: 1px solid rgba(120,160,210,.2); background: rgba(8,12,22,.6); color: #e8eefb; font-family: 'Space Grotesk', sans-serif; }
.tc-page .custom-match-buttons { display: flex; gap: 8px; }
.tc-page .custom-match-buttons .btn { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: .5px;
    padding: 10px 18px; border-radius: 10px; border: 1px solid rgba(120,160,210,.3); background: rgba(13,19,32,.6); color: #cfe0f5; cursor: pointer; }
.tc-page .custom-match-buttons .btn:hover { border-color: rgba(120,190,255,.5); color: #fff; }
.tc-page .custom-match-buttons .btn.btn-success { border: none; color: #0a0a12; background: linear-gradient(96deg, #FFC95C, #46E0FF); }
.tc-inl { width: 18px; height: 18px; flex-shrink: 0; }

/* ── TC coin token (Free Ranked Token mark) — hex + TC that flips like a spinning coin.
   Reusable everywhere the token appears (Quests pill, Play indicator, …). Size is set by
   the wrapper's width/height; the inner <svg> does the rotateY coin-flip. ── */
.tc-coin { display: inline-block; flex-shrink: 0; perspective: 70px; }
.tc-coin > svg { width: 100%; height: 100%; display: block; transform-style: preserve-3d; animation: tcCoinSpin 3.6s linear infinite; }
@keyframes tcCoinSpin { to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .tc-coin > svg { animation: none; } }

.tc-connect-card { max-width: 460px; margin: 40px auto; text-align: center; padding: 34px 26px; }
.tc-connect-card .tc-cc-ico { font-size: 46px; margin-bottom: 14px; }
.tc-connect-card .tc-cc-txt { color: #cfe0f5; font-size: 16px; margin-bottom: 20px; }
