* {
    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;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #667eea;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

/* 主要内容 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 首页英雄区 */
.hero-section {
    background: white;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-section h2 {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #999;
    font-size: 1rem;
}

/* 认证表单 */
.auth-container {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 微信登录 */
.wechat-login {
    text-align: center;
}

.wechat-login label {
    display: block;
}

.wechat-login input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.wechat-login label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.wechat-login input[type="radio"]:checked ~ strong {
    color: #667eea;
}

.wechat-login input[type="radio"]:checked ~ p {
    color: #667eea;
}

.wechat-login input[type="radio"]:checked + * {
    color: #667eea;
}

.wechat-login label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f8f9ff;
}

.wechat-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.wechat-desc {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-wechat {
    background: #07c160;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-wechat:hover {
    background: #06ad56;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(7, 193, 96, 0.4);
}

.wechat-logo {
    font-size: 1.3rem;
    font-weight: bold;
}

.wechat-tip {
    margin-top: 1.5rem;
    color: #999;
    font-size: 0.85rem;
}

/* 表单分组 */
.form-section-divider {
    margin: 2rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.form-section-divider h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group-half {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}

/* 浏览页面 */
.browse-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.browse-container h2 {
    color: #667eea;
    margin-bottom: 2rem;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
}

/* 用户卡片 */
.user-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.user-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.user-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.user-card-name {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.user-card-info {
    text-align: center;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.user-card-bio {
    color: #999;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-card-photos {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.user-card-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.user-card-actions {
    display: flex;
    gap: 0.5rem;
}

.user-card-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* 个人资料页面 */
.profile-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.profile-container h2 {
    color: #667eea;
    margin-bottom: 2rem;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 消息页面 */
.messages-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.messages-container h2 {
    color: #667eea;
    margin-bottom: 2rem;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.message-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-item-name {
    font-weight: 600;
    color: #667eea;
}

.message-item-time {
    color: #999;
    font-size: 0.85rem;
}

.message-item-content {
    color: #666;
}

/* 匹配页面 */
.matches-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.matches-container h2 {
    color: #667eea;
    margin-bottom: 2rem;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #667eea;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .user-cards {
        grid-template-columns: 1fr;
    }

    .search-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* 照片上传 */
.photos-container {
    margin-top: 1rem;
}

.photos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    cursor: pointer;
}

.photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    z-index: 10;
}

.photo-item .photo-remove:hover {
    background: rgba(255, 0, 0, 1);
}

.photo-item .photo-avatar-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.photo-upload-area {
    display: inline-block;
}

.photo-upload-btn {
    width: 100px;
    height: 100px;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.photo-upload-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.photo-upload-btn span {
    font-size: 2rem;
    color: #999;
    line-height: 1;
}

.photo-upload-btn p {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* 用户照片展示 */
.user-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.user-photo-item {
    width: 100%;
    padding-top: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.user-photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-photo-item:hover {
    opacity: 0.9;
}

/* 照片上传 */
.photos-container {
    margin-top: 1rem;
}

.photos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    cursor: pointer;
}

.photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.photo-item .photo-remove:hover {
    background: rgba(255, 0, 0, 0.9);
}

.photo-item .photo-avatar-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.photo-upload-area {
    display: inline-block;
}

.photo-upload-btn {
    width: 100px;
    height: 100px;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.photo-upload-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.photo-upload-btn span {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.photo-upload-btn p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* 用户卡片照片 */
.user-card-photos {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.user-card-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* 模态框照片展示 */
.modal-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.modal-photo {
    width: 100%;
    padding-top: 100%;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.modal-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.modal-photo:first-child::after {
    content: '头像';
    position: absolute;
    top: 5px;
    left: 5px;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

