.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.finding-match {
    text-align: center;
}

.rank-badge-anim {
    font-size: 5rem;
    color: var(--gold);
    margin: 30px 0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.timer-box {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
}

.timer-box.critical {
    color: var(--danger);
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px); }
    100% { transform: translate(-1px, -1px); }
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 10px 30px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}
