/* 全体スタイル */
body {
    font-family: 'Arial', sans-serif;
    background-color: #FAFAFA;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* ヘッダー */
header {
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* メインコンテンツ */
main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 横方向の中央揃え */
    justify-content: center; /* **縦方向の中央揃え** */
    min-height: calc(100vh - 120px); /* ヘッダーとフッターの高さを考慮 */
    padding-top: 50px; /* ヘッダーとの間に隙間を確保 */
    padding-bottom: 50px; /* フッターとの間に隙間を確保 */
}

/* コンテナ */
.login-container {
    display: flex;
    width: 90%;
    max-width: 900px;
    background: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin: 50px auto; /* 上下の隙間を確実に開ける */
}

/* 左側: ログインフォーム */
.login-form {
    flex: 1;
    padding: 40px;
    text-align: center;
}

.login-form h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #4CAF50;
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* エラーメッセージ */
.error-message {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
}

/* 入力フィールド */
.input-group {
    margin-bottom: 15px;
    text-align: left;
}

.input-group label {
    font-size: 14px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border 0.3s;
}

.input-group input:focus {
    border: 2px solid #4CAF50;
}

/* ログインボタン */
.login-btn {
    width: 100%;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #388E3C;
}

/* サインアップリンク */
.signup-link {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

.signup-link a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

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

/* 右側: ログイン画像 */
.login-image {
    flex: 1;
    background: #E8F5E9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-image img {
    width: 100%;
    max-width: 350px;
}

/* フッター */
footer {
    width: 100%;
    background: #4CAF50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

/* **レスポンシブ対応** */
@media screen and (max-width: 768px) {
    .login-container {
        flex-direction: column;
        width: 90%;
        margin-top: 50px; /* スマホ版でも適切な余白を確保 */
        margin-bottom: 50px;
    }

    .login-image {
        display: none;
    }
}
