/* ══════════════════════════════════════════════════════
   YuliGM Pro CHAMPIONSHIP — style.css v23
   Mobile-first | Desktop = CCC layout
══════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────── */
:root {
    --bg:       #1a1a1a;
    --bg2:      #212121;
    --hdr:      #111111;
    --bdr:      #363636;
    --acc:      #81b64c;
    --red:      #e05252;
    --wht:      #f0f0f0;
    --wt:       #111111;
    --TOPBAR:   46px;
    --TECH:     42px;
    --CTRL:     52px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════
   TOP BAR (shared)
═══════════════════════════════════════════════════ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--TOPBAR);
    padding: 0 12px;
    background: var(--hdr);
    border-bottom: 1px solid var(--bdr);
    position: sticky;
    top: 0;
    z-index: 999;
    gap: 8px;
}
.tb-left  { display: flex; align-items: center; gap: 8px; }
.tb-right { display: flex; align-items: center; gap: 6px; }

.brand-icon { font-size: 18px; color: var(--acc); }
.brand-name { font-size: 14px; font-weight: 700; color: #ddd; white-space: nowrap; }
.brand-name strong { color: var(--acc); }

.tc-badge {
    background: #2a2a2a; color: #ccc; font-size: 11px; font-weight: 800;
    padding: 2px 8px; border-radius: 10px; border: 1px solid #3a3a3a;
}
.viewers-badge {
    display: flex; align-items: center; gap: 3px;
    font-size: 12px; font-weight: 700; color: #aaa;
    background: rgba(255,255,255,0.04); padding: 2px 8px;
    border-radius: 10px; border: 1px solid #333;
}
.eye { font-size: 11px; }
.live-badge {
    font-size: 11px; font-weight: 800; padding: 2px 10px;
    border-radius: 10px; background: #2a2a2a; color: #555;
    border: 1px solid #3a3a3a; text-transform: uppercase;
    transition: all .3s;
}
.live-badge.connected {
    background: rgba(129,182,76,0.12); color: var(--acc);
    border-color: rgba(129,182,76,0.4);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(129,182,76,0)} 50%{box-shadow:0 0 6px 2px rgba(129,182,76,0.2)} }

