:root {
    --bg: #1f2124;
    --panel: #23262b;
    --panel2: #1b1d20;
    --text: #e9ecef;
    --muted: rgba(233, 236, 239, .72);

    --light: #eeeed2;
    --dark: #769656;

    --accent: #29c26a;
    --accent2: #f6c343;
    --danger: #ff4d6d;
    --warning: #f59e0b;

    --shadow: rgba(0, 0, 0, .35);
    --glow: rgba(41, 194, 106, .28);
}

.cm-body {
    background: var(--bg);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    margin: 0;
}

.cm-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(1200px 700px at 20% 10%, #2a2e35 0%, transparent 55%, #181a1d 100%);
    pointer-events: none;
    z-index: 0;
}

.cm-icon-xs {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.cm-icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ===== AUTHENTICATION FORMS ===== */
.cm-authContainer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    background: var(--bg);
}

.cm-authCard {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(145deg, #262a31, #1b1d20);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    padding: 48px 40px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cm-authHeader {
    text-align: center;
    margin-bottom: 40px;
}

.cm-authLogo {
    font-size: 64px;
    margin-bottom: 16px;
    color: var(--accent);
    filter: drop-shadow(0 4px 12px rgba(41, 194, 106, .3));
}

.cm-authTitle {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text);
    margin: 0 0 8px 0;
}

.cm-authSubtitle {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    font-weight: 600;
}

.cm-authForm {
    margin-top: 24px;
}

.cm-formTitle {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 24px 0;
}

.cm-formGroup {
    margin-bottom: 20px;
}

.cm-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(233, 236, 239, .85);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.cm-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    box-sizing: border-box;
}

.cm-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, .35);
    box-shadow: 0 0 0 3px rgba(41, 194, 106, .15);
}

.cm-input::placeholder {
    color: rgba(233, 236, 239, .4);
}

.cm-inputGroup {
    position: relative;
    width: 100%;
}

.cm-inputGroup .cm-input {
    padding-right: 48px;
}

.cm-inputToggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(233, 236, 239, .5);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-inputToggle:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--text);
}

.cm-inputToggle:active {
    transform: translateY(-50%) scale(0.95);
}

.cm-inputToggle i {
    margin-right: 0;
}

