/* ===== Tetris Modal Pro — styles ===== */

/* Fixed launch button */
#tmp-open-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(230, 57, 70, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1;
}
#tmp-open-btn:hover {
    background: #c1121f;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(230, 57, 70, 0.55);
}
#tmp-open-btn:active {
    transform: translateY(0);
}

/* Overlay backdrop */
#tmp-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
#tmp-overlay.tmp-open {
    opacity: 1;
    visibility: visible;
}

/* Modal box */
#tmp-modal {
    position: relative;
    background: #1a1a2e;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    max-height: 98vh;
    overflow: hidden;
    transform: scale(0.92) translateY(16px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255,255,255,0.08);
}
#tmp-overlay.tmp-open #tmp-modal {
    transform: scale(1) translateY(0);
}

/* Header */
#tmp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #16213e;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Stats */
#tmp-stats {
    display: flex;
    gap: 28px;
}
.tmp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tmp-stat-label {
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8888aa;
    margin: 0 0 2px;
}
.tmp-stat span:last-child {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #e2e2ff;
    line-height: 1;
}

/* Close button */
#tmp-close-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #ccc;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
#tmp-close-btn:hover {
    background: #e63946;
    color: #fff;
}

/* Game area */
#tmp-game-area {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 20px;
}

/* Main canvas */
#tmp-canvas {
    display: block;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.1);
    background: #0d0d1a;
}

/* Side panel */
#tmp-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 20px;
    min-width: 120px;
}
.tmp-side-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
}
.tmp-side-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8888aa;
    margin: 0 0 10px;
    font-family: inherit;
}
#tmp-next-canvas {
    display: block;
    margin: 0 auto;
}

/* Controls list */
.tmp-controls-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tmp-controls-box li {
    font-size: 11px;
    color: #9999bb;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}
.tmp-controls-box kbd {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10px;
    font-family: inherit;
    color: #ccc;
    white-space: nowrap;
}

/* Overlay message (pause / game over) */
#tmp-overlay-msg {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 26, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    gap: 18px;
    z-index: 10;
}
#tmp-overlay-msg.hidden {
    display: none;
}
#tmp-msg-text {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #e2e2ff;
    margin: 0;
    letter-spacing: 2px;
}
#tmp-msg-btn {
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s;
}
#tmp-msg-btn:hover {
    background: #c1121f;
}

/* Responsive */
@media (max-width: 540px) {
    #tmp-game-area {
        flex-direction: column;
        align-items: center;
        padding: 14px;
    }
    #tmp-canvas {
        width: 240px !important;
        height: 480px !important;
    }
    #tmp-side {
        flex-direction: row;
        padding-left: 0;
        padding-top: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
}
