/* Basic認証画面のスタイル */

/* 認証オーバーレイ */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e60012 0%, #c5000f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: "Yu Gothic", "游ゴシック", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", sans-serif;
}

/* 認証コンテナ */
.auth-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 認証ヘッダー */
.auth-header {
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 32px;
    font-weight: bold;
    color: #e60012;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.auth-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
    font-weight: normal;
}

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

/* 認証フォーム */
.auth-form {
    margin-bottom: 25px;
}

.auth-field {
    margin-bottom: 20px;
    text-align: left;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.auth-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: #e60012;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

.auth-field input::placeholder {
    color: #999;
}

/* ログインボタン */
.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, #e60012 0%, #c5000f 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.auth-submit:hover {
    background: linear-gradient(135deg, #c5000f 0%, #a8000d 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.3);
}

.auth-submit:active {
    transform: translateY(0);
}

/* エラーメッセージ */
.auth-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #e53935;
    font-size: 14px;
    margin-top: 15px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


/* 認証フッター */
.auth-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* 認証済みユーザー情報 */
.auth-info {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-username {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.auth-logout {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-logout:hover {
    background-color: #545b62;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .auth-logo {
        font-size: 28px;
    }
    
    .auth-title {
        font-size: 18px;
    }
    
    
    .auth-info {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .auth-user {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 25px 15px;
        margin: 10px;
    }
    
    .auth-field input {
        font-size: 16px; /* iOSのズーム防止 */
    }
    
}

/* ロード時のアニメーション */
.auth-overlay.loading {
    opacity: 0;
    animation: fadeIn 0.3s ease-in forwards;
}

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

/* セキュリティ表示 */
.security-notice {
    background-color: #e8f5e8;
    border-left: 4px solid #4caf50;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    color: #2e7d32;
}

.security-notice strong {
    color: #1b5e20;
}