.hdr-btn {
    background: none; border: none; color: #777; font-size: 16px;
    cursor: pointer; padding: 4px; border-radius: 4px; transition: color .2s;
}
.hdr-btn:hover { color: #fff; }

/* ═══════════════════════════════════════════════════
   SHARED: eval bar segments
═══════════════════════════════════════════════════ */
.eval-seg-black { background: #1a1a1a; transition: height .5s ease-out; flex-shrink: 0; }
.eval-seg-white { background: #e8e8e8; transition: height .5s ease-out; flex: 1; }
.eval-midline   { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #444; transform: translateY(-50%); }

/* ═══════════════════════════════════════════════════
   SHARED: buttons
═══════════════════════════════════════════════════ */
.c-btn {
    background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px;
    color: #bbb; font-size: 14px; width: 36px; height: 36px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s; flex-shrink: 0;
}
.c-btn:hover  { background: #3a3a3a; color: #fff; }
.c-btn:active { background: #444; }
.c-btn--live  { color: var(--red); border-color: rgba(224,82,82,0.3); }
.c-btn--live:hover { background: rgba(224,82,82,0.1); }
.c-sep { width: 1px; height: 22px; background: #333; flex-shrink: 0; margin: 0 2px; }

/* highlight last move */
.highlight-move  { background-color: rgba(255,255,0,0.40) !important; }


/* ═══════════════════════════════════════════════════
   ██  MOBILE  (< 900px)
   Stack: card-black | board | controls | card-white
═══════════════════════════════════════════════════ */

/* Hide desktop on mobile */
.d-layout { display: none; }

/* ── Engine card ── */
.m-engine-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    min-height: 76px;
    gap: 10px;
    border-bottom: 1px solid var(--bdr);
}
.m-engine--black { background: var(--bg2); }
.m-engine--white {
    background: var(--wht);
    color: var(--wt);
    border-top: 1px solid #ddd;
    border-bottom: none;
}

.m-card-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.m-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }

/* Avatar */
.m-avatar-wrap { position: relative; flex-shrink: 0; }
.m-avatar {
    width: 48px; height: 48px; border-radius: 8px;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.1); background: #111;
}
.m-engine--white .m-avatar { border-color: rgba(0,0,0,0.1); }
.m-flag {
    position: absolute; bottom: -4px; right: -4px;
    font-size: 13px; line-height: 1;
    background: var(--bg2); border-radius: 3px; padding: 1px 2px;
}
.m-engine--white .m-flag { background: var(--wht); }

/* Engine info */
.m-engine-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.m-rank { font-size: 11px; font-weight: 700; color: var(--acc); letter-spacing: .3px; }
.m-engine--white .m-rank { color: #4a7a18; }
.m-name {
    font-size: 14px; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 175px;
}
.m-engine--white .m-name { color: var(--wt); }
.m-stats { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ms-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; color: #555; }
.m-engine--white .ms-lbl { color: #999; }
.ms-val {
    font-size: 10px; font-weight: 700; color: #aaa;
    background: rgba(255,255,255,0.05); padding: 1px 5px; border-radius: 3px;
    font-variant-numeric: tabular-nums;
}
.m-engine--white .ms-val { color: #333; background: rgba(0,0,0,0.06); }

/* Eval + Clock */
.m-eval  { font-size: 32px; font-weight: 900; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; line-height: 1; }
.m-clock { font-size: 14px; font-weight: 700; color: #888; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.m-engine--white .m-clock { color: #777; }

/* ── Board zone ── */
.m-board-zone {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    background: #000;
    position: relative;
}

/* Vertical eval bar */
.m-eval-bar  { width: 18px; flex-shrink: 0; background: #111; }
.m-eval-inner{
    width: 100%; height: 100%;
    position: relative; display: flex; flex-direction: column; overflow: hidden;
}

/* Board itself fills remaining width exactly */
.m-board-wrap { flex: 1; min-width: 0; }
.m-board-wrap > div { width: 100%; aspect-ratio: 1/1; }

/* Moves list (right of board) */
.m-moves-panel {
    width: 52px; flex-shrink: 0;
    background: #0a0a0a; border-left: 1px solid #222;
    display: flex; flex-direction: column; overflow: hidden;
}
.m-moves-hdr {
    font-size: 8px; font-weight: 800; text-transform: uppercase;
    color: #444; padding: 5px 3px 3px; border-bottom: 1px solid #222; letter-spacing: .5px;
}
.m-moves-list {
    flex: 1; overflow-y: auto; padding: 3px 2px;
    scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.m-moves-list::-webkit-scrollbar { width: 2px; }
.m-moves-list::-webkit-scrollbar-thumb { background: #333; }
.m-pgn-row  { font-size: 9px; font-weight: 700; color: #4db3ff; line-height: 1.6; white-space: nowrap; }

/* ── Controls bar ── */
.m-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 8px 14px;
    background: #111; border-top: 1px solid var(--bdr); border-bottom: 1px solid var(--bdr);
}


/* ═══════════════════════════════════════════════════
   ██  DESKTOP  (≥ 900px)
   d-layout: d-left (board+table+ctrl) | d-right (engine cards)
═══════════════════════════════════════════════════ */
@media (min-width: 900px) {

    body { overflow-x: hidden; overflow-y: auto; }

    /* Hide mobile elements */
    .m-engine-card,
    .m-board-zone,
    .m-controls    { display: none !important; }

    /* Show desktop layout */
    .d-layout {
        display: flex;
        flex-direction: row;
        min-height: calc(100vh - var(--TOPBAR));
        height: auto;
        padding-bottom: 25px; /* Spaced before Tabs */
    }

    /* ── LEFT: board + tech + controls ── */
    .d-left {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        flex-grow: 0;
        border-right: 1px solid var(--bdr);
        overflow: hidden;
    }

    /* Board zone fills remaining left height */
    .d-board-zone {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        flex: 0 0 auto;
        background: #000;
        overflow: hidden;
    }

    /* Eval bar */
    .d-eval-bar    { width: 20px; flex-shrink: 0; background: #111; }
    .d-eval-inner  {
        width: 100%; height: 100%;
        position: relative; display: flex; flex-direction: column; overflow: hidden;
    }
    .eval-lbl-top, .eval-lbl-bot {
        position: absolute; left: 50%; transform: translateX(-50%);
        font-size: 7px; font-weight: 800; color: #888;
        writing-mode: vertical-rl; white-space: nowrap;
    }
    .eval-lbl-top { top: 4px; }
    .eval-lbl-bot { bottom: 4px; }

    /* Board: square derived from available height */
    .d-board-wrap {
        --bsz: calc(100vh - var(--TOPBAR) - var(--TECH) - var(--CTRL) - 30px);
        width:  min(var(--bsz), 55vw);
        height: min(var(--bsz), 55vw);
        flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
    }
    .d-board-wrap > div { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; }

    /* Moves panel */
    .d-moves-panel {
        width: 76px; background: #0a0a0a; border-left: 1px solid #1a1a1a;
        display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
    }
    .d-moves-hdr {
        font-size: 9px; font-weight: 800; text-transform: uppercase;
        color: #444; padding: 5px 4px 3px; border-bottom: 1px solid #1a1a1a; letter-spacing: .5px;
    }
    .d-moves-list {
        flex: 1; overflow-y: auto; padding: 4px 3px;
        scrollbar-width: thin; scrollbar-color: #333 transparent;
    }
    .d-moves-list::-webkit-scrollbar { width: 3px; }
    .d-moves-list::-webkit-scrollbar-thumb { background: #333; }
    .d-pgn-row { font-size: 11px; font-weight: 700; color: #4db3ff; line-height: 1.5; white-space: nowrap; }

    /* Tech table */
    .d-tech-table {
        flex-shrink: 0; height: var(--TECH);
        background: #0e0e0e; border-top: 1px solid var(--bdr);
        display: flex; flex-direction: column; overflow: hidden;
    }
    .d-tech-row {
        display: grid;
        grid-template-columns: 112px repeat(6, 1fr);
        font-size: 10px; font-weight: 700; text-align: center;
        padding: 0 8px; flex: 1; align-items: center;
        font-variant-numeric: tabular-nums;
    }
    .d-tech-hdr  { font-size: 9px; color: #555; text-transform: uppercase; flex: none; height: 14px; border-bottom: 1px solid #1a1a1a; }
    .d-tech-lbl  { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #888; font-size: 9px; }
    .d-tech-dark { background: #1a1a1a; color: #ddd; }
    .d-tech-light{ background: #e0e0e0; color: #222; }

    /* Controls */
    .d-controls {
        flex-shrink: 0; height: var(--CTRL);
        display: flex; align-items: center; justify-content: center;
        gap: 4px; padding: 0 14px;
        background: #141414; border-top: 1px solid var(--bdr);
    }

    /* ── RIGHT: engine cards ── */
    .d-right {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    /* Engine card: each = 50% height */
    .d-engine-card {
        display: flex;
        flex-direction: column;
        height: 50%;
        overflow: hidden;
        border-bottom: 1px solid var(--bdr);
    }
    .d-engine--black { background: #1e1e1e; }
    .d-engine--white { background: var(--wht); color: var(--wt); border-bottom: none; }

    /* Card main row: identity | eval | pv-board */
    .d-card-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        padding: 12px 18px;
        gap: 14px;
    }

    /* Identity: avatar + meta */
    .d-card-identity {
        display: flex; align-items: center; gap: 12px;
        flex-shrink: 0; width: 200px;
    }
    .d-avatar-wrap { position: relative; flex-shrink: 0; }
    .d-avatar {
        width: 64px; height: 64px; border-radius: 10px;
        object-fit: cover; border: 2px solid rgba(255,255,255,0.1); background: #111;
        display: block;
    }
    .d-engine--white .d-avatar { border-color: rgba(0,0,0,0.1); }
    .d-flag {
        position: absolute; bottom: -5px; right: -5px;
        font-size: 14px; background: #1e1e1e; border-radius: 3px; padding: 1px 3px;
    }
    .d-engine--white .d-flag { background: var(--wht); }

    .d-engine-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .d-rank  { font-size: 12px; font-weight: 700; color: var(--acc); letter-spacing: .3px; }
    .d-engine--white .d-rank { color: #4a7a18; }
    .d-name  { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
    .d-engine--white .d-name { color: var(--wt); }
    .d-stats { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
    .ds-l { font-size: 9px; font-weight: 700; text-transform: uppercase; color: #555; }
    .d-engine--white .ds-l { color: #aaa; }
    .ds-v {
        font-size: 10px; font-weight: 700; color: #aaa;
        background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 3px;
        font-variant-numeric: tabular-nums;
    }
    .d-engine--white .ds-v { color: #333; background: rgba(0,0,0,0.07); }

    /* Eval + Clock (center) */
    .d-card-center {
        flex: 1;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        gap: 6px;
    }
    .d-eval  { font-size: 68px; font-weight: 900; letter-spacing: -3px; font-variant-numeric: tabular-nums; line-height: 1; }
    .d-clock { font-size: 20px; font-weight: 800; color: #777; font-variant-numeric: tabular-nums; }
    .d-engine--white .d-clock { color: #999; }

    /* PV mini-board (right) */
    .d-pv-wrap {
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }
    .d-pv-board {
        --pvs: calc((100vh - var(--TOPBAR)) / 2 - 30px);
        width:  min(var(--pvs), 240px);
        height: min(var(--pvs), 240px);
        min-width:  140px;
        min-height: 140px;
    }

    /* PV moves text (bottom strip of each card) */
    .d-pv-moves {
        padding: 0 18px 10px;
        font-size: 11px; font-weight: 600; color: #666;
        flex-shrink: 0; height: 26px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .d-engine--white .d-pv-moves { color: #aaa; }
    .pv-mv { color: var(--acc); font-weight: 700; margin-right: 3px; }
}

/* ═══════════════════════════════════════════════════
   SMALL PHONE tweaks
═══════════════════════════════════════════════════ */
@media (max-width: 380px) {
    .m-name  { max-width: 130px; font-size: 13px; }
    .m-eval  { font-size: 26px; }
    .c-btn   { width: 30px; height: 30px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════
   CCC MOBILE TABS (Replaces old standings panel)
═══════════════════════════════════════════════════ */
.ccc-tabs-container {
    background: #111;
    border-top: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
}

.ccc-tabs-header {
    display: flex;
    overflow-x: auto;
    background: #181818;
    scrollbar-width: none; /* Firefox */
}
.ccc-tabs-header::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.ccc-tab {
    flex: 1; min-width: max-content;
    padding: 12px 14px; text-align: center;
    font-size: 11px; font-weight: 700; color: #777;
    text-transform: uppercase; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-bottom 0.2s;
    letter-spacing: 0.5px;
}
.ccc-tab:hover { color: #aaa; }
.ccc-tab.active {
    color: #fff;
    border-bottom: 2px solid #81b64c;
}

.ccc-tabs-content {
    background: #111;
    position: relative;
    overflow: hidden;
}

.ccc-tab-pane {
    display: none;
    animation: fadeInTab 0.25s ease-in-out;
}
.ccc-tab-pane.active {
    display: block;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tablas Interiores CCC */
.ccc-table {
    width: 100%; border-collapse: collapse;
    font-size: 12px; font-family: 'Inter', sans-serif;
    color: #ccc; text-align: center;
}
.ccc-table th {
    background: #151515; color: #666; font-size: 10px;
    font-weight: 700; text-transform: uppercase;
    padding: 8px 6px; border-bottom: 1px solid #222;
}
.ccc-table td {
    padding: 10px 6px; border-bottom: 1px solid #1a1a1a;
    font-variant-numeric: tabular-nums;
}
.ccc-table td.engine-name-col { text-align: left; font-weight: 600; color: #ddd; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccc-table td.eval-col { font-weight: 800; color: #fff; }

/* Info table left alignment */
.info-table td:first-child { text-align: left; color: #777; padding-left: 14px; width: 40%; border-right: 1px solid #222; }
.info-table td:last-child { text-align: left; padding-right: 14px; padding-left: 14px; color: #ddd; font-weight: 600; }

/* Head 2 Head Styles */
.ccc-h2h {
    display: flex; justify-content: center; align-items: center;
    padding: 24px 10px 10px; gap: 15px;
}
.h2h-player { font-size: 14px; font-weight: 800; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2h-player-white { text-align: right; color: #ddd; }
.h2h-player-black { text-align: left; color: #888; }
.h2h-score { font-size: 24px; font-weight: 900; color: #81b64c; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.h2h-labels { text-align: center; font-size: 10px; color: #555; text-transform: uppercase; padding-bottom: 24px; letter-spacing: 1px; }

/* Standings table specific (inherits .ccc-table) */
.st-table th:first-child { width: 28px; text-align: center; }
.st-table td:nth-child(2) { text-align: left; font-weight: 700; max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.st-table td:first-child  { color: #555; font-size: 11px; }
.st-row-1 td { background: rgba(212,175,55,0.07) !important; }
.st-row-1 td:nth-child(2) { color: #d4af37 !important; }
.st-row-2 td { background: rgba(192,192,192,0.05) !important; }
.st-row-2 td:nth-child(2) { color: #c0c0c0 !important; }
.st-row-3 td { background: rgba(205,127,50,0.05) !important;}
.st-row-3 td:nth-child(2) { color: #cd7f32 !important; }
.st-pts { color: #81b64c !important; font-weight: 800 !important; font-size: 13px !important; }
.st-w   { color: #81b64c !important; font-weight: 700 !important;}
.st-d   { color: #aaa    !important; }
.st-l   { color: #e05252 !important; }
.st-waiting { text-align: center; color: #444; padding: 16px; font-style: italic; }

/* En desktop, la barra de pestañas va global abajo */
@media (min-width: 900px) {
    .ccc-tabs-container { border-top: 2px solid #2a2a2a; }
    .ccc-tab { font-size: 13px; padding: 14px 20px; }
    .ccc-table { font-size: 13px; }
    .ccc-table th, .ccc-table td { padding: 10px 16px; }
    .h2h-player { font-size: 16px; }
    .h2h-score { font-size: 28px; }
}

/* Hide legacy elements just in case */
.m-stats, .standings-toggle { display: none !important; }

/* ═══ CHAT EN VIVO ═══════════════════════════════════════════ */
.chat-section { background:#111; border-top:1px solid #2a2a2a; }

.chat-toggle {
    display:flex; align-items:center; width:100%; padding:10px 16px;
    background:#181818; border:none; color:#ccc; font-size:13px;
    font-weight:700; font-family:'Inter',sans-serif; cursor:pointer;
    letter-spacing:.5px; border-bottom:1px solid #2a2a2a;
    transition:background .2s; gap:8px;
}
.chat-toggle:hover { background:#222; }
.ct-icon  { font-size:15px; }
.ct-arrow { font-size:10px; color:#555; margin-left:auto; transition:transform .3s; }
.ct-arrow.open { transform:rotate(180deg); }
.ct-badge {
    background:#e05252; color:#fff; font-size:10px; font-weight:800;
    border-radius:999px; padding:1px 6px; min-width:18px; text-align:center;
}

.chat-body {
    max-height:0; overflow:hidden; transition:max-height .35s ease-out;
    display:flex; flex-direction:column;
}
.chat-body.open { max-height:420px; }

.chat-log {
    flex:1; overflow-y:auto; padding:10px 14px;
    display:flex; flex-direction:column; gap:6px;
    min-height:180px; max-height:320px;
    scrollbar-width:thin; scrollbar-color:#333 #111;
}
.chat-log::-webkit-scrollbar { width:4px; }
.chat-log::-webkit-scrollbar-thumb { background:#333; border-radius:2px; }

.chat-welcome { color:#444; font-size:11px; font-style:italic; text-align:center; padding:8px 0; }

.chat-msg-row { display:flex; gap:6px; align-items:baseline; animation:fadeChat .2s ease; }
@keyframes fadeChat { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

.chat-nick-label { font-size:11px; font-weight:800; white-space:nowrap; font-family:'Inter',sans-serif; }
.chat-text-content { font-size:12px; color:#ccc; word-break:break-word; font-family:'Inter',sans-serif; line-height:1.4; }
.chat-blocked-msg { font-size:11px; color:#e05252; font-style:italic; padding:2px 0; animation:fadeChat .2s ease; }

.chat-input-row {
    display:flex; gap:6px; padding:8px 12px;
    border-top:1px solid #222; background:#141414; align-items:center;
}
.chat-nick {
    width:90px; flex-shrink:0; background:#1e1e1e; border:1px solid #333;
    border-radius:6px; color:#aaa; font-size:11px; font-family:'Inter',sans-serif;
    padding:6px 8px; outline:none;
}
.chat-nick:focus { border-color:#81b64c; }
.chat-msg {
    flex:1; background:#1e1e1e; border:1px solid #333; border-radius:6px;
    color:#eee; font-size:12px; font-family:'Inter',sans-serif;
    padding:6px 10px; outline:none;
}
.chat-msg:focus { border-color:#81b64c; }
.chat-send-btn {
    background:#81b64c; border:none; border-radius:6px; color:#111;
    font-size:16px; width:34px; height:34px; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-weight:800; transition:background .15s; flex-shrink:0;
}
.chat-send-btn:hover { background:#95d15a; }

@media (min-width:900px) {
    .chat-toggle { padding:12px 20px; font-size:14px; }
    .chat-body.open { max-height:480px; }
    .chat-log { max-height:380px; }
    .chat-nick { width:110px; }
}

/* CAMPANITA */
@keyframes bellShake{0%{transform:rotate(0deg)}10%{transform:rotate(-18deg)}25%{transform:rotate(18deg)}40%{transform:rotate(-12deg)}55%{transform:rotate(12deg)}70%{transform:rotate(-6deg)}85%{transform:rotate(6deg)}100%{transform:rotate(0deg)}}
.bell-ring .ct-icon{display:inline-block;animation:bellShake 0.65s ease;transform-origin:top center;color:#d4af37;}

/* ═══════════════════════════════════════════════════
   CCC STYLING: ELO & EXPORT MENU
═══════════════════════════════════════════════════ */
/* ELO Display */
.m-elo {
    font-size: 10px; font-weight: 700; color: #777; letter-spacing: 0.5px; margin-bottom: 2px;
}
.m-engine--white .m-elo { color: #888; }
.d-elo {
    font-size: 11px; font-weight: 700; color: #777; letter-spacing: 0.5px;
}
.d-engine--white .d-elo { color: #888; }

/* Export Menu Positioning and Styling */
.export-menu-container {
    position: relative; 
    display: inline-block;
}
.export-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    min-width: 180px;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.export-dropdown.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.m-export-dropdown {
    left: 50%;
    right: auto;
    transform: translate(-50%, 10px);
}
.m-export-dropdown.show {
    transform: translate(-50%, 0);
}

/* Export Buttons */
.exp-btn {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-bottom: 1px solid #2a2a2a;
}
.exp-btn:last-child {
    border-bottom: none;
}
.exp-btn:hover {
    background: #2a2a2a;
    color: #fff;
}
