/* 全局颜色变量 */
:root {
    --bg-dark: #1a1a1a;
    --bg-card: #2a2a2a;
    --bg-accent: #333333;
    --text-primary: #ffffff;
    --text-secondary: #bbbbbb;
    --text-tertiary: #888888;
    --accent-color: #D4AF37;
    --accent-color-light: rgba(212, 175, 55, 0.2);
    --shadow: rgba(0, 0, 0, 0.2);
}

/* 首页特定样式 */

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    margin: 0;
    position: relative;
    padding: 0;
    max-width: 100vw;
    width: 100vw;
}

/* 头部导航 */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: var(--bg-primary);
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

/* 内容区域 */
.content-area {
    position: absolute;
    top: 145px;
    bottom: 60px;
    left: 0;
    right: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    background-color: var(--bg-primary);
    border-top: none;
}

/* 底部导航 */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 50;
}

/* 导航项 */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
}

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

/* 主导航标签页 */
.main-tab {
    position: relative;
    color: var(--text-tertiary);
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
}

.main-tab.active {
    color: var(--text-primary);
    font-weight: 500;
}

.main-tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

/* 二级导航标签页 */
.sub-tab, .discover-tab, .cases-tab, .qa-tab {
    padding: 6px 12px;
    margin-right: 12px;
    color: var(--text-tertiary);
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
    cursor: pointer;
    display: inline-block;
}

.sub-tab.active, .discover-tab.active, .cases-tab.active, .qa-tab.active {
    color: var(--accent-color);
    font-weight: 500;
}

/* 标签样式 */
.tag {
    padding: 2px 8px;
    background-color: #2a2a2a;
    color: var(--accent-color);
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
}

/* 卡片网格样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
    width: 100%;
    margin: 0;
    background-color: var(--bg-primary);
    padding-bottom: 50px;
}

/* 全屏网格样式 */
.fullwidth-grid {
    margin: 0;
    padding: 0;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    box-sizing: border-box;
}

/* 确保卡片内容区域宽度为100% */
#follow-content {
    width: 100%;
    max-width: 100%;
    padding: 0 8px;
    margin: 0;
}

/* 调整卡片样式 */
.content-card {
    width: 100%;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-secondary);
    box-sizing: border-box;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px var(--shadow-color);
}

/* 设置固定高度的图片 */
.content-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.content-card .author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
}

.content-card .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card .author-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
}

.content-card .like-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
}

.card-grid .content-card {
    margin: 0;
    border: none;
}

.card-grid .content-card img {
    height: auto;
    width: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 确保卡片底部信息区域样式 */
.card-footer {
    padding: 8px;
    background-color: var(--bg-secondary);
}

.small-card-footer {
    height: 80px;
    overflow: hidden;
}

.content-card .user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.action-button {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.action-button i {
    margin-right: 5px;
}

/* 案例卡片样式 */
.case-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background-color: var(--bg-card);
}

/* 问答卡片样式 */
.qa-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background-color: var(--bg-card);
    padding: 15px;
}

/* 标签和徽章 */
.live-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    background: linear-gradient(to right, #ff2b55, #ff5a3a);
    color: var(--text-primary);
}

.live-badge i {
    font-size: 8px;
    margin-right: 4px;
}

.master-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--accent-color-light);
    color: var(--accent-color);
}

/* 工具类 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 使用适当的宽高比 */
.content-card .relative.pb-\[100\%\] {
    position: relative;
    padding-bottom: 100%; /* 1:1 宽高比 */
}

/* 确保文本不溢出 */
.content-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-primary);
}

/* 确保头像完全显示 */
.content-card .flex.items-center {
    max-width: 70%;
}

/* 确保头像正确显示 */
.content-card .w-5 {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

/* 确保用户名截断时显示省略号 */
.content-card .truncate {
    color: var(--text-secondary);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 12px;
    background-color: var(--bg-primary);
    font-size: 12px;
    color: var(--text-primary);
}

/* 模拟iPhone状态栏 */
.iphone-status {
    font-weight: 500;
}

.iphone-status .time {
    margin-right: 5px;
}

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

/* 底部导航图标修复 */
.bottom-nav .nav-item {
    color: var(--text-tertiary);
}

.bottom-nav .nav-item.active {
    color: var(--text-primary);
}

/* 二级导航容器 */
.cases-tabs, .qa-tabs, #discover-tabs {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    background-color: var(--bg-primary);
    height: 50px;
    padding: 8px 12px;
}

/* 确保案例和问答标签正确显示 */
#cases-content .flex.overflow-x-auto,
#qa-content .flex.overflow-x-auto {
    margin-top: 0;
    padding-top: 10px;
    padding-bottom: 8px;
} 