/* VibeNet 主样式文件 */

/* 隐藏搜索条上的多余发布按钮 - 只隐藏发布按钮，保留搜索按钮 */
/* 隐藏搜索条后面的发布按钮（除了搜索按钮本身） */
.nav-search + .btn:not(.nav-search .btn),
.nav-search + button:not(.nav-search button),
.nav-search ~ .btn:not(.nav-search .btn),
.nav-search ~ button:not(.nav-search button),
.nav-search + .btn-primary:not(.nav-search .btn),
.nav-search ~ .btn-primary:not(.nav-search .btn),
.nav-search + .btn-outline:not(.nav-search .btn),
.nav-search ~ .btn-outline:not(.nav-search .btn),
/* 隐藏导航栏中搜索条附近的发布按钮（除了搜索按钮） */
nav .nav-search + *:contains("发布"):not(.nav-search),
nav .nav-search ~ *:contains("发布"):not(.nav-search),
.navbar .nav-search + *:contains("发布"):not(.nav-search),
.navbar .nav-search ~ *:contains("发布"):not(.nav-search),
/* 隐藏任何在搜索条右侧的发布按钮（除了搜索按钮） */
.navbar .nav-search + .btn-primary:not(.nav-search .btn),
.navbar .nav-search ~ .btn-primary:not(.nav-search .btn),
/* 通过文本内容隐藏发布按钮（除了搜索按钮） */
.navbar button:contains("发布"):not(.nav-search button),
.nav-container button:contains("发布"):not(.nav-search button),
/* 通过位置强制隐藏（除了搜索按钮） */
.nav-search + * button:not(.nav-search button),
.nav-search ~ * button:not(.nav-search button) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 更激进的隐藏规则 - 针对所有可能的发布按钮（除了搜索按钮） */
.navbar button[onclick*="openCreatePostModal"]:not(.nav-search button),
.navbar button[onclick*="createPost"]:not(.nav-search button),
.navbar button[onclick*="publish"]:not(.nav-search button),
.navbar .btn:not(.nav-search .btn):not(.nav-search),
.navbar .btn-primary:not(.nav-search .btn):not(.nav-search),
.navbar .btn-outline:not(.nav-search .btn):not(.nav-search),
/* 隐藏所有包含发布文本的按钮（除了搜索按钮） */
button:contains("发布"):not(.nav-search button),
button:contains("Publish"):not(.nav-search button),
/* 隐藏搜索条后面的所有元素（除了导航菜单、用户菜单和搜索按钮） */
.nav-search + *:not(.nav-menu):not(.nav-user):not(.nav-search),
.nav-search ~ *:not(.nav-menu):not(.nav-user):not(.nav-search) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* 确保所有页面都使用全宽布局 */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 容器和布局 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* 动态宽度容器 - 根据屏幕大小调整 */
.dynamic-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* 短视频页面容器优化 */
.shorts-container .dynamic-container {
    padding: 0 1rem;
}

/* 短视频页面 - 消除所有容器间距 */
.dynamic-container.shorts-page {
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.shorts-page .shorts-layout {
    padding: 0 !important;
    margin: 0 !important;
}

.shorts-page .shorts-grid {
    gap: 0.25rem !important;
    padding: 0.25rem !important;
    margin: 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    justify-content: start !important;
}

/* Force gap with maximum specificity */
.dynamic-container.shorts-page .shorts-layout .shorts-grid {
    gap: 0.25rem !important;
    row-gap: 0.25rem !important;
    column-gap: 0.25rem !important;
}

/* Force horizontal spacing with card margins as backup */
.dynamic-container.shorts-page .shorts-layout .shorts-grid .short-card {
    margin-right: 0.25rem !important;
    margin-bottom: 0.25rem !important;
    margin-left: 0.125rem !important;
    margin-top: 0.125rem !important;
}

.dynamic-container.shorts-page .shorts-layout .shorts-grid .short-card:last-child {
    margin-right: 0 !important;
}

/* Alternative flexbox approach */
.dynamic-container.shorts-page .shorts-layout .shorts-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    justify-content: flex-start !important;
}

.dynamic-container.shorts-page .shorts-layout .shorts-grid .short-card {
    flex: 0 0 calc(20% - 0.25rem) !important;
    margin-right: 0.25rem !important;
    margin-bottom: 0.25rem !important;
}

.dynamic-container.shorts-page .shorts-layout .shorts-grid .short-card:nth-child(5n) {
    margin-right: 0 !important;
}

/* Flexbox approach for reliable spacing - CACHE BUST 2024 */
.dynamic-container.shorts-page .shorts-layout .shorts-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* Responsive shorts page flexbox */
@media (min-width: 768px) {
    .shorts-page .shorts-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
    
    .shorts-page .shorts-grid .short-card {
        flex: 0 0 calc(16.66% - 0.25rem) !important;
        margin-right: 0.25rem !important;
    }
    
    .shorts-page .shorts-grid .short-card:nth-child(6n) {
        margin-right: 0 !important;
    }
}

@media (min-width: 1024px) {
    .shorts-page .shorts-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
    
    .shorts-page .shorts-grid .short-card {
        flex: 0 0 calc(14.28% - 0.25rem) !important;
        margin-right: 0.25rem !important;
    }
    
    .shorts-page .shorts-grid .short-card:nth-child(7n) {
        margin-right: 0 !important;
    }
}

