/* =============================================
   OVERLAY — Match screen, confetti, buttons
   ============================================= */

#match-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease2);
}

#match-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* ── Text ────────────────────────────────────── */
.match-title {
    font-family: var(--font-logo);
    font-size: 52px;
    letter-spacing: 3px;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    text-align: center;
}

.match-sub {
    color: var(--text2);
    font-size: 14px;
    margin-bottom: 32px;
}

/* ── Photos ──────────────────────────────────── */
.match-photos {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.match-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pink);
    box-shadow: 0 0 30px rgba(255, 68, 88, 0.5);
}

.match-photo:last-child {
    margin-left: -20px;
}

.match-heart {
    width: 36px;
    height: 36px;
    background: var(--grad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 2;
    box-shadow: 0 0 20px rgba(255, 68, 88, 0.6);
    margin: 0 -8px;
    animation: heartbeat 1s var(--ease) infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.match-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.match-pct {
    color: var(--pink);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 28px;
}

/* ── Buttons ─────────────────────────────────── */
.match-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
}

.btn-msg {
    padding: 15px;
    background: var(--grad);
    border: none;
    border-radius: 100px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 68, 88, 0.4);
    transition: all 0.2s var(--ease);
}

.btn-msg:hover {
    transform: scale(1.04);
}

.btn-keep {
    padding: 14px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-keep:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

/* ── Confetti pieces ─────────────────────────── */
.confetti-piece {
    position: absolute;
    width: 8px;
    height: 12px;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    animation: confetti-fall 2.5s ease-in forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translate(0, -20px) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), 100vh) rotate(var(--rot));
    }
}