/* ======= すべての要素のデフォルト設定 ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* ✅ ページ全体のデザイン */
body {
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    transition: background 0.3s, color 0.3s;
}

/* ✅ ダークモード */
.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

/* ✅ ナビゲーションバー */
.navbar {
    background-color: #0056b3;
    color: white;
    padding: 15px 0;
    width: 100%;
}

/* ✅ ナビゲーションコンテナ */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
}

/* ✅ ロゴ */
.logo {
    font-size: 20px;
    font-weight: bold;
}

/* ✅ ナビゲーションメニュー (横並び) */
.nav-links {
    list-style: none;
    display: flex; /* 横並びにする */
    gap: 15px;
    padding: 0;
    margin: 0;
}

/* ✅ 各メニューの間隔 */
.nav-links li {
    display: inline-block;
}

/* ✅ リンクのスタイル */
.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    padding: 8px 15px;
    transition: 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* ✅ モバイル用のメニューアイコン */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* ✅ メインコンテンツ */
.container {
    max-width: 700px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* ✅ ダークモードのコンテンツ */
.dark-mode .container {
    background: #1e1e1e;
}

/* ✅ お知らせボックス（枠付き） */
.oshirase-box {
    background: #ffffff;
    border: 2px solid #0056b3;
    padding: 15px;
    margin: 15px auto;
    border-radius: 8px;
    text-align: left;
    max-width: 700px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* ✅ ダークモードの枠 */
.dark-mode .oshirase-box {
    background: #1e1e1e;
    border: 2px solid #4caf50;
    color: white;
}

/* ✅ お知らせのタイトル */
.oshirase-box h3 {
    font-size: 20px;
    color: #0056b3;
    margin-bottom: 10px;
}

/* ✅ ダークモードのタイトル */
.dark-mode .oshirase-box h3 {
    color: #4caf50;
}

/* ✅ お知らせの内容 */
.oshirase-box p {
    font-size: 16px;
    line-height: 1.6;
}

/* ✅ 投稿者と日付 */
.oshirase-box .date {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: gray;
}

/* ✅ ダークモードの投稿者と日付 */
.dark-mode .oshirase-box .date {
    color: #cccccc;
}

/* ✅ ボタンデザイン */
button {
    padding: 12px;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* ✅ ダークモードのボタン */
.dark-mode button {
    background-color: #4caf50;
}

.dark-mode button:hover {
    background-color: #45a049;
}

/* ✅ 削除ボタン */
.delete {
    background-color: #dc3545;
}

.delete:hover {
    background-color: #c82333;
}

/* ✅ フォームのデザイン */
.oshirase-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

/* ✅ 入力欄のデザイン */
.oshirase-form input, .oshirase-form textarea {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ✅ テキストエリアのサイズを調整 */
.oshirase-form textarea {
    min-height: 200px;
    resize: vertical;
}

/* ✅ ダークモードの入力欄 */
.dark-mode .oshirase-form input,
.dark-mode .oshirase-form textarea {
    background: #333;
    color: white;
    border: 1px solid #555;
}

/* ✅ スマホ対応 (768px以下の幅のとき) */
@media screen and (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #0056b3;
        text-align: center;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        padding: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    .container {
        max-width: 90%;
    }

    .oshirase-box {
        max-width: 90%;
        padding: 12px;
    }

    button {
        width: 100%;
    }
}
