/* 平哥知识库 - 通用文章样式 */

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.8;
    color: #333;
    background-color: #fafafa;
}

/* 文章容器 */
article {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 1100px;
    margin: 0 auto;
}

/* 标题样式 */
h1 {
    font-size: 2em;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.5em;
    color: #34495e;
    margin-top: 30px;
    padding-left: 10px;
    border-left: 4px solid #3498db;
}

h3 {
    font-size: 1.2em;
    color: #555;
    margin-top: 25px;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 图片容器样式 */
.image-container {
    text-align: center;
    margin: 20px 0;
    width: 100%;
}

.image-container img {
    max-width: 100%;
    height: auto;
    margin: 5px auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8f4f8;
}

/* 代码块样式 */
pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid #3498db;
    font-size: 0.9em;
    line-height: 1.5;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.95em;
    color: #e74c3c;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #3498db;
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #555;
    font-style: italic;
}

blockquote p {
    margin: 0;
}

/* 元数据样式 */
.metadata {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #95a5a6;
}

.metadata p {
    margin: 5px 0;
}

.metadata a {
    word-break: break-all;
}

/* 水平线 */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* 列表样式 */
ul, ol {
    margin: 15px 0;
    padding-left: 25px;
}

li {
    margin: 8px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    article {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    h2 {
        font-size: 1.3em;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
        max-width: 100%;
    }
    
    article {
        box-shadow: none;
    }
    
    a {
        color: #333;
        text-decoration: underline;
    }
}

/* 海洋养殖页面样式 */
.container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
}

.info-list li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.gallery-item {
    text-align: center;
}

.gallery-item img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

.gallery-item p {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.source-info {
    background-color: #f0f4f8;
    padding: 20px;
    border-radius: 6px;
    margin-top: 40px;
}

.source-info h3 {
    margin-top: 0;
}

.source-list {
    list-style: none;
    padding: 0;
}

.source-list li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.source-list li:before {
    content: "▸";
    color: #3498db;
    position: absolute;
    left: 0;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-to-top:hover {
    background-color: #2980b9;
    text-decoration: none;
}

/* 图片放大模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}