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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
}

.nav-link.active,
.nav-link:hover {
    background: #f3f4f6;
    color: #667eea;
}

/* 按钮样式 */
.login-btn,
.register-btn,
.publish-btn {
    padding: 8px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 14px;
}

.login-btn {
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.register-btn,
.publish-btn {
    background: #667eea;
    color: #fff;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-input {
    width: 200px;
    padding: 8px 16px;
    padding-right: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.2s;
    z-index: 200;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
}

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

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* 公告栏 */
.notice-bar {
    background: #fff8e7;
    border-bottom: 1px solid #e5e7eb;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
}

.notice-icon {
    color: #f59e0b;
}

.notice-list {
    display: flex;
    gap: 24px;
    overflow-x: auto;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #4b5563;
    font-size: 13px;
}

.notice-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.notice-tag.warning {
    background: #fef3c7;
    color: #d97706;
}

/* 三列布局 */
.row {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.sidebar-left,
.sidebar-right {
    width: 260px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
}

/* 侧边卡片 */
.side-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.side-title {
    padding: 14px 20px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    background: #fafbfc;
}

.quick-links a {
    display: block;
    padding: 10px 20px;
    color: #4b5563;
    text-decoration: none;
}

.quick-links a:hover {
    background: #f3f4f6;
}

/* 热门列表 */
.hot-tabs {
    display: flex;
    padding: 0 16px;
    border-bottom: 1px solid #f0f0f0;
}

.hot-tab {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #9ca3af;
}

.hot-tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.hot-items {
    padding: 8px 0;
}

.hot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
}

.hot-item:hover {
    background: #f9fafb;
}

.hot-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.rank-1 {
    background: #ef4444;
}

.rank-2 {
    background: #f97316;
}

.rank-3 {
    background: #f59e0b;
}

.hot-title {
    flex: 1;
    font-size: 13px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-views {
    font-size: 11px;
    color: #9ca3af;
}

/* 推荐用户 */
.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
}

.user-item:hover {
    background: #f9fafb;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.user-level {
    font-size: 11px;
    color: #9ca3af;
}

.vip-badge-sm {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    color: #fff;
}

/* 圈子列表 */
.section-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
}

.section-item:hover {
    background: #f9fafb;
}

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: #fff;
    font-size: 14px;
}

.section-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.section-desc {
    font-size: 11px;
    color: #9ca3af;
}

/* Feed标签 */
.feed-tabs {
    display: flex;
    gap: 8px;
    background: #fff;
    padding: 4px;
    border-radius: 40px;
    width: fit-content;
    margin-bottom: 20px;
}

.feed-tab {
    padding: 8px 24px;
    cursor: pointer;
    border-radius: 32px;
    font-size: 14px;
    color: #6b7280;
}

.feed-tab.active {
    background: #667eea;
    color: #fff;
}

/* 内容卡片 */
#feed-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 8px;
}

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

.user-screen-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
}

.level-icon {
    height: 20px;
    margin-left: 4px;
}

.card-time {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    padding: 0 20px 8px;
    text-decoration: none;
    display: block;
}

.card-title:hover {
    color: #667eea;
}

.card-content {
    padding: 0 20px 12px;
    color: #6b7280;
    font-size: 14px;
}

.card-images {
    padding: 0 20px;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.card-images img {
    width: calc(33.33% - 6px);
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.card-footer {
    display: flex;
    gap: 24px;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    color: #9ca3af;
    font-size: 13px;
}

.card-footer span {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.card-footer span:hover {
    color: #667eea;
}

/* 视频卡片 */
.video-cover {
    position: relative;
    padding: 0 20px;
    margin-bottom: 12px;
}

.video-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

/* 动态卡片 */
.space-text {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    padding: 0 20px 12px;
}

/* 加载状态 */
.loading-container {
    text-align: center;
    padding: 60px;
    color: #9ca3af;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

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

.load-more {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    cursor: pointer;
}

/* 右侧边栏统计 */
.stats-grid {
    display: flex;
    padding: 16px;
    gap: 12px;
}

.stat-item-side {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 11px;
    color: #9ca3af;
}

.notice-list-side {
    padding: 8px 0;
}

.notice-item-side {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
}

.notice-item-side:hover {
    background: #f9fafb;
}

.notice-dot {
    width: 6px;
    height: 6px;
    background: #667eea;
    border-radius: 50%;
}

.notice-text {
    font-size: 13px;
    color: #4b5563;
}

.friend-links {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
}

/* 页脚 */
.footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 24px 0;
    margin-top: 40px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* 回到顶部 */
.go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    transition: 0.2s;
    color: #667eea;
}

.go-top.visible {
    opacity: 1;
}

/* 响应式 */
@media (max-width: 1024px) {
    .sidebar-left,
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .container {
        padding: 0 16px;
    }
}