body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}
#container {
    max-width: 960px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
h1 {
    color: #34495e;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}
.article-list {
    margin-top: 20px;
}
.article-item {
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    background-color: #fdfdfd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.article-item h2 {
    color: #3498db;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8em;
}
.article-item .meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}
.article-item .content {
    margin-bottom: 20px;
    line-height: 1.8;
    word-wrap: break-word; /* 長い単語の改行 */
}
.article-item .content p {
    margin-bottom: 1em;
}
/* 記事コンテンツ内の画像がブラウザ幅を超えないように調整 */
.article-item .content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}
.article-item .images {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.article-item .images img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.article-item .images h4 {
    width: 100%;
    margin-bottom: 5px;
    color: #555;
    font-size: 1.1em;
}
.pagination {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}
.pagination a:hover {
    background-color: #e9e9e9;
    color: #3498db;
}
.pagination .current {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}
.admin-link {
    text-align: right;
    margin-bottom: 20px;
    font-size: 0.9em;
}
.admin-link a {
    color: #2c3e50;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #ecf0f1;
}
.admin-link a:hover {
    background-color: #dde1e2;
}
.login-status {
    text-align: right;
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 画像のモーダル表示用スタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    margin: auto;
    display: inline-block;
    max-width: 90%;
    max-height: 90vh;
}

.modal img {
    max-width: 100%;
    max-height: 90vh;
    margin: 0 auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transform-origin: center;
    transition: transform 0.3s ease;
    /* スマホでのピンチズームを可能にする */
    touch-action: pinch-zoom;
    -webkit-overflow-scrolling: touch;
}

.close-button {
    position: absolute;
    top: -20px;
    right: -20px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.close-button:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* 画像をクリック可能に見せるスタイル */
.article-item .content img,
.article-item .images img,
.form-table img {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 4px;
}

.article-item .content img:hover,
.article-item .images img:hover,
.form-table img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* クリック時のフィードバック効果 */
.article-item .content img:active,
.article-item .images img:active,
.form-table img:active {
    transform: scale(0.98);
}

/* モーダル内の画像拡大・縮小コントロール */
.modal-controls {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 1002;
}

.zoom-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zoom-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* スマホ向け調整 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    #container {
        padding: 15px;
    }
    .article-item h2 {
        font-size: 1.5em;
    }
    .article-item .images {
        justify-content: center;
    }
    .article-item .images img {
        max-width: 100px;
    }
    .pagination a, .pagination span {
        padding: 8px 10px;
        margin: 0 3px;
    }
    .modal-content {
        max-width: 95%;
    }
    
    .close-button {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 24px;
    }
    
    /* スマホでタップした時のフィードバック */
    .article-item .content img,
    .article-item .images img,
    .form-table img {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    .zoom-button {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
@media (max-width: 480px) {
    .article-item .images img {
        max-width: 80px;
    }
}

/* CSV管理セクション */
.csv-management-section {
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.csv-management-section h2 {
    background-color: #f8f8f8;
    padding: 15px 20px;
    margin-top: 0;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #eee;
    color: #2c3e50;
}

.csv-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 20px;
}

.csv-controls label {
    font-weight: 600;
    color: #444;
    margin-right: 8px;
}

.csv-controls select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.csv-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-primary {
    background-color: #3498db;
    color: white;
}

.button-primary:hover {
    background-color: #2980b9;
}

.button-secondary {
    background-color: #e74c3c;
    color: white;
}

.button-secondary:hover {
    background-color: #c0392b;
}

/* 月別表示切替 */
.month-selector {
    margin: 20px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.month-selector form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.month-selector label {
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.month-selector select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.month-selector button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.month-selector button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 投稿記事数 */
.csv-file-counts {
    margin: 20px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.csv-file-counts h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.csv-file-counts ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.csv-file-counts li {
    padding: 12px 15px;
    border-radius: 6px;
    background-color: #f8f8f8;
    transition: all 0.3s ease;
}

.csv-file-counts li:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.csv-file-counts li a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: color 0.3s;
}

.csv-file-counts li a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.csv-file-counts li strong {
    color: #2c3e50;
    font-size: 16px;
    grid-column: 1 / -1;
    background-color: #e9f7fe;
    padding: 15px;
    border-radius: 6px;
    display: block;
    text-align: center;
}

/* シンプルな投稿記事数表示 */
.simple-stats {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.simple-stats p {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.simple-stats strong {
    color: #3498db;
    font-size: 18px;
    font-weight: 600;
} 