* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.language-selector select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.language-selector select option {
    background: #333;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.info-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.photo-upload {
    position: relative;
}

.photo-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.upload-preview {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #666;
}

.upload-preview:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-preview.has-image {
    border-style: solid;
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* 匹配结果区域 */
.matches-section {
    margin-top: 40px;
    text-align: center;
}

.matches-section h2 {
    color: white;
    margin-bottom: 30px;
    font-size: 2rem;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.match-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.match-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid #667eea;
}

.match-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-info h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.match-details {
    color: #666;
    margin-bottom: 15px;
}

.match-details p {
    margin: 5px 0;
}

.view-profile-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 15px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin: 0 auto;
}

/* 手机端模态框优化 */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
        align-items: center;
    }
    
    .modal-content {
        width: 98%;
        max-width: none;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px !important;
        text-align: center;
    }
    
    .modal-body {
        padding: 20px !important;
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 30px;
}

.profile-detail {
    margin-bottom: 20px;
}

.profile-detail label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.profile-detail span {
    color: #333;
    font-size: 1.1rem;
}

.contact-info {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.contact-info h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}

.whatsapp-container {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    backdrop-filter: blur(10px);
}

.whatsapp-number {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    word-break: break-all;
    user-select: all;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.whatsapp-number:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin: 5px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.copy-success {
    color: #90EE90 !important;
    font-weight: bold;
}

.whatsapp-actions {
    margin-top: 15px;
}

.whatsapp-link {
    background: rgba(255, 255, 255, 0.9);
    color: #25d366;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin: 5px;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 匹配动画样式 - 符合网站紫色主题 */
.matching-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.matching-overlay.show {
    display: flex;
    opacity: 1;
}

.matching-container {
    text-align: center;
    color: white;
    max-width: 450px;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.matching-animation {
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
    position: relative;
}

/* 精美的爱心脉冲动画 */
.love-pulse {
    width: 150px;
    height: 150px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.pulse-ring:nth-child(2) {
    animation-delay: 0.5s;
    border-color: rgba(255, 182, 193, 0.4);
}

.pulse-ring:nth-child(3) {
    animation-delay: 1s;
    border-color: rgba(255, 105, 180, 0.3);
}

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

.love-heart {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: heartBeat 1.5s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
    position: relative;
    z-index: 10;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

/* 浮动的小爱心 */
.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mini-heart {
    position: absolute;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    animation: floatHeart 4s ease-in-out infinite;
}

.mini-heart:nth-child(1) { left: 10%; animation-delay: 0s; }
.mini-heart:nth-child(2) { left: 20%; animation-delay: 0.5s; }
.mini-heart:nth-child(3) { left: 80%; animation-delay: 1s; }
.mini-heart:nth-child(4) { left: 90%; animation-delay: 1.5s; }

@keyframes floatHeart {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 1;
    }
}

.matching-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #ffb6c1, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: -200% center; }
    50% { background-position: 200% center; }
}

.matching-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    opacity: 0.95;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
    50% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.6); }
}

.matching-hint {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 30px;
    font-style: italic;
}

/* 精美的进度条 */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 182, 193, 0.9) 25%,
        rgba(255, 105, 180, 1) 50%,
        rgba(255, 182, 193, 0.9) 75%,
        rgba(255, 255, 255, 0.8) 100%);
    border-radius: 10px;
    width: 0%;
    animation: progressGlow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.6);
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 105, 180, 0.6); }
    50% { box-shadow: 0 0 25px rgba(255, 105, 180, 0.9); }
}

.matching-steps {
    margin-top: 30px;
    text-align: left;
}

.step {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    opacity: 0.5;
    transition: all 0.8s ease;
    transform: translateX(-20px);
}

.step.active {
    opacity: 1;
    transform: translateX(0);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.step-icon {
    margin-right: 12px;
    font-size: 1.2rem;
    animation: stepIconSpin 2s ease-in-out infinite;
}

.step.active .step-icon {
    animation: stepIconGlow 1s ease-in-out infinite;
}

@keyframes stepIconSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

@keyframes stepIconGlow {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    }
    50% { 
        transform: scale(1.2);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1));
    }
}

/* 成功动画 */
.match-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95) 0%, rgba(34, 193, 195, 0.95) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.match-success-overlay.show {
    display: flex;
    opacity: 1;
}

.success-container {
    text-align: center;
    color: white;
    animation: successBounce 1s ease-out;
}

@keyframes successBounce {
    0% {
        transform: scale(0.3) translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: successSpin 2s ease-in-out;
}

@keyframes successSpin {
    0% { transform: rotate(0deg) scale(0.5); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.success-text {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.success-message {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 彩色粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
}

.particle:nth-child(odd) {
    background: rgba(255, 255, 255, 0.8);
}

.particle:nth-child(even) {
    background: rgba(255, 182, 193, 0.8);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* 手机端适配 */
@media (max-width: 768px) {
    .matching-container {
        max-width: 350px;
        padding: 40px 20px;
    }
    
    .matching-title {
        font-size: 1.8rem;
    }
    
    .matching-animation {
        width: 120px;
        height: 120px;
    }
    
    .love-heart {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
}

/* 移动端语言选择器样式 */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

.mobile-language-selector {
    margin-top: 15px;
    position: relative;
    display: inline-block;
}

.custom-language-select {
    position: relative;
    display: inline-block;
}

.language-select-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    min-width: 120px;
    text-align: left;
    position: relative;
}

.language-select-button::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.language-select-button.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 12px 15px;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f8f9fa;
}

.language-option.selected {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .container {
        padding: 15px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .form-group input[type="text"],
    .form-group input[type="number"] {
        padding: 12px;
    }
    
    .submit-btn {
        padding: 15px;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    /* 移动端语言选择器位置调整 */
    .mobile-language-selector {
        margin-top: 10px;
        display: block;
        text-align: center;
    }
    
    .language-select-button {
        min-width: 140px;
        font-size: 1rem;
    }
    
    .language-dropdown {
        left: 50%;
        transform: translateX(-50%);
        min-width: 160px;
    }
}
