.breakout-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 3, 18, 0);
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: background-color 0.4s ease;
}
.breakout-overlay.breakout-active {
    background-color: rgba(0, 3, 18, 0.92);
    pointer-events: all;
}

.breakout-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 36px;
    color: white;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.breakout-overlay.breakout-active .breakout-close {
    opacity: 1;
}
.breakout-close:hover {
    color: #226DFB;
}

.breakout-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.breakout-overlay.breakout-active .breakout-wrapper {
    opacity: 1;
    transform: scale(1);
}

.breakout-toprow {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 24px;
    font-family: var(--font-family);
    font-size: 18px;
    color: #B2B4BB;
    letter-spacing: 1px;
}
.breakout-toprow span {
    color: #ffffff;
    font-weight: 600;
}

.breakout-canvas {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: #0A0E1A;
    cursor: none;
}

.breakout-hint {
    font-family: var(--font-family);
    font-size: 13px;
    color: #7a7d87;
}

.breakout-message {
    position: absolute;
    font-family: var(--font-family);
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.breakout-message.breakout-msg-visible {
    opacity: 1;
}

/* ===== Leaderboard ===== */
.breakout-leaderboard {
    margin-top: 8px;
    width: 100%;
    max-width: 320px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    font-family: var(--font-family);
    color: #B2B4BB;
}
.breakout-leaderboard-title {
    font-size: 12px;
    letter-spacing: 3px;
    color: #7a7d87;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.breakout-leaderboard-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.breakout-leaderboard-empty {
    text-align: center;
    font-size: 13px;
    color: #7a7d87;
    padding: 6px 0;
}
.breakout-leaderboard-entry {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    padding: 4px 6px;
    border-radius: 6px;
}
.breakout-leaderboard-rank-1 {
    color: #ffd166;
    background: rgba(255, 209, 102, 0.06);
}
.breakout-leaderboard-rank-2 {
    color: #d8d8d8;
    background: rgba(216, 216, 216, 0.05);
}
.breakout-leaderboard-rank-3 {
    color: #cd7f32;
    background: rgba(205, 127, 50, 0.06);
}
.breakout-leaderboard-rank {
    font-weight: 700;
    text-align: right;
    opacity: 0.85;
}
.breakout-leaderboard-name {
    color: #ffffff;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.breakout-leaderboard-points {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #ffffff;
}

/* ===== Name prompt ===== */
.breakout-prompt-host {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.breakout-prompt-host.breakout-prompt-visible {
    opacity: 1;
    pointer-events: all;
}
.breakout-name-prompt {
    background: rgba(10, 14, 26, 0.95);
    border: 1px solid rgba(34, 109, 251, 0.4);
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 32px rgba(34, 109, 251, 0.2);
    font-family: var(--font-family);
    text-align: center;
    min-width: 280px;
}
.breakout-name-prompt-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffd166;
    margin-bottom: 8px;
}
.breakout-name-prompt-label {
    font-size: 13px;
    color: #B2B4BB;
    margin-bottom: 14px;
}
.breakout-name-prompt-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.breakout-name-prompt-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: var(--font-family);
    font-size: 16px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.breakout-name-prompt-input:focus {
    border-color: #226DFB;
    background: rgba(34, 109, 251, 0.08);
}
.breakout-name-prompt-btn {
    background: #226DFB;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.breakout-name-prompt-btn:hover:not(:disabled) {
    background: #1a5be0;
}
.breakout-name-prompt-btn:active:not(:disabled) {
    transform: scale(0.97);
}
.breakout-name-prompt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
