/* ========================================
   校园论坛 - 辅助样式
   ======================================== */

/* 布局 */
.layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

/* 页面标题 */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-family: 'Source Serif 4', serif;
    font-size: 32px;
    font-weight: 700;
    color: #191b25;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-desc {
    font-size: 16px;
    color: #434656;
    margin-top: 8px;
}

/* 分类标签 */
.categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    color: #434656;
    border: 1px solid #E1E1EF;
    text-decoration: none;
    transition: all 0.2s;
}

.category-tag:hover,
.category-tag.active {
    background: #0041c8;
    color: white;
    border-color: #0041c8;
}

/* 帖子列表 */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #E1E1EF;
    border-radius: 16px;
    overflow: hidden;
}

.post-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: white;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    cursor: pointer;
}

.post-item:hover {
    background: rgba(0, 85, 255, 0.03);
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #0041c8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-family: 'Source Serif 4', serif;
    font-size: 16px;
    font-weight: 600;
    color: #191b25;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.post-excerpt {
    font-size: 14px;
    color: #434656;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
    color: #737688;
}

.post-category {
    padding: 3px 10px;
    background: rgba(0, 85, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #0041c8;
}

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

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E1E1EF;
    padding: 20px;
}

.sidebar-title {
    font-family: 'Source Serif 4', serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #191b25;
}

.sidebar-text {
    font-size: 14px;
    color: #434656;
    line-height: 1.6;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 12px;
}

.stat-number {
    font-family: 'Source Serif 4', serif;
    font-size: 24px;
    font-weight: 700;
    color: #191b25;
}

.stat-label {
    font-size: 12px;
    color: #737688;
    margin-top: 4px;
}

/* 评论区 */
.cmt-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #EDEDFB;
}

.cmt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0041c8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.cmt-name {
    font-size: 14px;
    font-weight: 500;
    color: #191b25;
    margin-bottom: 4px;
}

.cmt-text {
    font-size: 14px;
    color: #434656;
    line-height: 1.5;
}

.cmt-footer {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: #737688;
}

.cmt-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #737688;
    font-family: inherit;
}

.cmt-btn:hover {
    color: #0041c8;
}

/* 公告 */
.announcements-container {
    margin-bottom: 24px;
}

.announcement-item {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(50px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    box-shadow: 0 0 0 0.5px rgba(255,255,255,0.6) inset, 0 0 0 1px rgba(0,0,0,0.03), 0 4px 20px rgba(0,0,0,0.08);
}

.announcement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.announcement-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.announcement-content { flex: 1; }
.announcement-title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.announcement-text { font-size: 13px; color: #434656; }
.announcement-time { font-size: 12px; color: #737688; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #0041c8;
    color: white;
}

.btn-primary:hover {
    background: #0033aa;
}

.btn-secondary {
    background: transparent;
    color: #0041c8;
    border: 1px solid #0041c8;
}

.btn-secondary:hover {
    background: rgba(0, 85, 255, 0.05);
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

/* 标签 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: rgba(22, 163, 74, 0.1); color: #16A34A; }
.badge-danger { background: rgba(220, 38, 38, 0.1); color: #DC2626; }
.badge-warning { background: rgba(234, 88, 12, 0.1); color: #EA580C; }

/* 提示框 */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
}

.alert-success {
    background: rgba(22, 163, 74, 0.1);
    color: #16A34A;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: #DC2626;
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E1E1EF;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #191b25;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #0041c8;
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.05);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #E1E1EF;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.search-input:focus {
    border-color: #0041c8;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #434656;
    text-decoration: none;
    border: 1px solid #E1E1EF;
}

.pagination .current {
    background: #0041c8;
    color: white;
    border-color: #0041c8;
}

/* 响应式 */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .post-item {
        padding: 16px;
    }
}
