/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 标题样式 */
.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 公告容器 - 列表视图 */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 公告卡片 */
.announcement-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #3b82f6;
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.announcement-card.latest {
    border-left-color: #10b981;
}

.announcement-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.announcement-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.announcement-card-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.announcement-card-preview {
    color: #4b5563;
    font-size: 0.875rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 公告容器 - 详情视图 */
.announcement-detail {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Markdown 样式 */
.announcement-detail h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.5rem;
}

.announcement-detail h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #1a1a1a;
}

.announcement-detail h3 {
    font-size: 1.25rem;
    margin: 1.25rem 0 0.75rem;
    color: #1a1a1a;
}

.announcement-detail p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.announcement-detail ul, 
.announcement-detail ol {
    margin: 1rem 0 1rem 1.5rem;
}

.announcement-detail li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.announcement-detail strong {
    font-weight: 600;
    color: #1a1a1a;
}

.announcement-detail em {
    font-style: italic;
}

.announcement-detail hr {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 1.5rem 0;
}

/* 按钮样式 */
.back-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #2563eb;
}

.list-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #6b7280;
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    transition: background-color 0.2s;
}

.list-button:hover {
    background-color: #4b5563;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .announcement-detail {
        padding: 1.5rem 1rem;
    }
    
    .announcement-card {
        padding: 1rem;
    }
}

/* 加载和错误状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
}