<?php
// 这个文件是CSS文件，不需要PHP标签
header('Content-Type: text/css');
?>
/* 前台样式 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 文章内容区域 */
.content {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: normal;
    font-size: 1.1rem;
    line-height: 1.8;
}

.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content p {
    margin-bottom: 1.5rem;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.content a {
    color: #007bff;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.content blockquote {
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.content table th,
.content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 语音播放控件 */
.audio-controls {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.audio-controls button {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.audio-controls button:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.audio-controls button:disabled {
    background: rgba(255,255,255,0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

/* 分享按钮 */
.share-buttons {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.share-btn {
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.share-btn.weibo:hover {
    background: #e6162d !important;
}

.share-btn.qzone:hover {
    background: #ffce00 !important;
    color: #333 !important;
}

.share-btn.toutiao:hover {
    background: #ff6a00 !important;
}

/* 评论区域 */
.comments {
    margin: 40px 0;
}

.comment {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 3px solid #007bff;
}

.comment strong {
    color: #007bff;
    font-size: 1.1rem;
}

.comment small {
    color: #6c757d;
    margin-left: 10px;
}

.comment p {
    margin: 10px 0 0;
    line-height: 1.6;
}

/* 密码保护页面 */
.password-protect {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.password-protect h2 {
    margin-bottom: 20px;
    color: #333;
}

.password-protect .error {
    color: #dc3545;
    margin: 10px 0;
    padding: 10px;
    background: #f8d7da;
    border-radius: 5px;
}

.password-protect input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.password-protect button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.password-protect button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 文章卡片 */
.card {
    transition: all 0.3s;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* 分页 */
.pagination {
    margin: 30px 0;
}

.pagination .page-link {
    border: none;
    margin: 0 5px;
    border-radius: 8px;
    color: #007bff;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content {
        font-size: 1rem;
    }
    
    .audio-controls {
        flex-direction: column;
    }
    
    .audio-controls button {
        width: 100%;
    }
    
    .password-protect {
        margin: 20px;
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .comment, .password-protect {
    animation: fadeIn 0.5s ease;
}

/* 确保footer始终在底部 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto !important;
}

/* 修复可能的空白 */
.container-fluid, .container {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* 确保背景色填满 */
.bg-dark {
    background-color: #343a40 !important;
}

/* 友情链接样式 */
footer .list-unstyled li a:hover {
    color: white !important;
    text-decoration: underline !important;
}

footer img {
    transition: transform 0.3s;
}

footer img:hover {
    transform: scale(1.1);
}

/* 社交图标 */
footer .fab {
    transition: all 0.3s;
}

footer .fab:hover {
    transform: translateY(-3px);
    color: white;
}