@media (min-width: 1200px) {
    .shorts-page .shorts-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
    
    .shorts-page .shorts-grid .short-card {
        flex: 0 0 calc(12.5% - 0.25rem) !important;
        margin-right: 0.25rem !important;
    }
    
    .shorts-page .shorts-grid .short-card:nth-child(8n) {
        margin-right: 0 !important;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .dynamic-container {
        padding: 0 4rem;
    }
    
    .shorts-container .dynamic-container {
        padding: 0 2rem;
    }
    
    .dynamic-container.shorts-page {
        padding: 0 !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .dynamic-container {
        padding: 0 3rem;
    }
    
    .shorts-container .dynamic-container {
        padding: 0 1.5rem;
    }
    
    .dynamic-container.shorts-page {
        padding: 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .dynamic-container {
        padding: 0 2rem;
    }
    
    .shorts-container .dynamic-container {
        padding: 0 1rem;
    }
    
    .dynamic-container.shorts-page {
        padding: 0 !important;
    }
}

@media (max-width: 767px) {
    .dynamic-container {
        padding: 0 1rem;
    }
    
    .shorts-container .dynamic-container {
        padding: 0 0.5rem;
    }
    
    .dynamic-container.shorts-page {
        padding: 0 !important;
    }
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

/* 导航栏隐藏状态 */
.navbar.navbar-hidden {
    transform: translateY(-100%);
}

/* 移动设备简化导航栏 - 默认隐藏 */
.nav-mobile-simple {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    padding: 0.5rem 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.nav-mobile-simple.nav-mobile-visible {
    transform: translateY(0);
}

.nav-brand-mobile {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-brand-mobile i {
    margin-right: 0.5rem;
    font-size: 1.4rem;
}

.nav-mobile-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.nav-mobile-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.nav-mobile-item:hover,
.nav-mobile-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-mobile-item i {
    font-size: 1.2rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* 大屏幕导航栏优化 */
@media (min-width: 1400px) {
    .nav-container {
        padding: 1rem 4rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .nav-container {
        padding: 1rem 3rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .nav-container {
        padding: 1rem 2rem;
    }
}

@media (max-width: 767px) {
    .nav-container {
        padding: 1rem 1rem;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.nav-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-search {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.nav-search form {
    display: flex;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.nav-search input:focus {
    border-color: #007bff;
}

.nav-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-search button:hover {
    background: #0056b3;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
    border-radius: 8px;
}

.nav-item:hover,
.nav-item.active {
    color: #007bff;
    background: #f8f9fa;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.8rem;
}

.nav-user {
    display: flex;
    align-items: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.user-dropdown:hover {
    background: #f8f9fa;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
}

.user-name {
    margin-right: 0.5rem;
    font-weight: 500;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.dropdown-menu i {
    margin-right: 0.5rem;
    width: 16px;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    gap: 0.5rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* 主页布局 */
.home-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    padding: 2rem 0;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* 内容切换标签 */
.content-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #666;
    background: white;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #007bff;
}

.tab-btn.active {
    background: #f8f9fa;
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

.tab-btn i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 内容区域 */
.content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 2rem;
}

.content-section .section-header {
    padding: 2rem;
    margin: -2rem -2rem 2rem -2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.content-section .section-header h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
}

.content-section .section-header h2 i {
    margin-right: 0.5rem;
    color: #007bff;
}

.content-section .section-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}


/* 社交页面样式 */
.social-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    padding: 2rem 0;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-header h1 i {
    margin-right: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* 社交页面帖子样式优化 */
.social-container .post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.social-container .post-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    position: relative;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.social-container .post-user-info {
    flex: 1;
    margin-left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.social-container .user-info-content {
    flex: 1;
}

.social-container .post-actions {
    position: relative;
    margin-left: 0.5rem;
}

.social-container .post-user-info h4 {
    margin-bottom: 0.25rem;
    color: #333;
    font-size: 1rem;
}

.social-container .post-time {
    color: #666;
    font-size: 0.85rem;
}

.social-container .post-content {
    padding: 1.5rem;
}

.social-container .post-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1rem;
}

.social-container .post-stats {
    display: flex;
    gap: 1.5rem;
    margin: 0 1.5rem 1rem 1.5rem;
    color: #666;
    font-size: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.social-container .post-actions-bar {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
    justify-content: flex-start;
}

.social-container .action-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: auto;
}

.social-container .action-btn:hover {
    background: #f8f9fa;
    color: #007bff;
}

.social-container .action-btn.liked {
    color: #dc3545;
}

.social-container .action-btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* 评论区域样式 */
.social-container .comments-section {
    margin: 0 1.5rem 1.5rem 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.social-container .comment-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.social-container .comment-form form {
    display: flex;
    flex: 1;
    gap: 0.5rem;
}

.social-container .comment-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.social-container .comment-form button {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.social-container .comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.social-container .comment-content h5 {
    margin-bottom: 0.25rem;
    color: #333;
    font-size: 0.9rem;
}

.social-container .comment-content p {
    margin-bottom: 0.25rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

.social-container .comment-time {
    font-size: 0.8rem;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 1199px) {
    .social-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem 0;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .social-container .post-header {
        padding: 1rem;
    }
    
    .social-container .post-content {
        padding: 1rem;
    }
    
    .social-container .post-stats {
        margin: 0 1rem 1rem 1rem;
        gap: 1rem;
    }
    
    .social-container .post-actions-bar {
        padding: 0 1rem 1rem 1rem;
    }
    
    .social-container .comments-section {
        margin: 0 1rem 1rem 1rem;
    }
}

/* 动态调整主页布局 */
@media (min-width: 1600px) {
    .home-container {
        grid-template-columns: 1fr 400px;
        gap: 4rem;
        padding: 3rem 0;
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .home-container {
        grid-template-columns: 1fr 380px;
        gap: 3.5rem;
        padding: 2.5rem 0;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .home-container {
        grid-template-columns: 1fr 350px;
        gap: 3rem;
        padding: 2rem 0;
    }
}

@media (max-width: 1199px) {
    .home-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem 0;
    }
}

.main-feed {
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 卡片样式 */
.create-post-card,
.post-card,
.user-info-card,
.trending-card,
.suggestions-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.create-post-card {
    padding: 1.5rem;
}

.create-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.create-post-btn {
    flex: 1;
    margin-left: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    background: white;
    color: #666;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.3s;
}

.create-post-btn:hover {
    border-color: #007bff;
}

.create-post-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.2rem 0.1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    min-width: 45px;
    position: relative;
    z-index: 10;
}

.action-btn:hover {
    background: #f8f9fa;
    color: #007bff;
}

.action-btn i {
    font-size: 0.8rem;
    margin-bottom: 0.05rem;
}

.action-btn span {
    font-size: 0.6rem;
}

/* 帖子卡片 */
.post-card {
    padding: 1.5rem;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.post-user-info h4 {
    margin-bottom: 0.25rem;
    color: #333;
}

.post-actions {
    position: relative;
    margin-left: auto;
}

.post-time {
    color: #666;
    font-size: 0.9rem;
}

.post-content {
    margin-bottom: 1rem;
}

.post-image {
    margin: 1rem 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    overflow: hidden;
}

.post-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 单张图片样式 - 只影响.post-image容器内的图片 */
.post-image img {
    width: 100%;
    max-height: 300px;
    max-width: 500px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
    display: block;
    margin: 0 auto;
}

.post-image img:hover {
    transform: scale(1.02);
}

/* 评论按钮和计数样式 */
.comment-count-badge {
    background: #007bff;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
    display: inline-block;
}

.action-btn.comment-btn {
    position: relative;
    transition: all 0.3s ease;
}

.action-btn.comment-btn:hover {
    background: #f0f8ff;
    color: #007bff;
}

/* 评论区域样式 */
.comments-section {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comments-title {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.close-comments-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-comments-btn:hover {
    background: #dc3545;
    color: white;
}

.comments-list {
    padding: 0.5rem 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.comment-form {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    background: white;
    border-radius: 0 0 8px 8px;
}

.comment-input-container {
    position: relative;
    flex: 1;
}

.comment-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
}

.comment-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
}

.comment-emoji-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.comment-emoji-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.comment-emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 250px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.comment-emoji-picker .emoji-categories {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.comment-emoji-picker .emoji-category-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s;
    min-width: 32px;
    text-align: center;
}

.comment-emoji-picker .emoji-category-btn:hover {
    background: #e9ecef;
}

.comment-emoji-picker .emoji-category-btn.active {
    background: #007bff;
    color: white;
}

.comment-emoji-picker .emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.2rem;
    padding: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.comment-emoji-picker .emoji-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-align: center;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-emoji-picker .emoji-item:hover {
    background: #f0f8ff;
    transform: scale(1.1);
}

/* 分页按钮样式 */
.pagination-section {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
}

.pagination-btn i {
    font-size: 1.1rem;
}

.page-info {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
}

/* 评论菜单样式 */
.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-header h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 0.8rem;
    color: #666;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.comment-menu {
    position: relative;
}

.comment-menu-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comment-menu-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 120px;
}

.comment-menu-dropdown .menu-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.comment-menu-dropdown .menu-item:hover {
    background: #f8f9fa;
}

.comment-menu-dropdown .menu-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.comment-menu-dropdown .menu-item.delete {
    color: #dc3545;
}

.comment-menu-dropdown .menu-item.delete:hover {
    background: #f8d7da;
}

.comment-text {
    margin: 0;
    line-height: 1.4;
    color: #333;
}

.comment-edit-form {
    margin-top: 0.5rem;
}

.comment-edit-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* 表情包选择器样式 */
.post-input-container {
    position: relative;
}

.input-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.toolbar-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.toolbar-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.emoji-picker {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.emoji-categories {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.emoji-category-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.emoji-category-btn:hover {
    background: #e9ecef;
}

.emoji-category-btn.active {
    background: #007bff;
    color: white;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.2rem;
    padding: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 1.1rem;
    transition: all 0.2s;
    text-align: center;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: #f0f8ff;
    transform: scale(1.1);
}

/* 多图片显示样式 */
.post-images {
    margin: 1rem 0;
}

/* Instagram风格轮播 - 缩略图模式 */
.instagram-carousel {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.instagram-carousel-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    align-items: center;
}

.instagram-carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.instagram-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
    background: #f8f9fa;
}

.instagram-carousel-slide img:hover {
    transform: scale(1.02);
}

.instagram-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0;
}

.instagram-carousel:hover .instagram-carousel-nav {
    opacity: 1;
}

.instagram-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.instagram-carousel-nav.prev {
    left: 10px;
}

.instagram-carousel-nav.next {
    right: 10px;
}

.instagram-carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.instagram-carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.instagram-carousel-indicators .indicator.active {
    background: white;
    transform: scale(1.2);
}

.instagram-carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .instagram-carousel {
        max-width: 100%;
        display: block !important;
        visibility: visible !important;
    }
    
    .instagram-carousel-container {
        height: 200px !important;
        display: flex !important;
        visibility: visible !important;
    }
    
    .instagram-carousel-track {
        display: flex !important;
        visibility: visible !important;
    }
    
    .instagram-carousel-slide {
        display: flex !important;
        visibility: visible !important;
    }
    
    .instagram-carousel-slide img {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .instagram-carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        display: flex !important;
        visibility: visible !important;
    }
    
    .instagram-carousel-nav.prev {
        left: 8px;
    }
    
    .instagram-carousel-nav.next {
        right: 8px;
    }
    
    .instagram-carousel-indicators {
        bottom: 8px;
        display: flex !important;
        visibility: visible !important;
    }
    
    .instagram-carousel-indicators .indicator {
        width: 6px;
        height: 6px;
        display: block !important;
        visibility: visible !important;
    }
    
    .carousel-counter {
        top: 8px;
        right: 8px;
        font-size: 0.7rem;
        padding: 3px 6px;
        display: block !important;
        visibility: visible !important;
    }
}

.more-images-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

/* Instagram风格图片查看器 */
.instagram-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.instagram-viewer-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 800px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.instagram-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.instagram-header .close-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.instagram-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 全屏轮播样式 */
.instagram-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    align-items: center;
}

.instagram-slider-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.instagram-slider-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.instagram-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.instagram-slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.instagram-slider-nav.prev {
    left: 20px;
}

.instagram-slider-nav.next {
    right: 20px;
}

.instagram-slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.instagram-slider-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.instagram-slider-indicators .indicator.active {
    background: white;
    transform: scale(1.2);
}

.instagram-slider-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.instagram-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
}

.instagram-slider-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.instagram-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.instagram-image-container {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.instagram-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.instagram-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.instagram-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.instagram-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.instagram-nav-btn.prev {
    left: 20px;
}

.instagram-nav-btn.next {
    right: 20px;
}

.instagram-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.instagram-indicators {
    display: flex;
    gap: 0.5rem;
}

.instagram-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.instagram-indicator.active {
    background: white;
    transform: scale(1.2);
}

.instagram-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.instagram-counter {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .instagram-image-container {
        padding: 1rem;
    }
    
    .instagram-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .instagram-nav-btn.prev {
        left: 10px;
    }
    
    .instagram-nav-btn.next {
        right: 10px;
    }
    
    .instagram-footer {
        padding: 0.5rem;
    }
    
    .instagram-indicator {
        width: 6px;
        height: 6px;
    }
    
    .instagram-counter {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
}

.post-video {
    max-width: 100%;
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.post-video video {
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 350px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.post-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.post-actions-bar {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.like-btn.liked {
    color: #dc3545;
}

/* 评论区域 */
.comments-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.comment-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.comment-form form {
    display: flex;
    flex: 1;
    gap: 0.5rem;
}

.comment-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    outline: none;
}

.comment-form button {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-content h5 {
    margin-bottom: 0.25rem;
    color: #333;
}

.comment-content p {
    margin-bottom: 0.25rem;
    color: #666;
}

.comment-time {
    font-size: 0.8rem;
    color: #999;
}

/* 侧边栏卡片 */
.user-info-card {
    padding: 0;
    overflow: hidden;
}

.user-cover {
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

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

.user-info {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    margin-top: -30px;
}

.user-info .user-avatar {
    width: 60px;
    height: 60px;
    border: 4px solid white;
    margin-bottom: 1rem;
}

.user-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.user-info p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.trending-card,
.suggestions-card {
    padding: 1.5rem;
}

.trending-card h3,
.suggestions-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.trending-list {
    list-style: none;
}

.trending-list li {
    margin-bottom: 0.5rem;
}

.trending-list a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.trending-list a:hover {
    text-decoration: underline;
}

/* 视频页面样式 */
.videos-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 20px;
}

.videos-sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

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

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-item:hover {
    background: #f8f9fa;
    color: #000;
}

.sidebar-item.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #1976d2;
    border-radius: 0 2px 2px 0;
}

.sidebar-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-item span {
    flex: 1;
}

.videos-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* 短视频页面样式 */
.shorts-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 5px;
}

.shorts-sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.shorts-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.videos-container {
    padding: 2rem 0;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* 动态调整视频页面布局 */
@media (min-width: 1600px) {
    .videos-container {
        padding: 3rem 0;
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .videos-container {
        padding: 2.5rem 0;
    }
}

@media (max-width: 1199px) {
    .videos-container {
        padding: 1.5rem 0;
    }
}

.videos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.video-categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 100%;
    margin: 0 auto;
}

/* 动态调整视频网格 */
@media (min-width: 1600px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 3rem;
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 2.8rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
        gap: 2.5rem;
    }
}

@media (max-width: 1199px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    /* 防止横向滚动 */
    body {
        overflow-x: hidden;
    }
    
    .dynamic-container {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .home-container {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .main-feed {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .content-section {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    width: 100%;
    max-width: 100%;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img,
.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    display: block;
    transform: scale(1.02);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    color: #007bff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.play-btn:hover {
    background: white;
    transform: scale(1.1);
}

.video-info {
    padding: 0.5rem;
}

.video-title h3 {
    margin-bottom: 0.3rem;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.3;
}

.video-meta {
    margin-bottom: 0.3rem;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.video-stats {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.8rem;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-time {
    color: #999;
    font-size: 0.8rem;
}

.video-description p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.video-actions {
    display: flex;
    gap: 0.1rem;
    margin-top: 0.2rem;
    padding: 0.2rem 0.2rem 0.2rem 0.2rem;
    border-top: 1px solid #e9ecef;
}

/* 短视频页面样式 */
.shorts-container {
    padding: 1rem 0;
}

.shorts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.25rem !important;
    padding: 0.25rem;
    max-width: 100%;
}

/* YouTube-style grid adjustments */
.shorts-grid .short-card.youtube-style {
    max-width: 250px;
    margin: 0;
    justify-self: center;
}

/* Optimize grid for better card density */
@media (min-width: 768px) {
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.25rem !important;
    }
}

@media (min-width: 1024px) {
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.25rem !important;
    }
}

@media (min-width: 1200px) {
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.25rem !important;
    }
}

/* YouTube-style short video cards */
.short-card.youtube-style {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.short-card.youtube-style:hover {
    transform: scale(1.02);
}

.short-card.youtube-style .short-video {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.short-card.youtube-style .short-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Video info overlay */
.video-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 16px 16px;
    color: white;
    z-index: 2;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-views {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2px;
}

.video-author {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* Options button */
.video-options {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

.options-btn {
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.options-btn:hover {
    background: rgba(0,0,0,0.8);
}

.options-btn i {
    font-size: 14px;
}

/* Play button overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.short-card.youtube-style:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.play-button:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.play-button i {
    font-size: 24px;
    margin-left: 4px; /* Slight offset for better visual centering */
}

/* Legacy short card styles (for backward compatibility) */
.short-card:not(.youtube-style) {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.short-card:not(.youtube-style):hover {
    transform: translateY(-3px);
}

/* 视频选项菜单样式 */
.video-options {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999999 !important;
}

/* 确保表单元素不显示三点菜单 */
.modal input::after,
.modal select::after,
.modal textarea::after,
.form-group::after,
.form-group input::after,
.form-group select::after,
.form-group textarea::after {
    display: none !important;
    content: none !important;
}

/* 隐藏表单中任何意外的三点菜单 */
.modal .options-btn,
.modal .video-options,
.form-group .options-btn,
.form-group .video-options {
    display: none !important;
}

.options-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.options-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.options-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 9999999 !important;
    overflow: hidden;
}

.option-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #333;
}

.option-item:hover {
    background: #f5f5f5;
}

.option-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.option-item.delete-option {
    color: #e74c3c;
}

.option-item.delete-option:hover {
    background: #fdf2f2;
}

/* 视频错误处理样式 */
.video-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.video-error-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.video-error-content i {
    font-size: 48px;
    color: #ff6b6b;
    margin-bottom: 16px;
    display: block;
}

.video-error-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.video-error-content .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-error-content .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.video-error-content .btn i {
    font-size: 14px;
    margin-right: 6px;
    color: white;
}

.short-card:not(.youtube-style) .short-video {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
}

.short-card:not(.youtube-style) .short-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.short-info {
    padding: 0.5rem;
}

.short-title h3 {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.short-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.author-info h4 {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.short-time {
    font-size: 0.7rem;
    color: #999;
}

.short-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #666;
    font-size: 0.8rem;
}

.short-music {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.short-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

/* 视频上传模态框特殊样式 - 仅在需要时显示 */
#videoUploadModal.show {
    display: block !important;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

/* 可拖拽的模态框 */
.modal-content.draggable {
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.1s ease-out;
}

.modal-content.draggable .modal-header {
    cursor: move;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    margin: 0;
    border-radius: 12px 12px 0 0;
    -webkit-user-select: none;
    user-select: none;
}

.modal-content.draggable .modal-header:hover {
    background: #e9ecef;
}

.modal-content.draggable .close-btn {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.modal-content.draggable .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-content.draggable .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #007bff;
}

.file-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload-area:hover {
    border-color: #007bff;
}

.upload-placeholder i {
    font-size: 2rem;
    color: #666;
    margin-bottom: 1rem;
}

.upload-placeholder p {
    color: #666;
    margin-bottom: 0.5rem;
}

.upload-placeholder small {
    color: #999;
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* 加载更多 */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* 图片查看器 */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
}

.image-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-viewer .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .nav-search {
        order: 3;
        width: 100%;
        margin: 1rem 0 0 0;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-item span {
        display: none;
    }
    
    /* 移动设备滚动隐藏导航栏 */
    .nav-mobile-simple {
        display: block !important;
    }
    
    /* 当主导航栏隐藏时，为内容添加顶部间距 */
    .navbar.navbar-hidden ~ .dynamic-container {
        margin-top: 0;
    }
    
    .nav-mobile-simple.nav-mobile-visible ~ .dynamic-container {
        margin-top: 60px;
    }
    
    .home-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .sidebar {
        order: -1;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .video-categories {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0.5rem;
    }
    
    .create-post-actions {
        gap: 0.5rem;
    }
    
    .action-btn {
        min-width: 60px;
        padding: 0.5rem;
    }
    
    .action-btn span {
        font-size: 0.7rem;
    }
    
    /* 小屏幕短视频优化 */
    .dynamic-container.shorts-page .shorts-layout .shorts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 0.75rem !important;
        display: grid !important;
    }
    
    .short-card {
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
    }
    
    .short-card.youtube-style {
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
    }
    
    .short-video {
        aspect-ratio: 9/16;
        width: 100%;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Profile页面样式 */
.profile-container {
    max-width: 100%;
    margin: 0 auto 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.profile-header {
    position: relative;
}

.profile-cover {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

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

.edit-cover-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.edit-cover-btn:hover {
    background: rgba(0,0,0,0.8);
}

.profile-info {
    padding: 20px 30px;
    position: relative;
}

.profile-avatar-section {
    position: relative;
    display: inline-block;
    margin-top: -60px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s;
}

.edit-avatar-btn:hover {
    background: #0056b3;
}

.profile-details h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

.profile-bio {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #007bff;
    background: #f8f9fa;
}


.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.posts-grid, .videos-grid {
    display: grid;
    gap: 20px;
}

.shorts-grid {
    display: grid;
    gap: 0.25rem !important;
}

.posts-grid {
    grid-template-columns: 1fr;
}

.videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.shorts-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #999;
}

.empty-state p {
    font-size: 1rem;
    color: #aaa;
}

.post-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    margin-bottom: 20px;
}

.post-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 旧的post-image样式已移动到前面，这里删除重复定义 */

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.post-stats {
    display: flex;
    gap: 15px;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-card, .short-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    margin: 0;
}

.video-card:hover, .short-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail, .short-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img, .short-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    display: block;
}

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

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.play-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.play-btn:hover {
    background: rgba(0,0,0,0.9);
}

.video-info, .short-info {
    padding: 8px;
}

.video-info h3, .short-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.video-stats, .short-stats {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

.video-stats span, .short-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 删除重复的模态框样式 - 已在上面定义 */

/* 删除重复的模态框样式 */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-info {
        padding: 15px 20px;
    }
    
    .profile-stats {
        gap: 20px;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 12px 20px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Footer样式 */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-section p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

/* 确保页面布局正确 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 响应式footer */
@media (max-width: 768px) {
    .footer {
        margin-top: 2rem;
        padding: 1.5rem 0 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 1rem;
    }
}

/* 视频预览样式 */
.video-preview {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* 视频播放器模态框样式 */
.video-player-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player-modal .modal-header {
    background: #333;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-player-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.video-player-modal .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player-modal .close-btn:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.video-player-modal .modal-body {
    padding: 0;
    position: relative;
}

.video-player-modal video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
    object-fit: contain;
    background: #000;
}

.video-player-modal .video-info {
    background: #f8f9fa;
    padding: 1rem;
}

.video-player-modal .video-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.video-player-modal .video-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 首页视频和短视频样式 */
.videos-section, .shorts-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.videos-section h3, .shorts-section h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail .video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    display: block;
    transition: all 0.3s ease;
    transform: scale(1.02);
}

/* 悬停时的视频效果 */
.video-card:hover .video-preview {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 悬停时显示播放指示器 */
.video-card:hover .video-duration {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    transform: scale(1.1);
}

.video-thumbnail img {
    display: none;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-card.playing .video-preview {
    cursor: pointer;
}

.video-card.playing .video-preview:hover {
    filter: brightness(1.1);
}

/* Admin操作按钮样式 */
.admin-actions {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.admin-btn {
    background: none;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.edit-btn {
    color: #007bff;
}

.edit-btn:hover {
    background: #e3f2fd;
    color: #0056b3;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #f8d7da;
    color: #721c24;
}

.video-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}


.video-info {
    padding: 1rem;
}

.video-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.video-info p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.video-stats span {
    color: #666;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-time {
    color: #999;
    font-size: 0.8rem;
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.25rem !important;
    margin-bottom: 1rem;
}

.short-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    margin: 0;
}

.short-card:hover {
    transform: translateY(-2px);
}

.short-video {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.short-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.short-info {
    padding: 0.5rem;
}

.short-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.short-stats {
    display: flex;
    gap: 0.75rem;
}

.short-stats span {
    color: #666;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.section-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.section-footer .btn {
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
}

/* 移动设备视频优化 */
@media (max-width: 768px) {
    /* 防止横向滚动 */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .video-card {
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        width: 100%;
        max-width: 100%;
    }
    
    .video-card:hover {
        transform: none;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    
    .video-thumbnail {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9;
        background: #000;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .video-preview {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
        max-width: 100%;
        transform: scale(1.02);
    }
    
    .mobile-play-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0,0,0,0.7);
        color: white;
        border-radius: 50%;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        z-index: 10;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-play-overlay:hover {
        background: rgba(0,0,0,0.9);
        transform: translate(-50%, -50%) scale(1.1);
    }
    
    /* 视频信息区域移动设备优化 - 统一主页和视频页面风格 */
    .video-info {
        padding: 12px;
    }
    
    /* 视频标题 - 统一使用h4样式 */
    .video-info h4,
    .video-title h3 {
        font-size: 14px;
        line-height: 1.3;
        margin: 0 0 8px 0;
        color: #333;
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* 视频描述 - 统一使用p样式 */
    .video-info p,
    .video-description p {
        font-size: 11px;
        color: #666;
        line-height: 1.4;
        margin: 0 0 8px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* 视频统计数据 - 统一样式 */
    .video-stats {
        display: flex;
        gap: 12px;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }
    
    .video-stats span {
        font-size: 11px;
        color: #666;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .video-stats i {
        font-size: 10px;
    }
    
    /* 视频时间 - 统一样式 */
    .video-meta,
    .video-time {
        font-size: 11px;
        color: #999;
        margin: 0;
    }
    
    /* 视频作者信息 - 仅在视频页面显示 */
    .video-author {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .video-author .author-avatar {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .video-author span {
        font-size: 11px;
        color: #666;
        font-weight: 500;
    }
    
    /* 视频描述容器 - 仅在视频页面显示 */
    .video-description {
        margin: 4px 0;
    }
    
    /* 分页按钮移动设备优化 */
    .pagination-section {
        margin: 1rem 0;
        padding: 0.5rem;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        width: 100%;
        max-width: 100%;
    }
    
    .pagination-btn {
        width: 100%;
        min-width: auto;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 500;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .pagination-btn i {
        font-size: 16px;
    }
    
    .page-info {
        font-size: 14px;
        font-weight: 500;
        color: #666;
        padding: 8px 16px;
        background: #f8f9fa;
        border-radius: 6px;
        text-align: center;
        margin: 0 auto;
        max-width: 120px;
    }
    
    /* 短视频移动设备优化 */
    .short-card {
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
    }
    
    .short-card:hover {
        transform: none;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    
    .short-video {
        position: relative;
        background: #000;
        aspect-ratio: 9/16;
        width: 100%;
        overflow: hidden;
        border-radius: 8px;
    }
    
    .short-video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
    }
    
    /* YouTube-style mobile optimization */
    .dynamic-container.shorts-page .shorts-layout .shorts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 1rem !important;
        width: 100%;
        max-width: 100%;
        display: grid !important;
    }
    
    .short-card.youtube-style {
        max-width: 100%;
        width: 100%;
        margin: 0 !important;
    }
    
    .short-card.youtube-style:hover {
        transform: none;
    }
    
    .short-card.youtube-style .short-video {
        width: 100%;
        max-width: 100%;
    }
    
    .video-info-overlay {
        padding: 16px 12px 12px;
    }
    
    .video-title {
        font-size: 13px;
    }
    
    .video-views, .video-author {
        font-size: 11px;
    }
    
    .options-btn {
        width: 28px;
        height: 28px;
    }
    
    .options-btn i {
        font-size: 12px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button i {
        font-size: 20px;
    }
    
    /* 相关视频移动设备优化 */
    .related-video-item {
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    
    .related-video-thumbnail {
        position: relative;
        background: #000;
        min-height: 120px;
    }
    
    .related-video-thumbnail video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
    }
    
    /* 相关视频移动设备播放按钮 */
    .related-video-item .mobile-play-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0,0,0,0.7);
        color: white;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        z-index: 10;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .related-video-item .mobile-play-overlay:hover {
        background: rgba(0,0,0,0.9);
        transform: translate(-50%, -50%) scale(1.1);
    }
    
    /* 移动设备操作按钮优化 */
    .video-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding: 0.5rem;
        border-top: 1px solid #e9ecef;
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1;
        min-width: 60px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .action-btn i {
        font-size: 14px;
    }
    
    .action-btn span {
        font-size: 11px;
    }
    
    /* 管理操作按钮移动设备优化 */
    .admin-actions {
        display: flex;
        gap: 8px;
        margin-left: auto;
        margin-top: 0.5rem;
    }
    
    .admin-btn {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 12px;
        min-width: 40px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .admin-btn.edit-btn {
        background: #007bff;
        color: white;
        border-color: #007bff;
    }
    
    .admin-btn.delete-btn {
        background: #dc3545;
        color: white;
        border-color: #dc3545;
    }
    
    .admin-btn:hover {
        opacity: 0.8;
        transform: scale(1.05);
    }
    
    /* 个人资料操作按钮移动设备优化 */
    .profile-actions {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }
    
    .profile-actions .btn {
        flex: 1;
        min-width: 120px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* 视频标题区域移动设备优化 */
    .video-title {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .video-title h3 {
        font-size: 16px;
        line-height: 1.3;
        margin: 0;
    }
    
    /* 上传按钮移动设备优化 */
    .video-actions .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 120px;
    }
    
    /* 创建帖子卡片移动设备优化 */
    .create-post-card {
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .create-post-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .create-post-btn {
        flex: 1;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 25px;
        padding: 12px 16px;
        text-align: left;
        color: #6c757d;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .create-post-btn:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }
    
    .create-post-actions {
        display: flex;
        gap: 8px;
        justify-content: space-around;
    }
    
    .create-post-actions .action-btn {
        flex: 1;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 12px;
        color: #495057;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    .create-post-actions .action-btn:hover {
        background: #e9ecef;
        border-color: #adb5bd;
        transform: translateY(-1px);
    }
    
    .create-post-actions .action-btn i {
        font-size: 16px;
    }
    
    .create-post-actions .action-btn span {
        font-size: 11px;
        font-weight: 500;
    }
    
    /* 视频上传模态框移动设备优化 */
    .modal-content {
        width: 95%;
        max-width: 500px;
        max-height: 85vh;
        margin: 7.5vh auto;
        display: flex;
        flex-direction: column;
        /* 确保模态框不会超出视口 */
        max-height: calc(100vh - 2rem);
    }
    
    .modal-content.draggable {
        width: 95%;
        max-width: 500px;
        max-height: 85vh;
        margin: 7.5vh auto;
        display: flex;
        flex-direction: column;
    }
    
    .modal-content.draggable .modal-body {
        flex: 1;
        max-height: calc(85vh - 120px);
        overflow-y: auto;
        padding: 1rem;
    }
    
    .modal-content.draggable .modal-footer {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 2px solid #e9ecef;
        padding: 1rem;
        z-index: 10;
        margin-top: auto;
        /* 为手机底部导航栏留出空间 */
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        margin-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    /* 视频预览区域移动设备优化 */
    .video-preview {
        width: 100%;
        max-height: 200px;
        height: 200px;
        background: #000;
        border-radius: 8px;
        overflow: hidden;
        display: block;
        margin-top: 0.5rem;
    }
    
    .video-preview video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #000;
    }
    
    /* 文件预览区域移动设备优化 */
    .file-preview {
        margin-top: 0.5rem;
    }
    
    .file-preview img,
    .file-preview video {
        max-width: 100%;
        max-height: 200px;
        border-radius: 8px;
        object-fit: contain;
    }
    
    /* 上传进度条移动设备优化 */
    .upload-progress {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }
    
    .progress-header h4 {
        margin: 0;
        font-size: 14px;
        color: #495057;
    }
    
    .progress-percentage {
        font-size: 12px;
        font-weight: bold;
        color: #007bff;
    }
    
    .progress-bar-container {
        background: #e9ecef;
        border-radius: 4px;
        height: 8px;
        overflow: hidden;
        margin-bottom: 0.5rem;
    }
    
    .progress-bar {
        height: 100%;
        position: relative;
    }
    
    .progress-fill {
        height: 100%;
        background: #007bff;
        border-radius: 4px;
        transition: width 0.3s ease;
        width: 0%;
    }
    
    .progress-details {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    
    .progress-actions {
        text-align: center;
    }
    
    .progress-actions .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* 表单组移动设备优化 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 0.25rem;
        font-size: 14px;
        font-weight: 500;
        color: #495057;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ced4da;
        border-radius: 6px;
        font-size: 14px;
        background: white;
    }
    
    .form-group textarea {
        resize: vertical;
        min-height: 80px;
    }
    
    /* 模态框按钮移动设备优化 */
    .modal-footer {
        display: flex;
        gap: 0.5rem;
        padding: 1rem;
        border-top: 2px solid #e9ecef;
        background: white;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
    
    .modal-footer .btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 6px;
        font-weight: 500;
    }
    
    .modal-footer .btn-outline {
        background: white;
        border: 1px solid #ced4da;
        color: #495057;
    }
    
    .modal-footer .btn-primary {
        background: #007bff;
        border: 1px solid #007bff;
        color: white;
    }
    
    /* 超小屏幕设备优化 */
    @media (max-height: 600px) {
        .modal-content {
            max-height: 95vh;
            margin: 2.5vh auto;
        }
        
        .modal-content.draggable {
            max-height: 95vh;
            margin: 2.5vh auto;
        }
        
        .modal-content.draggable .modal-body {
            max-height: calc(95vh - 100px);
        }
        
        .modal-content.draggable .modal-footer {
            /* 为小屏幕设备增加更多底部空间 */
            padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 20px));
            margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
        }
        
        .video-preview {
            max-height: 150px;
            height: 150px;
        }
    }
    
    /* 横屏模式优化 */
    @media (max-height: 500px) and (orientation: landscape) {
        .modal-content {
            max-height: 98vh;
            margin: 1vh auto;
        }
        
        .modal-content.draggable {
            max-height: 98vh;
            margin: 1vh auto;
        }
        
        .modal-content.draggable .modal-body {
            max-height: calc(98vh - 80px);
        }
        
        .modal-content.draggable .modal-footer {
            /* 横屏模式也需要考虑底部安全区域 */
            padding-bottom: calc(1rem + env(safe-area-inset-bottom, 10px));
            margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        }
        
        .video-preview {
            max-height: 120px;
            height: 120px;
        }
    }
}

/* 移动设备底部安全区域支持 */
@supports (padding: max(0px)) {
    .modal-content.draggable .modal-footer {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        margin-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* 针对iPhone等有底部导航栏的设备 */
@media (max-width: 768px) and (max-height: 900px) {
    .modal-content.draggable .modal-footer {
        /* 为iPhone等设备的底部导航栏留出额外空间 */
        padding-bottom: calc(1rem + 20px);
        margin-bottom: 20px;
    }
}

/* 帖子菜单样式 */
.post-menu {
    position: absolute;
    top: 25px;
    right: 0px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    min-width: 120px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.menu-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.menu-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.menu-item.delete {
    color: #dc3545;
}

.menu-item.delete:hover {
    background-color: #f8d7da;
}

/* AI推荐系统样式 */
.ai-recommendations {
    padding: 0;
}

.loading-recommendations {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #666;
    gap: 0.5rem;
}

.recommendation-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.recommendation-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.recommendation-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.recommendation-section h4 i {
    color: #007bff;
    font-size: 0.8rem;
}

.recommendation-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.recommendation-item:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateX(2px);
}

.recommendation-thumbnail {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}

.recommendation-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommendation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.recommendation-info {
    flex: 1;
    min-width: 0;
}

.recommendation-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-info p {
    margin: 0 0 0.25rem 0;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-stats {
    font-size: 0.7rem;
    color: #999;
}

.recommendation-trending {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.trending-item:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateX(2px);
}

.trending-tag {
    font-size: 0.8rem;
    color: #007bff;
    font-weight: 500;
}

.trending-count {
    font-size: 0.7rem;
    color: #666;
}

.default-recommendations {
    padding: 0;
}

/* 移动端推荐样式优化 */
@media (max-width: 768px) {
    .recommendation-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .recommendation-thumbnail {
        width: 50px;
        height: 35px;
    }
    
    .recommendation-avatar {
        width: 35px;
        height: 35px;
    }
    
    .recommendation-info h5 {
        font-size: 0.8rem;
    }
    
    .recommendation-info p {
        font-size: 0.7rem;
    }
    
    .trending-item {
        padding: 0.4rem 0.6rem;
    }
    
    .trending-tag {
        font-size: 0.75rem;
    }
    
    .trending-count {
        font-size: 0.65rem;
    }
    
    /* 强制显示Instagram轮播在移动端 */
    .post-images .instagram-carousel {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .post-images .instagram-carousel-container {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: 250px !important;
        width: 100% !important;
    }
    
    .post-images .instagram-carousel-track {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .post-images .instagram-carousel-slide {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 100% !important;
        height: 100% !important;
    }
    
    .post-images .instagram-carousel-slide img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* 移动端图片查看器优化 */
    .image-viewer {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0,0,0,0.95) !important;
        z-index: 10000 !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .image-viewer-content {
        position: relative !important;
        max-width: 95vw !important;
        max-height: 95vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .image-viewer .image-container {
        position: relative !important;
        max-width: 100% !important;
        max-height: 100% !important;
        text-align: center !important;
    }
    
    .image-viewer .image-container img {
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }
    
    .image-viewer .nav-btn {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: rgba(0,0,0,0.7) !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        cursor: pointer !important;
        z-index: 10 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .image-viewer .nav-btn.prev {
        left: 10px !important;
    }
    
    .image-viewer .nav-btn.next {
        right: 10px !important;
    }
    
    .image-viewer .image-counter {
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(0,0,0,0.7) !important;
        color: white !important;
        padding: 8px 16px !important;
        border-radius: 20px !important;
        font-size: 14px !important;
    }
}
