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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 15px;
    background-color: white;
    min-height: 100vh;
}

h1 {
    text-align: center;
    margin: 20px 0;
    color: #333;
    font-size: 24px;
}

h2 {
    font-size: 18px;
    margin: 15px 0;
    color: #333;
}

/* 导航栏 */
.nav-bar {
    display: flex;
    justify-content: space-around;
    background-color: #2196F3;
    color: white;
    padding: 12px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    border-top: 1px solid #ddd;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
}

.nav-item.active {
    color: #ffeb3b;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-secondary {
    background-color: #9e9e9e;
    color: white;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

/* 页面样式 */
.page {
    display: none;
    padding-bottom: 70px;
}

.page.active {
    display: block;
}

/* 注册页面 */
.register-page {
    padding: 20px 0;
}

.verification-code {
    display: flex;
    gap: 10px;
}

.verification-code input {
    flex: 1;
}

.verification-code button {
    padding: 0 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 个人资料页面 */
.profile-page {
    padding: 20px 0;
}

.profile-header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.profile-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: #555;
}

/* 编辑资料页面 */
.form-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.form-section h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    font-size: 16px;
}

/* 聊天页面 */
.messages-page {
    padding: 20px 0;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.message-title {
    font-weight: bold;
}

.message-time {
    font-size: 12px;
    color: #666;
}

.message-content {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.message-sender {
    font-size: 12px;
    color: #666;
}

/* 匹配推荐页面 */
.matches-page {
    padding: 20px 0;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-item {
    display: flex;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    align-items: center;
    position: relative;
}

.match-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.match-avatar.blurred {
    filter: blur(5px);
}

.match-info {
    flex: 1;
}

.match-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.match-details {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.match-status {
    font-size: 12px;
    color: #ff5722;
    font-weight: bold;
    margin-bottom: 5px;
}

.match-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.match-btn:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

/* 聊天界面 */
#chatPage {
    padding-bottom: 100px;
}

.chat-header {
    position: sticky;
    top: 0;
    background-color: white;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
    display: flex;
    align-items: center;
}

.chat-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

.chat-header h2 {
    margin: 0;
    font-size: 16px;
    flex: 1;
    text-align: center;
}

#chatMessages {
    padding: 15px;
    height: calc(100vh - 200px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-input-area {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background-color: white;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.chat-input-area button {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 16px;
    }
}