body, html {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #ffffff;
    color: #333333;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
header {
    background-color: rgba(255, 255, 255, 0.9);
    height: 45px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.header-nav li {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

.header-nav li a {
    text-decoration: none;
    color: #333333;
    font-weight: bold;
    transition: color 0.3s ease;
    font-size: 0.8em;
    display: flex;
    align-items: center;
}

.header-nav li a:hover {
    color: #9370DB;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.header-nav li:nth-child(1) {
    animation-delay: 0.2s;
}

.header-nav li:nth-child(2) {
    animation-delay: 0.4s;
}

.header-right {
    animation-delay: 0.4s;
}

.header-right img {
    height: 20px;
    width: auto;
}

/* main */
main {
    margin-top: 45px;
    flex: 1;
}

/* イントロ・見出し・コンテンツ */
.magazine-intro {
    text-align: center;
    margin-bottom: 50px;
}

.japanese-title {
    font-size: 1.2em;
    color: #666666;
    margin-bottom: 5px;
}

h1 {
    font-size: 3em;
    margin: 0 0 20px;
    color: #444444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    color: #000000;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.content-section ul {
    list-style-type: none;
    padding: 0;
}

.content-section li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.content-section li::before {
    content: '•';
    color: #9370DB;
    position: absolute;
    left: 0;
}

/* フリーペーパー一覧 */
.freepaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.freepaper-card {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.freepaper-card img {
    width: 100%;
    height: auto;
    display: block;
}

.freepaper-card:hover {
    transform: translateY(-5px);
}

.freepaper-card h3 {
    margin-top: 0;
    color: #333333;
}

.freepaper-card p {
    font-size: 0.9em;
    color: #666666;
}

.freepaper-card a {
    display: inline-block;
    margin-top: 10px;
    color: #9370DB;
    text-decoration: none;
    font-weight: bold;
}

/* 関連リンク */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.link-item {
    padding: 15px 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.link-item:last-child {
    border-bottom: none;
}

.link-item a {
    text-decoration: none;
    color: #333333;
    font-weight: bold;
    font-size: 1.1em;
}

.link-item a:hover {
    color: #9370DB;
}

.link-item p {
    margin: 5px 0 0;
    color: #666666;
    font-size: 0.9em;
}

/* クイズフォーム用スタイル */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question h2 {
    color: #000000;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
}

.option input[type="radio"] {
    margin-right: 10px;
}

.option label {
    font-size: 1em;
    color: #333333;
}

button[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    margin: 20px auto 0;
}

button[type="submit"]:hover {
    background-color: #45a049;
}

/* フッター */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

footer p {
    color: #666666;
    font-size: 0.9em;
    margin: 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2em;
    }

    .japanese-title {
        font-size: 1em;
    }

    .content-section h2 {
        font-size: 1.3em;
    }

    /* フリーペーパー一覧の横スクロール設定 */
    .freepaper-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .freepaper-card {
        flex: 0 0 80%;
        scroll-snap-align: start;
    }

    .freepaper-grid::-webkit-scrollbar {
        display: none;
    }
}
