/* ====================================================
   Base: 全体共通
==================================================== */
body {
    font-family: "Helvetica Neue", sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

img {
    max-width: 80%;
    height: auto;
    max-height: 500px;
    display: block;
    padding: auto 100px;
    border: 1px solid #ccc;
}

.main-title {
    text-align: center;
}

/* ====================================================
   Utility: 汎用クラス
==================================================== */
.text-center {
    text-align: center;
}

.text-center code {
    background-color: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}


.mt-20 {
    margin-top: 20px;
}

.button {
    background-color: #2a3349;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #1c2233;
}

.wide-button {
    display: inline-block;
    width: 200px;   /* 任意の幅。お好みで調整してください */
    text-align: center;
}

.card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px 25px;
    margin: 30px auto;         /* ← ここを auto 中央寄せに */
    max-width: 800px;          /* ← 画面が広くても最大幅を制限 */
    width: 90%;                /* ← モバイルでも見切れないように */
}

.card h3 {
    margin-bottom: 20px;
    color: #2a3349;
}

.card form input[type="email"],
.card form input[type="password"] {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

/* ====================================================
   Header / Navbar
==================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a3349;
    color: white;
    padding: 10px 20px;
}

.nav-logo {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-user {
    margin-right: 10px;
    font-size: 14px;
    color: #fff;
}

.userlogout {
    float: right;
}

/* ====================================================
   Home Page
==================================================== */
.login-card {
    width: 320px;
    margin: 30px auto;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px 25px;
    text-align: center;
}

.login-card h3 {
    margin-bottom: 20px;
    color: #2a3349;
}

.login-card form input[type="email"],
.login-card form input[type="password"] {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.login-card form button {
    width: 95%;
    padding: 10px;
    background-color: #2a3349;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.login-card form button:hover {
    background-color: #1c2233;
}

.login-register-link {
    margin-top: 15px;
    font-size: 14px;
}

.login-register-link a {
    color: #3498db;
    text-decoration: none;
}

.login-register-link a:hover {
    text-decoration: underline;
}

.login-error {
    color: red;
    margin-top: 10px;
}

/* ====================================================
   Course Lessons Page
==================================================== */
.course-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.course-list li {
    width: 200px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    padding: 20px;
    list-style: none;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.course-list li img {
    height: 100px;
    margin: 0 auto 10px;
    display: block;
    border: none;
}

.course-list a {
    text-decoration: none;
    color: #000;
    display: block;
    margin-top: 10px;
    text-align: center;
}

.course-list a:hover {
    color: #3498db;
}

.course-list li h3 {
    color: #2a3349;
}

.course-list li p {
    text-align: left;
}

.map-image {
    max-width: 90%;
    height: auto;
    margin: 20px auto;
    display: block;
    border: 1px solid #ccc;
}
/* ====================================================
   Responsive (スマホ・タブレット対応)
==================================================== */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .login-card,
    .card {
        width: 90%;
        padding: 20px;
    }

    .course-list {
        flex-direction: column;
        align-items: center;
    }

    .course-list li {
        width: 90%;
        max-width: 400px;
    }

    .button {
        width: 100%;
        text-align: center;
    }
}
