/* 1. 全体の土台 */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5; /* 背景は薄いグレー */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; 
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* 2. 外側の枠組み（透明なガイド役） */
.container {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* 3. 白いカード（ここを「浮かせ」直したぜ！） */
.form-box {
    background-color: #ffffff; /* 明確な白 */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); /* 影を少し強調 */
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    /* 長いタイトル対応 */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* index.html内の余計な打ち消し設定を上書き */
#main-body .container .form-box {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 40px;
    background-color: #ffffff;
}

/* 4. 見出し（折り返し対応） */
h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a1a1a;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
    font-size: 20px;
}

.description {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 5. 入力フォーム */
.input-group {
    margin-bottom: 16px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
}

/* 6. ボタン */
.btn, .login-btn {
    width: 100%;
    padding: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover { background-color: #0056b3; }
.btn:disabled { background-color: #ccc; }

/* 7. ステータスメッセージ */
.status-message {
    margin-top: 15px;
    font-size: 14px;
    word-wrap: break-word;
}

/* 8. フッターリンク */
.footer-links {
    margin-top: 24px;
    font-size: 13px;
}

.back-link {
    color: #007bff;
    text-decoration: none;
}

/* --- v1.45 追加: ローディングオーバーレイ --- */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 10px;
    font-size: 14px;
    color: #007bff;
    font-weight: bold;
}