/* 室友匹配页面样式 */

/* 英雄区域 */
.roommate-hero {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.roommate-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.roommate-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* 个人资料表单 */
.roommate-profile {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.roommate-profile h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.profile-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #3498db;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* 生活习惯选项 */
.habit-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.habit-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.habit-title {
    font-weight: 500;
}

.habit-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.habit-choice {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.habit-choice input {
    margin-right: 8px;
}

/* 兴趣标签 */
.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.interest-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #f1f1f1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.interest-tag input {
    display: none;
}

.interest-tag span {
    font-size: 0.9rem;
}

.interest-tag:hover {
    background-color: #e3f2fd;
}

.interest-tag input:checked + span {
    color: #3498db;
    font-weight: 500;
}

.interest-tag input:checked + span::before {
    content: "✓ ";
}

/* 表单操作按钮 */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions button {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* 室友匹配结果 */
.roommate-results {
    padding: 60px 0;
    background-color: white;
    display: none;
}

.roommate-results.active {
    display: block;
}

.roommate-results h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2rem;
}

.results-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
}

.roommate-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.roommate-card {
    width: 100%;
    max-width: 350px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.roommate-card:hover {
    transform: translateY(-5px);
}

.roommate-avatar {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.roommate-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.roommate-info {
    padding: 20px;
}

.roommate-name {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.roommate-identity {
    color: #666;
    margin-bottom: 15px;
}

.roommate-habits, .roommate-interests {
    margin-bottom: 15px;
}

.roommate-habits span, .roommate-interests span {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 4px 10px;
    background-color: #f1f1f1;
    border-radius: 15px;
    font-size: 0.85rem;
}

.contact-btn {
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-btn:hover {
    background-color: #2980b9;
}

/* 租房小贴士 */
.roommate-tips {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.roommate-tips h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.tips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.tip-card {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.tip-card i {
    font-size: 3rem;
    color: #6c5ce7;
    margin-bottom: 20px;
    display: block;
}

.tip-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
}

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .roommate-hero h1 {
        font-size: 2rem;
    }
    
    .profile-form {
        padding: 20px;
    }
    
    .habit-choices {
        flex-direction: column;
        gap: 10px;
    }
    
    .roommate-card {
        max-width: 100%;
    }
    
    .tip-card {
        min-width: 100%;
    }
}