.tcm-launcher {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 999998;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #ff7a18, #ff3d81);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.tcm-launcher:hover,
.tcm-launcher:focus-visible,
.tcm-close:hover,
.tcm-close:focus-visible,
.tcm-restart:hover,
.tcm-restart:focus-visible {
    filter: brightness(1.06);
    outline: none;
}

.tcm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.tcm-modal[hidden] {
    display: none !important;
}

.tcm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 18, 0.72);
    backdrop-filter: blur(4px);
}

.tcm-dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 760px);
    margin: 6vh auto;
    padding: 28px;
    border-radius: 24px;
    background: #10131f;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.tcm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

.tcm-header {
    margin-bottom: 20px;
}

.tcm-header h2 {
    margin: 0 0 6px;
    font-size: 32px;
}

.tcm-subtitle {
    margin: 0;
    color: rgba(255,255,255,0.75);
}

.tcm-game-wrap {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

#tcm-canvas {
    display: block;
    width: 240px;
    max-width: 100%;
    background: #05070d;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 12px;
}

.tcm-panel {
    min-width: 180px;
    display: grid;
    gap: 14px;
}

.tcm-stat {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
}

.tcm-stat span {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-bottom: 6px;
}

.tcm-stat strong {
    font-size: 24px;
}

.tcm-restart {
    border: 0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #7c5cff;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

body.tcm-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .tcm-launcher {
        top: 12px;
        right: 12px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .tcm-dialog {
        width: min(94vw, 760px);
        margin: 3vh auto;
        padding: 22px 18px;
    }

    .tcm-header h2 {
        font-size: 26px;
    }
}
