
/* Undo/Redo/Replay Styles */

/* Disabled Button State */
.btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Divider in Controls / Bar Rows */
.divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 5px;
}

.bar-row .divider {
    height: 28px;
    margin: 0 4px;
}

/* Loading Mask */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.loading-mask.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    letter-spacing: 1px;
}

/* Replay HUD - 画布区域底部居中，便于观看时注意到 */
.replay-hud {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: monospace;
    font-size: 14px;
    z-index: 150; /* Higher than overlay */
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    animation: replayHudIn 0.3s ease-out;
}

@keyframes replayHudIn {
    from { transform: translate(-50%, 10px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.replay-hud.hidden {
    display: none;
}

.replay-status {
    color: #0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 10px #0ff; }
    100% { opacity: 0.8; }
}

.replay-controls {
    display: flex;
    gap: 8px;
}

.btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-small:active {
    transform: scale(0.95);
}

/* Replay Overlay */
.replay-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100; /* Below HUD, above canvas */
    cursor: pointer;
    /* Subtle border effect */
    border: 4px solid #0ff; 
    box-sizing: border-box;
    /* Optional vignette */
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.2) 100%);
    pointer-events: auto; /* Capture clicks */
}

.replay-overlay.hidden {
    display: none;
}

/* Hover effect on overlay to hint stopping */
.replay-overlay:hover {
    background: radial-gradient(circle, transparent 50%, rgba(0,255,255,0.05) 100%);
}
