/* ====== 心遇 XinYu 交友搭子平台样式 ====== */

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

:root {
    --bg: #fdf2f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fff5f7;
    --bg-dark: #1a1025;
    --bg-dark-card: #241533;
    --text: #1f1235;
    --text-dark: #f5f0ff;
    --text-muted: #6b7280;
    --text-muted-dark: #a78bcc;
    --accent: #e11d48;
    --accent2: #a855f7;
    --accent3: #ec4899;
    --gradient: linear-gradient(135deg, #e11d48 0%, #a855f7 100%);
    --gradient-soft: linear-gradient(135deg, rgba(225, 29, 72, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    --gradient-card: linear-gradient(135deg, rgba(225, 29, 72, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    --border: #f3e8ff;
    --border-dark: #3b2654;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 4px 24px rgba(168, 85, 247, 0.08);
    --shadow-hover: 0 12px 40px rgba(168, 85, 247, 0.15);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====== 导航栏 ====== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.navbar.scrolled { border-bottom-color: var(--border); }

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.4rem;
}

.logo-icon {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* ====== 按钮 ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(225, 29, 72, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(225, 29, 72, 0.35);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    border-color: var(--accent3);
    color: var(--accent);
}

.btn-full { width: 100%; }

/* ====== Hero ====== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #f9a8d4;
    top: -100px;
    right: -50px;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: #c4b5fd;
    bottom: -100px;
    left: -50px;
    animation-delay: -4s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: #fda4af;
    top: 40%;
    left: 30%;
    animation-delay: -2s;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-25px) scale(1.03); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.15);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 24px;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

/* ====== Hero 模拟卡片 ====== */
.hero-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 50px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    animation: cardFloat 6s ease-in-out infinite;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -2s; }
.card-3 { animation-delay: -4s; }

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.card-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.card-city {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--gradient-soft);
    border-radius: 50px;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
}

/* ====== Hero Stats ====== */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat { text-align: center; }

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-suffix {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ====== Section ====== */
.section { padding: 100px 0; }

.section-dark {
    background: var(--bg-dark);
    color: var(--text-dark);
}

.section-dark .section-tag {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--accent2);
}

.section-dark .section-desc { color: var(--text-muted-dark); }

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.15);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ====== 搭子类型选择 ====== */
.partner-types {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.partner-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 28px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    min-width: 120px;
}

.partner-type-btn:hover {
    border-color: var(--accent3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.partner-type-btn.active {
    border-color: var(--accent);
    background: var(--gradient-soft);
    color: var(--accent);
}

.partner-icon {
    font-size: 2rem;
}

/* ====== 筛选栏 ====== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 24px 32px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.filter-bar.dark {
    background: var(--bg-dark-card);
    border-color: var(--border-dark);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-bar.dark .filter-group label {
    color: var(--text-muted-dark);
}

.filter-options {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--accent3);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}

.filter-bar.dark .filter-btn {
    border-color: var(--border-dark);
    color: var(--text-muted-dark);
}

.filter-bar.dark .filter-btn:hover {
    border-color: var(--accent2);
    color: var(--accent2);
}

.filter-bar.dark .filter-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}

.filter-select {
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
    cursor: pointer;
}

.filter-select.dark {
    background: var(--bg-dark);
    border-color: var(--border-dark);
    color: var(--text-dark);
}

/* ====== 匹配结果 ====== */
.match-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.result-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.result-card:hover {
    border-color: var(--accent3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.section-dark .result-card {
    background: var(--bg-dark-card);
    border-color: var(--border-dark);
}

.result-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.result-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.section-dark .result-meta {
    color: var(--text-muted-dark);
}

.result-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.result-tag {
    padding: 2px 10px;
    background: var(--gradient-soft);
    border-radius: 50px;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
}

.result-score {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.score-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.section-dark .score-bar {
    background: var(--border-dark);
}

.score-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.score-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.result-action {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 50px;
}

.btn-pay {
    background: var(--gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
}

/* ====== 模式切换 ====== */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--bg-dark-card);
    border: 2px solid var(--border-dark);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.mode-tab:hover {
    border-color: var(--accent2);
}

.mode-tab.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
    color: #fff;
}

.mode-icon {
    font-size: 1.4rem;
}

/* ====== CTA / 注册 ====== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #fdf2f8 0%, #f3e8ff 100%);
}

.cta-card {
    text-align: center;
    padding: 64px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.cta-card h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-card > p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.register-form {
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group.required label::after {
    content: " *";
    color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent3);
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.avatar-upload {
    text-align: center;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.avatar-preview:hover {
    border-color: var(--accent3);
}

.avatar-preview span {
    font-size: 1.5rem;
}

.avatar-preview p {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cta-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.cta-note a {
    color: var(--accent);
    text-decoration: none;
}

/* ====== 付费弹窗 ====== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.modal-user {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.pay-amount {
    margin-bottom: 20px;
}

.pay-price {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pay-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pay-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ====== 页脚 ====== */
.footer {
    padding: 64px 0 32px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ====== Toast 通知 ====== */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 14px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #22c55e;
    color: #166534;
}

.toast.error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* ====== 响应式 ====== */
/* ====== 登录表单 ====== */
.login-card {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ====== 导航栏用户信息 ====== */
#navUserInfo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.btn-logout {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--accent);
    color: #fff;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        padding: 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    #navUserInfo {
        justify-content: center;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    .hero-cards { flex-direction: column; align-items: center; }
    .hero-stats { gap: 32px; }
    .partner-types { gap: 10px; }
    .partner-type-btn { padding: 14px 18px; min-width: 100px; }
    .partner-icon { font-size: 1.5rem; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-group { flex-direction: column; align-items: flex-start; }
    .filter-options { flex-wrap: wrap; }
    .match-results { grid-template-columns: 1fr; }
    .mode-tabs { flex-direction: column; align-items: center; }
    .mode-tab { width: 100%; max-width: 300px; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .cta-card { padding: 40px 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .modal { padding: 28px 20px; }
}