/* ===== 随机匹配动画页面样式 ===== */
.matching-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #E83C25 0%, #CC2310 50%, #A8180B 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.matching-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

.matching-overlay > .status-bar {
    background: linear-gradient(180deg, #C41E3A 0%, #E53935 100%);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.matching-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.matching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

.matching-back-btn,
.matching-close-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matching-title {
    font-size: 17px;
    font-weight: 700;
    color: #FFF;
    letter-spacing: 1px;
}

.matching-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.matching-animation-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
}

#lottieAnimation {
    width: 80px;
    height: 80px;
    z-index: 2;
}

.fallback-spinner {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #FFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background: #FFF;
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.matching-pulse-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    animation: pulseRing 2s ease-out infinite;
}

.matching-pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.matching-pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.matching-text {
    font-size: 16px;
    color: #FFF;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}

.matching-subtext {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
}

.matching-tips {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 14px 18px;
    width: 85%;
    max-width: 280px;
}

.tip-item {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    padding: 6px 0;
}

.matching-cancel-btn {
    background: rgba(255,255,255,0.15);
    color: #FFF;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 24px;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.2s ease;
}

.matching-cancel-btn:hover {
    background: rgba(255,255,255,0.22);
}

.matching-cancel-btn:active {
    transform: scale(0.97);
}

/* ===== 匹配结果样式 ===== */
.match-result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    animation: fadeIn 0.4s ease;
}

.match-success-bg {
    background: linear-gradient(180deg, #4CAF50 0%, #388E3C 50%, #2E7D32 100%);
}

.match-success-bg .match-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.match-success-bg .match-status-bar .status-bar {
    background: #4CAF50;
}

.match-failed-bg {
    background: linear-gradient(180deg, #FF7043 0%, #F4511E 50%, #D84315 100%);
}

.match-failed-bg .match-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.match-failed-bg .match-status-bar .status-bar {
    background: #FF7043;
}

.match-result-content {
    text-align: center;
    padding: 30px 25px;
    width: 90%;
    max-width: 300px;
    margin: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.success-icon-wrap {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-checkmark {
    width: 36px;
    height: 36px;
    background: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #4CAF50;
    font-weight: bold;
}

.failed-icon-wrap {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.failed-icon {
    font-size: 36px;
}

.result-title {
    font-size: 22px;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 10px;
}

.failed-title {
    font-size: 19px;
}

.result-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 25px;
    line-height: 1.5;
}

.matched-user-card {
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.matched-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: cover;
}

.matched-name {
    font-size: 17px;
    font-weight: 700;
    color: #FFF;
}

.result-tip {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 28px;
    padding: 0 10px;
}

.failed-tips {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.failed-tip-item {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    padding: 4px 0;
}

.result-btn {
    width: 100%;
    padding: 14px;
    border-radius: 26px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-confirm-btn {
    background: #FFF;
    color: #4CAF50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.result-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.result-confirm-btn:active {
    transform: translateY(0);
}

.result-retry-btn {
    background: #FFF;
    color: #FF7043;
    margin-bottom: 10px;
}

.result-back-btn {
    background: rgba(255,255,255,0.2);
    color: #FFF;
    border: 1px solid rgba(255,255,255,0.3);
}

.result-btns-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
