/* === 全体的なスタイル === */
html, body {
    height: 100%; /* 確保 body 撐滿整個視窗 */
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

body {
    font-family: sans-serif;
    line-height: 1.6;

    /* 使用 Flexbox 排版，讓 footer 自動推到底部 */
    display: flex;
    flex-direction: column;
}

/* === レイアウト要素 === */
header, footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

main {
    max-width: 800px;
    width: 90%;
    margin: 0 auto; /* 水平置中 */
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;

    /* 撐滿剩餘空間，推 footer 到底部 */
    flex: 1 0 auto;
}

/* === フッター固定到頁面底部 === */
footer {
    flex-shrink: 0; /* 不縮小 */
}

/* === テキストとリンク === */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === ホームページの投稿リスト === */
.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* === 記事内のコード表示用スタイル === */
pre {
    background-color: #2d2d2d;
    color: #f1f1f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    font-family: "Courier New", Courier, monospace;
}
