body {
    font-family: 'Times New Roman', serif;
    margin: 0;
    padding: 20px;
    background: #f4f4f4;
}
.newspaper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
}
.headline {
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.footer {
    text-align: center;
    font-size: 12px;
    border-top: 1px solid #000;
    padding-top: 20px;
}

/* スタイル for 記事一覧ページ */
.article-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.article-list .item {
    background: #f9f9f9;
    padding: 10px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.article-list .item:hover {
    transform: translateY(-5px);
}
.article-list img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}
.article-list li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    display: block;
}
.article-list li a:hover {
    text-decoration: underline;
}

/* スタイル for 記事詳細ページ */
.article-content {
    font-size: 16px;
    text-align: justify;
    line-height: 1.6;
}
.article-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .newspaper {
        padding: 10px;
    }
    .headline {
        font-size: 18px;
    }
    .article-list li a,
    .article-content {
        font-size: 14px;
    }
}



.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.headline-container,
.button-container {
    flex: 1; /* 同じ割合でコンテナの幅を設定 */
    padding: 10px; /* パディングを追加 */
}

.button-container {
    display: flex;
    justify-content: flex-end; /* ボタンを右端に配置 */
}

.headline {
    margin-bottom: 0; /* 見出しの下マージンを削除、必要に応じて調整 */
}

.create-article-button {
    padding: 8px 16px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.create-article-button:hover {
    background-color: #0056b3;
}


.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"], select {
    width: calc(100% - 16px); /* 全体の幅からパディング分を引く */
    padding: 8px;
    margin-bottom: 10px;
    box-sizing: border-box; /* ボックスサイズを境界線とパディングを含むものに設定 */
}
input[id="character"] {
    width: calc(100% - 145px);
}

.submit-button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.submit-button:hover {
    background-color: #0056b3;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.flash-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center; /* コンテンツを中央に配置 */
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 10px 20px;
    border: 1px solid #bee5eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.flash-message-text { /* メッセージテキスト用のクラス */
    flex-grow: 1; /* 利用可能なスペースをすべて使用 */
    text-align: center;
}

.close-button {
    padding: 0 10px;
    margin-left: auto; /* ボタンを右端に押し出す */
    background: none;
    border: none;
    color: #0c5460;
    font-size: 24px;
    cursor: pointer;
}

.close-button:hover {
    color: #007bff;
}

.publish-button-container {
    text-align: center;
    margin: 20px 0;
}

.publish-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.publish-button:hover {
    background-color: #45a049;
}



/**/
.back-button {
    display: inline-block;
    margin-right: 20px;
    padding: 8px 15px;
    font-size: 16px;
    color: white;
    background-color: #007bff;
    border: 1px solid #0056b3;
    text-decoration: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
}

.back-button:hover, .back-button:focus {
    background-color: #0056b3;
    border-color: #004085;
    text-decoration: none;
}

.site-header {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content {
    padding: 20px;
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        padding: 10px;
    }

    .back-button {
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 待機用ページ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;  /* ビューポートの高さに合わせてコンテナを中央に配置 */
    text-align: center;
}

.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1 {
    font-size: 24px;
    color: #333;
}

p {
    font-size: 16px;
    color: #666;
}

.progress-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.progress-step {
    padding: 10px 20px;
    background-color: #ddd;
    color: #666;
    border-radius: 5px;
    margin: 0 5px;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}

@keyframes blink {
    0%, 100% {
        background-color: #34d5db;
    }
    50% {
        background-color: #2980b9;
    }
}
.progress-step.active {
    animation: blink 2.5s linear infinite; /* 1秒間隔で無限に点滅 */
    color: white; /* アクティブステップのテキスト色を白に */
}

.progress-step.complete {
    background-color: #2ecc71;
    color: white;
    font-weight: bold;
}
