/* ========================================
   全体設定
======================================== */

body {
    background-color: #fafafa;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.8;
}

#container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   ヘッダー
======================================== */

#blog-title {
    background-color: #fff;
    padding: 20px 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-bottom: 4px solid #3498db;
}

#title a {
    color: #2c3e50;
    font-weight: 700;
    font-size: 32px;
    text-decoration: none;
}

#blog-description {
    color: #7f8c8d;
    font-size: 15px;
    margin-top: 12px;
}

/* ========================================
   2カラムレイアウト
======================================== */

#content,
#wrapper,
.page-entry #content-inner,
.page-archive #content-inner,
.page-index #content-inner {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#main {
    flex: 1;
    min-width: 0;
}

#box2 {
    width: 320px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    #content,
    #wrapper,
    .page-entry #content-inner,
    .page-archive #content-inner,
    .page-index #content-inner {
        flex-direction: column;
    }
    
    #box2 {
        width: 100%;
    }
}

/* ========================================
   記事一覧
======================================== */

.archive-entry {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-left: 5px solid #3498db;
    transition: all 0.3s;
}

.archive-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.entry-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
}

.entry-title a {
    color: #2c3e50;
    text-decoration: none;
}

.entry-title a:hover {
    color: #3498db;
}

.entry-description {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.entry-see-more a {
    background-color: #3498db;
    color: #fff;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s;
}

.entry-see-more a:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 記事一覧やカテゴリ一覧の日付を消す */
.date.archive-date,
.date.entry-date.first {
    display: none;
}

.categories {
    margin-bottom: 10px;
}

.categories a {
    background-color: #ecf0f1;
    color: #555;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
    display: inline-block;
    transition: all 0.3s;
}

.categories a:hover {
    background-color: #3498db;
    color: #fff;
}

/* ========================================
   記事本文
======================================== */

.entry-content {
    background-color: #fff;
    padding: 45px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* 見出し */
.entry-content h2 {
    font-size: 26px;
    font-weight: 700;
    padding: 15px 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 5px;
    margin: 40px -20px 20px;
}

.entry-content h3 {
    font-size: 22px;
    font-weight: 700;
    padding-left: 15px;
    border-left: 5px solid #3498db;
    color: #2c3e50;
    margin: 40px 0 20px;
}

.entry-content h4 {
    font-size: 18px;
    font-weight: 700;
    color: #555;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
    margin: 40px 0 20px;
}

/* 段落とリスト */
.entry-content p {
    margin-bottom: 20px;
    line-height: 1.9;
    font-size: 16px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 25px;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.entry-content ul li::marker {
    color: #3498db;
}

/* テーブル */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.entry-content table th {
    background-color: #3498db;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.entry-content table td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.entry-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.entry-content table tr:hover {
    background-color: #e8f4f8;
}

/* 引用 */
.entry-content blockquote {
    border-left: 5px solid #3498db;
    padding: 20px 25px;
    margin: 25px 0;
    background-color: #f0f8ff;
    border-radius: 5px;
    font-style: italic;
    color: #555;
}

/* コード */
.entry-content code {
    background-color: #ffeaa7;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #d63031;
}

.entry-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 25px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 25px;
}

.entry-content pre code {
    background-color: transparent;
    color: #ecf0f1;
    padding: 0;
}

/* 画像 */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 25px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 強調 */
.entry-content strong,
.entry-content b {
    color: #2c3e50;
    font-weight: 700;
    background: linear-gradient(transparent 60%, #fff59d 60%);
}

/* ========================================
   目次
======================================== */

/* 目次を初期状態で非表示にする */
.table-of-contents {
    display: none;
}

/* ========================================
   サイドバー
======================================== */

.hatena-module {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.hatena-module-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #3498db;
}

.hatena-module-body ul {
    list-style: none;
    padding: 0;
}

.hatena-module-body li {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.hatena-module-body li:last-child {
    border-bottom: none;
}

.hatena-module-body a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.hatena-module-body a:hover {
    color: #3498db;
}

/* ========================================
   フッター
======================================== */

#footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
    border-radius: 8px;
}

#footer a {
    color: #3498db;
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}

/* ========================================
   レスポンシブ（スマホ）
======================================== */

@media (max-width: 768px) {
    /* 全体のフォントサイズを大きく */
    body {
        font-size: 17px !important;
    }
    
    /* ヘッダー */
    #blog-title {
        padding: 15px 15px !important;
    }
    
    #title a {
        font-size: 28px !important;
    }
    
    #blog-description {
        font-size: 15px !important;
    }
    
    /* 記事一覧 */
    .archive-entry {
        padding: 15px !important;
    }
    
    .entry-title {
        font-size: 22px !important;
    }
    
    .entry-description {
        font-size: 17px !important;
    }
    
    .entry-see-more a {
        font-size: 16px !important;
        padding: 10px 20px !important;
    }
    
    .categories a {
        font-size: 14px !important;
    }
    
    /* 記事本文 */
    .entry-content {
        padding: 20px !important;
    }
    
    .entry-content p {
        font-size: 18px !important;
        line-height: 1.9 !important;
    }
    
    .entry-content li {
        font-size: 18px !important;
        line-height: 1.9 !important;
    }
    
    .entry-content h2 {
        font-size: 26px !important;
        padding: 12px 15px !important;
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    
    .entry-content h3 {
        font-size: 22px !important;
    }
    
    .entry-content h4 {
        font-size: 20px !important;
    }
    
    .entry-content code {
        font-size: 16px !important;
    }
    
    .entry-content blockquote {
        font-size: 17px !important;
        padding: 15px 20px !important;
    }
    
    /* テーブル */
    .entry-content table {
        font-size: 16px !important;
    }
    
    .entry-content table th,
    .entry-content table td {
        padding: 12px 10px !important;
        font-size: 16px !important;
    }
    
    /* サイドバー */
    .hatena-module {
        padding: 20px !important;
    }
    
    .hatena-module-title {
        font-size: 20px !important;
    }
    
    .hatena-module-body a {
        font-size: 17px !important;
    }
    
    /* フッター */
    #footer {
        font-size: 15px !important;
    }
}