/* 通用样式组件 */
:root {
    --primary-color: #ff2e63;
    --secondary-color: #00adb5;
    --dark-color: #222831;
    --light-color: #f5f5f5;
    --gray-color: #eeeeee;
    --text-color: #333333;
    --border-radius: 12px;
}

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

/* 状态栏样式 */
.status-bar {
    height: 44px;
    background-color: #000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.status-bar .time {
    font-weight: bold;
}

.status-bar .icons {
    display: flex;
    gap: 5px;
}

/* 底部导航栏 */
.tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 90;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #888;
}

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

.tab-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

/* 内容区 */
.content {
    padding-bottom: 60px; /* 为底部导航腾出空间 */
    min-height: calc(100vh - 104px); /* 状态栏44px + 底部导航60px */
    background-color: var(--light-color);
}

/* 卡片组件 */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-content {
    padding: 12px 16px;
}

/* 头像组件 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar.large {
    width: 80px;
    height: 80px;
}

.avatar.small {
    width: 32px;
    height: 32px;
}

/* 按钮组件 */
.btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 交互组件 */
.action-bar {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.action-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* 标签组件 */
.tag {
    background-color: var(--gray-color);
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
    display: inline-block;
}

/* 搜索框 */
.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--gray-color);
    border-radius: 20px;
    padding: 8px 16px;
    margin: 12px 16px;
}

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

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

/* 加载指示器 */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #999;
}

/* 分隔线 */
.divider {
    height: 1px;
    background-color: rgba(0,0,0,0.05);
    margin: 12px 0;
}

/* 主内容流容器 */
.content-feed {
    display: flex;
    flex-direction: column;
}

/* 内容块 */
.content-item {
    margin-bottom: 8px;
}

/* 视频容器 */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
}

.video-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 用户信息组件 */
.user-info {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.user-details {
    margin-left: 12px;
    flex: 1;
}

.username {
    font-weight: bold;
    font-size: 14px;
}

.user-meta {
    font-size: 12px;
    color: #999;
}

/* 评论组件 */
.comment {
    display: flex;
    margin-bottom: 16px;
}

.comment-content {
    margin-left: 12px;
    flex: 1;
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
}

.comment-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 通知组件 */
.notification {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-color);
    display: flex;
    align-items: center;
}

.notification-content {
    margin-left: 12px;
    flex: 1;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
}

.notification-text {
    font-size: 14px;
    color: #666;
}

.notification-time {
    font-size: 12px;
    color: #999;
}

/* 导航头部 */
.nav-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: white;
    position: sticky;
    top: 44px;
    z-index: 80;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-title {
    font-weight: bold;
    font-size: 16px;
    flex: 1;
    text-align: center;
}

.nav-back, .nav-action {
    font-size: 20px;
    width: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 标签导航 */
.tab-nav {
    display: flex;
    background-color: white;
    position: sticky;
    top: 44px;
    z-index: 80;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-nav-item {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.tab-nav-item.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 340px;
    overflow: hidden;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-color);
    font-weight: bold;
}

.modal-body {
    padding: 16px;
}

.modal-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--gray-color);
}

/* 底部弹出菜单 */
.action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.action-sheet.active {
    transform: translateY(0);
}

.action-sheet-item {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--gray-color);
}

.action-sheet-cancel {
    padding: 16px;
    text-align: center;
    color: #999;
    margin-top: 8px;
}
