/* 基本設定 */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* 全体の外枠 */
.container {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    max-width: 1250px; 
    margin: 0 auto;
    padding: 20px;
    gap: 20px; 
}

/* メイン画面（左側） */
#main-content {
    flex: 0 1 800px; 
    min-width: 320px; 
    background: white;
    padding: 25px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* サブ画面（右側） */
#sub-content {
    flex: 0 0 300px; 
    background: #fdfdfd;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    height: fit-content; 
    border-radius: 8px;
}

/* --- 追加：トップページ ログインボタンのスタイル --- */
#pw-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* リンクをボタンのように見せる設定 */
.login-button {
    display: block;
    width: 100%;
    padding: 12px 0;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    box-sizing: border-box;
}

.login-button:hover {
    background-color: #34495e;
    color: #fff;
}

/* --- 追加：会員ページ ログアウト/戻るリンク --- */
.back-link {
    display: inline-block;
    text-decoration: none;
    color: #666;
    font-size: 0.85em;
    margin-bottom: 10px;
}
.back-link:hover {
    text-decoration: underline;
}

/* 携帯用：画面幅が一定（約1024px）以下になったら縦に並べる */
@media (max-width: 1024px) {
    .container {
        flex-direction: column; 
        align-items: center;
    }
    
    #main-content, #sub-content {
        flex: 1 1 100%; 
        max-width: 100%; 
    }

    #sub-content {
        order: 2; 
    }
}

/* ナビゲーションボタン */
.nav-menu {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 2px; /* ボタン同士の隙間 */
}

.nav-menu button {
    flex: 1;
    padding: 10px 5px; /* 左右パディングを少し削る */
    cursor: pointer;
    background-color: #2c3e50;
    color: white;
    border: 1px solid #fff;
    font-size: 0.9em;
}

/* スマホ等でナビボタンが窮屈な場合の調整 */
@media (max-width: 480px) {
    .nav-menu {
        flex-wrap: wrap; /* 2列にする */
    }
    .nav-menu button {
        flex: 0 0 48%; /* ほぼ半分 */
        margin-bottom: 5px;
    }
}

.nav-menu button:hover {
    background-color: #34495e;
}

/* テーブルスタイル */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.9em;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 8px;
    text-align: center;
}

/* 画像並び */
.photo-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.photo-grid img {
    width: 32%; /* 3枚並びに合わせて微調整 */
    height: auto;
}

.sub-photo {
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

/* レスポンシブ画像の設定 */
.responsive-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* リンク全般の装飾 */
.link {
    color: #2980b9;
    text-decoration: none;
}
.link:hover {
    text-decoration: underline;
}
