body {
    background-color: black;
    color: #E3B250;
    font-family: serif;
    margin: 0;
    padding: 0;
}

a {
    color: #E3B250;
    text-decoration: none;
}

.font {
    color: #E3B250;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 10px 0px;
    background-color: black;
    color: #E3B250;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    flex: 1;
}

.header_contents {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 2;
}

.header_img {
    width: 100%;
    height: auto;
    margin-top: 100px;
}

.menu-toggle {
    display: none;
    /* PCでは非表示 */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 20px;
}

.menu-toggle:focus {
    outline: none;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #E3B250;
    border-radius: 2px;
}

/* トップページのエントリー */
.h_enter {
    text-align: center;
    margin: 40px auto;
}

.enter {
    font-size: 2.5em;
    font-family: serif;
    border: none;
    padding: 12px 30px;
    display: inline-block;
    background-color: #E3B250;
    color: rgba(0, 0, 0, 0.628);
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(227, 178, 80, 0.5);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.enter:hover,
.enter:focus {
    background-color: #FFC857;
    box-shadow: 0 6px 12px rgba(255, 200, 87, 0.7);
    color: black;
    outline: none;
}

@media screen and (max-width: 768px) {
    .enter {
        font-size: 1.4rem;
        padding: 10px 18px;
        border-radius: 6px;
    }
}

.time {
    font-size: 1.2rem;
    margin-top: 5px;
}

.article-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.counter {
    border: 1px solid #E3B250;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* 投稿記事 */
.article {
    background-color: #1c1c1c;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: #E3B250;
}

.article img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

/* レイアウト */
.content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 40px auto;
    gap: 20px;
    padding: 0 10px;
}

.add_main {
    flex: 1 1 100px;
    text-align: center;
}

.content_main {
    flex: 1 1 600px;
}

/* 投稿フォーム */
.form {
    background-color: #1c1c1c;
    color: #E3B250;
    border: 1px solid #E3B250;
    padding: 20px;
    border-radius: 8px;
    margin-top: 40px;
}

textarea,
input[type="text"],
input[type="file"] {
    width: 100%;
    margin-bottom: 10px;
}

input[type="submit"] {
    background-color: #E3B250;
    color: black;
    font-weight: bold;
    border: none;
    padding: 10px;
    cursor: pointer;
    width: 100%;
}

input[type="submit"]:hover {
    background-color: #d1a344;
}

/* お知らせ・説明文 */
.info {
    text-align: center;
    margin: 30px auto;
    max-width: 800px;
    padding: 0 10px;
}

/* エラーメッセージ */
.error {
    color: red;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

/* ページネーション */
.pagination {
    text-align: center;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    margin: 0 10px;
    color: #E3B250;
    text-decoration: none;
}

.pagination span {
    opacity: 0.6;
}

.center_text {
    text-align: center;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
    .header {
        height: auto;
        /* 固定高さ解除 */
        padding: 10px 20px;
        position: relative;
    }

    .header_contents {
        display: none;
        /* デフォルトは非表示 */
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        gap: 10px;
        background-color: black;
        border-top: 1px solid #E3B250;
        padding-top: 10px;
    }

    .header_contents.show {
        display: flex;
        /* メニュー展開時に表示 */
    }

    .menu-toggle {
        display: flex;
        /* スマホで表示 */
    }

    .logo {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .content {
        flex-direction: column;
        padding: 0 10px;
    }

    .content_main,
    .add_main {
        width: 100%;
    }

    .form {
        margin: 20px 0;
    }

    .h_enter {
        padding: 0 10px;
    }
}

/* ここからアフィリエイトページ */
.affiliate-container {
    padding: 40px 20px;
    max-width: 1000px;
    margin: auto;
}

.category {
    margin-bottom: 50px;
}

.category h2 {
    border-bottom: 2px solid #E3B250;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.item-card {
    background-color: #1c1c1c;
    border: 1px solid #E3B250;
    border-radius: 10px;
    padding: 15px;
    width: 200px;
    text-align: center;
}

.item-card img {
    max-width: 100%;
    border-radius: 8px;
}

.item-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.buy-button {
    display: inline-block;
    margin-top: 10px;
    background-color: #E3B250;
    color: black;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.buy-button:hover {
    background-color: #ffc857;
}

.affiliate-index {
    text-align: center;
    margin: 20px 0 40px;
}

.affiliate-index ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.affiliate-index li a {
    color: #E3B250;
    border: 1px solid #E3B250;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.affiliate-index li a:hover {
    background-color: #E3B250;
    color: black;
}