.cm-codeInput {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

.cm-checkboxGroup {
    margin-top: 16px;
}

.cm-checkboxLabel {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: rgba(233, 236, 239, .85);
    cursor: pointer;
}

.cm-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.cm-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.cm-link:hover {
    text-decoration: underline;
}

.cm-authBtn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cm-authBtnPrimary {
    background: linear-gradient(135deg, var(--accent), #24a85d);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(41, 194, 106, .3);
}

.cm-authBtnPrimary:hover {
    background: linear-gradient(135deg, #24a85d, var(--accent));
    box-shadow: 0 6px 16px rgba(41, 194, 106, .4);
    transform: translateY(-2px);
}

.cm-authBtnPrimary:active {
    transform: translateY(0);
}

.cm-formSwitch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--muted);
}

.cm-formSwitch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.cm-formSwitch a:hover {
    text-decoration: underline;
}

.cm-verificationText {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 24px;
    text-align: center;
}

.cm-authFooter {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    text-align: center;
}

.cm-authFooter p {
    font-size: 12px;
    color: rgba(233, 236, 239, .5);
    margin: 0;
}

/* Message Notification System */
.cm-messageContainer {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

.cm-message {
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(145deg, #262a31, #1b1d20);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text);
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(12px);
}

.cm-message.cm-hiding {
    animation: slideOut 0.3s ease-in forwards;
}

.cm-message-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cm-message-content {
    flex: 1;
    line-height: 1.5;
}

.cm-message-title {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.cm-message-text {
    font-weight: 500;
    font-size: 12px;
    opacity: 0.9;
}

.cm-message-close {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cm-message-close:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .15);
}

.cm-message-success {
    background: linear-gradient(145deg, #1e3a2d, #152619);
    border-color: rgba(41, 194, 106, .35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(41, 194, 106, .2);
}

.cm-message-success .cm-message-icon {
    color: var(--accent);
}

.cm-message-error {
    background: linear-gradient(145deg, #3a1f29, #24161d);
    border-color: rgba(255, 77, 109, .35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 77, 109, .2);
}

.cm-message-error .cm-message-icon {
    color: var(--danger);
}

.cm-message-warning {
    background: linear-gradient(145deg, #3a2f1f, #241f16);
    border-color: rgba(245, 158, 11, .35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(245, 158, 11, .2);
}

.cm-message-warning .cm-message-icon {
    color: var(--warning);
}

.cm-message-info {
    background: linear-gradient(145deg, #1f2a3a, #161d24);
    border-color: rgba(59, 130, 246, .35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(59, 130, 246, .2);
}

.cm-message-info .cm-message-icon {
    color: #3b82f6;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(100px);
    }
}

.cm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(31, 33, 36, .95);
}

.cm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cm-brandMark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a2e35, #1a1c20);
    box-shadow: 10px 10px 18px var(--shadow), -10px -10px 18px rgba(255, 255, 255, .04);
    font-size: 18px;
}

.cm-title {
    font-weight: 800;
    letter-spacing: 2.4px;
    font-size: 14px;
}

.cm-sub {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .4px;
}

.cm-quickMeta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cm-chip {
    padding: 8px 10px;
    border-radius: 14px;
    background: linear-gradient(145deg, #262a31, #1d2024);
    box-shadow: 10px 10px 18px var(--shadow), -10px -10px 18px rgba(255, 255, 255, .04);
    min-width: 180px;
}

.cm-chipLabel {
    font-size: 10px;
    letter-spacing: 1.3px;
    color: rgba(233, 236, 239, .6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cm-chipValue {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
}

.cm-btn {
    background: linear-gradient(145deg, #2c3138, #1d2024);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 10px 10px 18px var(--shadow), -10px -10px 18px rgba(255, 255, 255, .04);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cm-btn:hover {
    border-color: rgba(41, 194, 106, .55);
    box-shadow: 0 0 0 4px var(--glow), 10px 10px 18px var(--shadow);
    color: var(--text);
}

.cm-btnDanger {
    background: linear-gradient(145deg, #3a1f29, #24161d);
    color: #ffd7de;
    border: 1px solid rgba(255, 77, 109, .35);
    box-shadow: 10px 10px 18px var(--shadow), -10px -10px 18px rgba(255, 255, 255, .04);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.cm-btnDanger:hover {
    box-shadow: 0 0 0 4px rgba(255, 77, 109, .18), 10px 10px 18px var(--shadow);
}

.cm-btnWarning {
    background: linear-gradient(145deg, #3a2f1f, #241f16);
    color: #ffecd7;
    border: 1px solid rgba(245, 158, 11, .35);
    box-shadow: 10px 10px 18px var(--shadow), -10px -10px 18px rgba(255, 255, 255, .04);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.cm-btnWarning:hover {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .18), 10px 10px 18px var(--shadow);
}

.cm-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 360px;
    gap: 16px;
    padding: 16px;
    width: 100%;
    max-width: 1520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    align-items: start;
}

.cm-leftPanel,
.cm-rightPanel,
.cm-playArea {
    min-width: 0;
}

.cm-panel,
.cm-leftPanel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cm-panelCard {
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(145deg, #262a31, #1b1d20);
    box-shadow: 14px 14px 24px var(--shadow), -14px -14px 24px rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
}

.cm-panelHeader {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.cm-panelTitle {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-panelHint {
    font-size: 11px;
    color: rgba(233, 236, 239, .55);
}

.cm-playersStack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cm-clocksMobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.cm-turnSection {
    margin-top: 4px;
}

.cm-clockCard {
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, #262a31, #1b1d20);
    box-shadow: 8px 8px 16px var(--shadow), -8px -8px 16px rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    transition: opacity 0.3s ease-in-out;
}

.cm-clockCard.cm-active {
    border-color: rgba(41, 194, 106, .45);
    box-shadow: 0 0 0 2px var(--glow), 8px 8px 16px var(--shadow), -8px -8px 16px rgba(255, 255, 255, .04);
}

.cm-clockName {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    font-size: 9px;
    letter-spacing: 1.2px;
    font-weight: 900;
    color: rgba(233, 236, 239, .65);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-clockStats {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    display: flex;
    gap: 16px;
}

.cm-statItem {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cm-statLabel {
    font-size: 9px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.7;
    color: rgba(233, 236, 239, .70);
}

.cm-statValue {
    font-weight: 900;
    color: var(--accent2);
    font-size: 12px;
    letter-spacing: .2px;
}

.cm-statValue.cm-boardValue {
    color: var(--accent);
}

.cm-clockTime {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: #ffffff;
    color: #1a1c20;
    padding: 5px 10px;
    border-radius: 8px;
    min-width: 78px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-turn {
    padding: 10px 12px;
    border-radius: 14px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 1.6px;
    font-weight: 900;
    color: rgba(233, 236, 239, .84);
    border: 1px solid rgba(255, 255, 255, .06);
    background: linear-gradient(145deg, #24282f, #1b1d20);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

/* White's turn - bright highlight */
.cm-turn.cm-turn-white {
    background: linear-gradient(145deg, #f0f0f0, #d8d8d8);
    border: 2px solid #ffffff;
    color: #1b1d20;
    font-size: 13px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Black's turn - dark highlight */
.cm-turn.cm-turn-black {
    background: linear-gradient(145deg, #3a3f48, #2a2e35);
    border: 2px solid #4a9eff;
    color: #4a9eff;
    font-size: 13px;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.3);
}

.cm-boardWrap {
    position: relative;
    border-radius: 22px;
    padding: 12px;
    background: linear-gradient(145deg, #262a31, #1b1d20);
    box-shadow: 18px 18px 30px var(--shadow), -18px -18px 30px rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
    overflow: hidden;
}

.cm-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
}

/* Top / Bottom player rows around the board */
.cm-playerRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.05));
}

.cm-playerRowTop {
    margin-bottom: 8px;
}

.cm-playerRowBottom {
    margin-top: 8px;
}

.cm-playerName {
    font-weight: 700;
    opacity: 0.85;
}

.cm-playerCaptured {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    justify-content: center;
}

.cm-playerCaptured .cap-piece {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.cm-capturedPanel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.08));
}

.cm-capturedRow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cm-capturedLabel {
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 800;
    color: rgba(233, 236, 239, .84);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cm-capturedPieces {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    min-height: 22px;
    flex: 1;
}

.cm-capturedPieces .cap-piece {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.cap-piece img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.cm-points {
    font-weight: 800;
}

.cm-clockTime.small {
    font-family: 'Courier New', monospace;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 8px;
    background: #ffffff;
    color: #0f1720;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.cm-square {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    cursor: pointer;
    transition: filter 0.15s ease;
    min-width: 0;
    min-height: 0;
}

.cm-square:hover {
    filter: brightness(1.08);
}

.cm-square.light {
    background: var(--light);
}

.cm-square.dark {
    background: var(--dark);
}

.cm-coord {
    position: absolute;
    font-size: 10px;
    font-weight: 800;
    opacity: .55;
    pointer-events: none;
}

.cm-coord.file {
    bottom: 6px;
    right: 6px;
    color: rgba(0, 0, 0, .55);
}

.cm-coord.rank {
    top: 6px;
    left: 6px;
    color: rgba(0, 0, 0, .55);
}

.cm-piece {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cm-piece img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
    pointer-events: none;
    user-select: none;
}

.cm-piece-white img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
}

.cm-piece-black img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
}

.cm-square.cm-selected {
    outline: 4px solid rgba(246, 195, 67, .85);
    outline-offset: -4px;
    animation: pulse-select 0.8s ease infinite;
}

.cm-square.pending-move {
    opacity: 0.7;
    animation: pending-pulse 1s ease-in-out infinite;
}

@keyframes pending-pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

.cm-square.blocked {
    outline: 3px solid rgba(232, 93, 80, .85);
    outline-offset: -3px;
    animation: cm-square-shake 0.35s ease;
}

@keyframes cm-square-shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes pulse-select {

    0%,
    100% {
        outline-color: rgba(246, 195, 67, .85);
    }

    50% {
        outline-color: rgba(246, 195, 67, .5);
    }
}

.cm-overlayLayer {
    pointer-events: none;
    position: absolute;
    inset: 12px;
}

.cm-float {
    position: absolute;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .6px;
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: 0 12px 20px rgba(0, 0, 0, .28);
    transform: translate(-50%, -50%);
    animation: cm-float-up .85s ease-out forwards;
    backdrop-filter: blur(6px);
}

.cm-float.cm-big {
    padding: 16px 24px;
    font-size: 16px;
    text-align: center;
    animation: cm-float-big 2.1s ease-out forwards;
}

.cm-float.plus {
    background: rgba(41, 194, 106, .18);
    color: #bfffe0;
    border-color: rgba(41, 194, 106, .35);
}

.cm-float.minus {
    background: rgba(255, 77, 109, .18);
    color: #ffd7de;
    border-color: rgba(255, 77, 109, .35);
}

.cm-float.neutral {
    background: rgba(59, 130, 246, .18);
    color: #dbeafe;
    border-color: rgba(59, 130, 246, .35);
}

@keyframes cm-float-up {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) scale(.92);
    }

    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -78%) scale(1.05);
    }
}

@keyframes cm-float-big {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.85);
    }

    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.95);
    }
}

.cm-moveHistory {
    max-height: 230px;
    overflow-y: auto;
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
}

.cm-moveTable {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.cm-moveTable thead th {
    position: sticky;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
    padding: 8px 6px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 900;
    color: rgba(233, 236, 239, .65);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.cm-moveTable thead tr:first-child th {
    top: 0;
    z-index: 2;
}

.cm-moveTable thead tr:nth-child(2) th {
    top: 33px;
    z-index: 2;
    font-size: 9px;
    padding: 6px 4px;
}

.cm-moveNum {
    text-align: center !important;
    width: 40px;
    border-right: 1px solid rgba(255, 255, 255, .08);
}

.cm-whiteHeader {
    background: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
    border-left: 1px solid rgba(255, 255, 255, .08);
    border-right: 1px solid rgba(255, 255, 255, .08);
}

.cm-blackHeader {
    background: rgba(0, 0, 0, .25) !important;
    color: rgba(233, 236, 239, .85) !important;
    border-right: 1px solid rgba(255, 255, 255, .08);
}

.cm-subHeader {
    font-size: 9px !important;
    letter-spacing: 0.8px !important;
    padding: 6px 4px !important;
}

.cm-moveTable tbody td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    color: rgba(233, 236, 239, .85);
    text-align: center;
    font-size: 11px;
}

.cm-moveTable tbody td:first-child {
    font-weight: 800;
    color: rgba(233, 236, 239, .6);
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.cm-moveTable tbody td.cm-moveCell {
    text-align: left;
    font-weight: 700;
    padding-left: 8px;
}

.cm-moveTable tbody td.cm-whiteMove {
    color: #ffffff;
}

.cm-moveTable tbody td.cm-blackMove {
    color: #a0a0a0;
}

.cm-captureRow {
    background: rgba(41, 194, 106, .05);
}

.cm-emptyRow td {
    padding: 18px;
    text-align: center;
    color: rgba(233, 236, 239, .5);
    font-style: italic;
}

.cm-player-white {
    color: #ffffff;
    font-weight: 800;
}

.cm-player-black {
    color: #a0a0a0;
    font-weight: 800;
}

.cm-delta-plus {
    color: var(--accent);
    font-weight: 900;
}

.cm-panelSticky {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cm-logCard {
    padding-bottom: 10px;
}

.cm-log {
    height: 170px;
    overflow: auto;
    border-radius: 14px;
    padding: 10px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
}

.cm-logRow {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: 12px;
}

.cm-logLeft {
    color: rgba(233, 236, 239, .85);
}

.cm-logRight {
    font-weight: 900;
}

.cm-logRight.plus {
    color: var(--accent);
}

.cm-logRight.minus {
    color: var(--danger);
}

.cm-chat {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-top: 10px;
}

.cm-chatHeader {
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 900;
    color: rgba(233, 236, 239, .62);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-chatBody {
    height: 105px;
    overflow: auto;
    border-radius: 14px;
    padding: 10px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
    margin-bottom: 8px;
    font-size: 12px;
    color: rgba(233, 236, 239, .84);
}

.cm-chatLine {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.cm-chatInput {
    display: flex;
    gap: 8px;
}

.cm-gamesHistory {
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
    overflow: hidden;
}

.cm-gamesTable {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.cm-gamesTable thead th {
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
    padding: 8px 10px;
    text-align: left;
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 900;
    color: rgba(233, 236, 239, .65);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.cm-gamesTable tbody td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    color: rgba(233, 236, 239, .85);
}

.cm-gamesTable tbody tr:last-child td {
    border-bottom: none;
}

.cm-result-win {
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.8px;
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(41, 194, 106, .12);
    border: 1px solid rgba(41, 194, 106, .25);
    display: inline-block;
}

.cm-result-loss {
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.8px;
    color: var(--danger);
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 77, 109, .12);
    border: 1px solid rgba(255, 77, 109, .25);
    display: inline-block;
}

.cm-result-draw {
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.8px;
    color: var(--accent2);
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(246, 195, 67, .12);
    border: 1px solid rgba(246, 195, 67, .25);
    display: inline-block;
}

.cm-actionsRow {
    display: flex;
    gap: 8px;
}

.cm-actionsHint {
    font-size: 11px;
    color: rgba(233, 236, 239, .6);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.cm-onlyMobile {
    display: none;
}

.cm-onlyDesktop {
    display: block;
}

.cm-mobileTabs {
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(145deg, #262a31, #1b1d20);
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 14px 14px 24px var(--shadow), -14px -14px 24px rgba(255, 255, 255, .04);
}

.cm-pills .nav-link {
    border-radius: 14px;
    color: rgba(233, 236, 239, .8);
    background: rgba(0, 0, 0, .15);
    border: 1px solid rgba(255, 255, 255, .06);
    font-weight: 900;
    letter-spacing: .8px;
    font-size: 12px;
}

.cm-pills .nav-link.active {
    background: rgba(41, 194, 106, .18);
    border-color: rgba(41, 194, 106, .35);
    color: #bfffe0;
}

.cm-tabBody {
    margin-top: 10px;
}

.cm-logMobile {
    height: 220px;
}

.cm-chatMobile {
    height: 240px;
}

/* Settlement rules UI */
.cm-rulesBlock {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cm-ruleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .16);
    border: 1px solid rgba(255, 255, 255, .06);
}

.cm-ruleDivider {
    padding: 0;
    height: 1px;
    background: rgba(255, 255, 255, .08);
    border: none;
    border-radius: 0;
    margin: 2px 0;
}

.cm-ruleLeft {
    font-size: 11px;
    letter-spacing: 0.8px;
    color: rgba(233, 236, 239, .75);
    font-weight: 800;
}

.cm-ruleRight {
    font-size: 12px;
    font-weight: 900;
    color: rgba(233, 236, 239, .92);
    text-align: right;
}

.cm-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.5px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, .10);
}

.cm-pill-good {
    color: #d8f7e7;
    background: #1f8f5c;
    border-color: #1a774d;
}

.cm-pill-warn {
    color: #fff3d9;
    background: #c4851a;
    border-color: #a86f15;
}

.cm-pill-bad {
    color: #ffe6eb;
    background: #b6314f;
    border-color: #9d2a43;
}

/* Desktop -> stack when needed */
@media (max-width: 1180px) {
    .cm-shell {
        grid-template-columns: 320px minmax(0, 1fr);
        grid-template-rows: auto;
    }

    .cm-rightPanel {
        grid-column: 1 / -1;
    }
}

/* Mobile */
@media (max-width: 780px) {
    .cm-shell {
        grid-template-columns: 1fr;
        max-width: 760px;
    }

    .cm-onlyMobile {
        display: block;
    }

    .cm-onlyDesktop {
        display: none;
    }

    .cm-quickMeta .cm-chip {
        display: none;
    }

    .cm-piece img {
        width: 80%;
        height: 80%;
    }
}

/* ===== MODAL STYLES ===== */
.cm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cm-modalOverlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.cm-modalContent {
    position: relative;
    background: linear-gradient(145deg, #1a1f26, #151a1f);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.cm-modalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cm-modalTitle {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent);
    margin: 0;
    letter-spacing: 0.5px;
}

.cm-modalClose {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.cm-modalClose:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.cm-modalBody {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.cm-modalBody h3 {
    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
    margin-top: 24px;
    margin-bottom: 12px;
}

.cm-modalBody h3:first-child {
    margin-top: 0;
}

.cm-modalBody p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.cm-promoCopy {
    color: rgba(233, 236, 239, 0.78);
    margin-bottom: 18px;
}

.cm-promoGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.cm-promoOption {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.08));
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cm-promoOption img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.cm-promoOption:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.cm-promoOption:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.cm-modalBody p strong {
    color: var(--text);
}

.cm-modalFooter {
    padding: 24px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 780px) {
    .cm-modalContent {
        max-width: 100%;
        max-height: 90vh;
    }

    .cm-modalHeader,
    .cm-modalBody,
    .cm-modalFooter {
        padding: 20px;
    }

    .cm-modalTitle {
        font-size: 20px;
    }
}

/* ===== DRAWER STYLES ===== */
.cm-drawer {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.cm-drawerOverlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cm-drawerContent {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    background: linear-gradient(145deg, #1a1f26, #151a1f);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease-out;
    box-sizing: border-box;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.cm-drawerHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cm-drawerTitle {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cm-drawerHeaderBtn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-drawerHeaderBtn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.cm-drawerClose {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-drawerClose:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.cm-btnLogout {
    color: var(--danger, #ff4d6d) !important;
}

.cm-btnLogout:hover {
    background: rgba(255, 77, 109, 0.1) !important;
    color: var(--danger, #ff4d6d) !important;
}

.cm-drawerBody {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cm-profileSection {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.cm-profileAvatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #24a85d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cm-profileInfo {
    flex: 1;
}

.cm-profileName {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.cm-profileEmail {
    font-size: 14px;
    color: var(--muted);
}

.cm-drawerDivider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 24px 0;
}

.cm-drawerMenu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cm-drawerMenuItem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    color: var(--text, #e9ecef);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

.cm-drawerMenuItem:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cm-drawerMenuItem.active {
    background: rgba(41, 194, 106, 0.08);
    border-left: 3px solid var(--accent, #29c26a);
    padding-left: 9px;
}

.cm-drawerMenuItem:last-child {
    border-bottom: 0;
}

.cm-drawerMenuItem span {
    flex: 1;
}

.cm-menuChevron {
    opacity: 0.5;
    margin-right: 0;
}

@media (max-width: 780px) {
    .cm-drawerContent {
        max-width: 100%;
    }
}

.cm-sidebarNavWrapper {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 24px;
}

.cm-sidebarNav {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.cm-sidebarContent {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cm-sidebarTemplates {
    display: none !important;
}

.cm-sectionPanel {
    display: none;
}

.cm-sectionPanel.active {
    display: block;
}

.cm-sectionTitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #e9ecef);
    margin: 0 0 12px 0;
}

.cm-subsectionTitle {
    font-size: 16px;
    font-weight: 600;
    margin: 12px 0;
    color: rgba(255, 255, 255, 0.9);
}

.cm-sectionBlock {
    background: linear-gradient(145deg, #20242c, #181b22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
}

.cm-sectionBlock + .cm-sectionBlock {
    margin-top: 8px;
}

.cm-sectionRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cm-sectionRow:last-child {
    border-bottom: 0;
}

.cm-sectionLabel {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    letter-spacing: 0.2px;
}

.cm-sectionValue {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
}

.cm-walletsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cm-walletCard {
    background: linear-gradient(145deg, #1d2129, #15181f);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

.cm-walletHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cm-walletBalance {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.cm-walletMeta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cm-metaItem {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.cm-metaLabel {
    color: rgba(255, 255, 255, 0.6);
}

.cm-metaValue {
    color: #ffffff;
    font-weight: 700;
}

.cm-transactionsList {
    padding: 4px 2px;
}

.cm-transactionItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cm-transactionItem:last-child {
    border-bottom: 0;
}

.cm-txnDetails {
    flex: 1;
}

.cm-txnType {
    font-weight: 700;
    color: #ffffff;
}

.cm-txnDate {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.cm-txnAmount {
    text-align: right;
}

.cm-txnValue {
    font-weight: 800;
    color: #ffffff;
}

.cm-txnStatus {
    font-size: 12px;
}

.cm-spacer-sm {
    height: 8px;
}

.cm-loadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 16, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cm-loadingModal {
    background: linear-gradient(160deg, #1d2027, #101218);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 24px;
    min-width: 280px;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.cm-loadingSpinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #29c26a;
    animation: cm-spin 1s linear infinite;
}

.cm-loadingText {
    font-weight: 700;
    color: #f1f3f5;
    margin-bottom: 14px;
}

.cm-loadingActions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

@keyframes cm-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Captured pieces table layout */
.cm-capturedSummary {
    margin-top: 8px;
    margin-bottom: 20px;  /* Increased from 8px to prevent overlap with CTA buttons */
}

.cm-capturedLabel {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted, #888);
    margin-bottom: 4px;
    font-weight: 600;
}

.cm-capturedTable {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    height: 40px;
}

.cm-capturedCell {
    position: relative;
    aspect-ratio: 1;
    background: var(--card-bg, #f5f5f5);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.cm-capturedCell[data-count="0"] {
    opacity: 0.3;
}

.cm-capturedCell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cm-capturedCount {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    font-weight: bold;
    background: var(--primary, #007bff);
    color: white;
    border-radius: 8px;
    padding: 0 4px;
    line-height: 14px;
    min-width: 14px;
    text-align: center;
    display: none;
}

.cm-capturedCell[data-count]:not([data-count="0"]) .cm-capturedCount {
    display: block;
}

/* ===== RESPONSIVE STYLES FOR RIGHT SIDEBAR QUICK VIEW ===== */

/* Hide wallet and profile quick view cards when in game (Move History and Game Log take priority) */
#inviteInlineCard ~ #walletQuickView,
#inviteInlineCard ~ #profileQuickView {
    display: block;
}

/* On tablet: Stack all cards vertically */
@media (max-width: 1180px) {
    #walletQuickView,
    #profileQuickView {
        display: block;
    }
}

/* On mobile: Keep the quick view cards accessible */
@media (max-width: 780px) {
    #walletQuickView,
    #profileQuickView {
        display: block;
    }

    /* Make wallet cards more compact on mobile */
    #rightSidebarWallets > div {
        font-size: 14px;
    }

    /* Adjust drawer header buttons for mobile */
    .cm-drawerHeaderBtn {
        padding: 6px;
    }

    .cm-drawerHeader {
        padding: 16px;
    }

    .cm-profileAvatar {
        width: 48px;
        height: 48px;
    }

    .cm-profileName {
        font-size: 16px;
    }

    .cm-profileEmail {
        font-size: 12px;
    }
}

/* Pending transaction status (in-game) */
.cm-pendingTxStatus {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
}

.cm-statusIcon {
    flex-shrink: 0;
}

.cm-statusText {
    flex: 1;
}

.cm-statusTitle {
    font-weight: 600;
    color: #2563eb;
    font-size: 14px;
}

.cm-statusHint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

/* Deposit method tiles */
.cm-methodTiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.cm-methodTile {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1d23;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cm-methodTile .cm-methodIcon {
    margin-right: 8px;
}

.cm-methodTile:hover {
    border-color: rgba(37, 99, 235, 0.5);
}

.cm-methodTile.active {
    border-color: rgba(37, 99, 235, 0.9);
    background: rgba(37, 99, 235, 0.15);
}
