/* 全局样式 */
:root {
    --primary-color: #ff5a5f;
    --secondary-color: #00a699;
    --text-color: #484848;
    --light-gray: #f8f9fa;
    --border-color: #e6e6e6;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: white;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iOS 状态栏 */
.ios-status-bar {
    height: 44px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    align-items: center;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.status-left {
    display: flex;
    align-items: center;
}

.time {
    font-weight: bold;
}

.status-right {
    display: flex;
    align-items: center;
}

.battery {
    margin-left: 5px;
}

/* 底部导航栏 */
.bottom-tab-bar {
    display: flex;
    justify-content: space-between;
    background-color: white;
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    color: #999;
    text-decoration: none;
    font-size: 10px;
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

/* 常用组件样式 */
.page-container {
    padding: 15px;
    padding-bottom: 70px; /* 为底部导航腾出空间 */
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0 10px 0;
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 15px;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #e54a4f;
    box-shadow: 0 2px 8px rgba(255,90,95,0.3);
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: rgba(255,90,95,0.05);
}

/* 房源卡片 */
.house-card {
    position: relative;
    margin-bottom: 15px;
    transition: transform 0.2s;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.house-card:active {
    transform: scale(0.98);
}

.house-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.house-info {
    padding: 10px;
    background-color: white;
}

.house-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.house-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}

.house-meta {
    display: flex;
    color: #888;
    font-size: 13px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.house-location {
    margin-right: 10px;
}

.house-type {
    margin-right: 10px;
}

/* 搜索框 */
.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px rgba(255,90,95,0.2);
}

.search-input {
    border: none;
    background: transparent;
    flex: 1;
    outline: none;
    font-size: 14px;
}

.search-icon {
    color: #999;
    margin-right: 10px;
}

/* 滤镜区域 */
.filter-scroll {
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-item {
    background-color: var(--light-gray);
    padding: 8px 15px;
    border-radius: 20px;
    margin-right: 10px;
    white-space: nowrap;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-item.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-item:active {
    transform: scale(0.95);
}

/* 聊天样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-out;
}

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

.chat-message.sent {
    justify-content: flex-end;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    margin-right: 10px;
}

.message-sent .chat-avatar {
    margin-right: 0;
    margin-left: 10px;
    order: 2;
}

.message-content {
    background-color: var(--light-gray);
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-sent .message-content {
    background-color: var(--primary-color);
    color: white;
}

.chat-input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    background-color: white;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255,90,95,0.2);
    outline: none;
}

/* 个人资料页 */
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 40px;
    margin-right: 15px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-section {
    margin-bottom: 25px;
}

/* 视频部分 */
.video-card {
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.video-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.video-card:hover .video-play-button {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 10px;
    background-color: white;
}

.video-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.video-creator {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.creator-avatar {
    width: 20px;
    height: 20px;
    border-radius: 10px;
    margin-right: 5px;
    object-fit: cover;
}

/* 设置页面 */
.settings-list {
    margin-top: 20px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.settings-item:active {
    background-color: var(--light-gray);
}

.settings-left {
    display: flex;
    align-items: center;
}

.settings-icon {
    margin-right: 15px;
    color: #666;
    width: 22px;
    text-align: center;
}

.settings-title {
    font-size: 16px;
}

.settings-right {
    color: #999;
}

/* 动画和过渡效果 */
.btn, .card, .house-card, .video-card, .filter-item, .tab-item {
    transition: all 0.2s ease;
}

.btn:active, .card:active, .house-card:active, .video-card:active, .filter-item:active, .tab-item:active {
    transform: scale(0.98);
}

/* 加载动画 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* 响应式调整 */
@media (max-width: 360px) {
    .house-meta {
        flex-direction: column;
    }
    
    .house-location, .house-type {
        margin-bottom: 3px;
    }
} 