/* 認証モーダルスタイル */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: var(--bg-color, #ffffff);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-color, #333333);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.auth-modal-close:hover {
    color: var(--primary-color, #007bff);
}

.auth-modal-header {
    margin-bottom: 24px;
    text-align: center;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color, #333333);
}

.auth-modal-body {
    margin-bottom: 16px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color, #333333);
}

.auth-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 16px;
    background: var(--input-bg, #ffffff);
    color: var(--text-color, #333333);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
}

.auth-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary, #666666);
}

.auth-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #fcc;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color, #007bff);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--primary-hover, #0056b3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-modal-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.auth-modal-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, #666666);
}

.auth-modal-footer a {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    font-weight: 500;
}

.auth-modal-footer a:hover {
    text-decoration: underline;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .auth-modal-content {
        background: var(--bg-color, #1a1a1a);
        color: var(--text-color, #ffffff);
    }
    
    .auth-form-group input {
        background: var(--input-bg, #2a2a2a);
        border-color: var(--border-color, #404040);
        color: var(--text-color, #ffffff);
    }
    
    .auth-error {
        background: #3a1a1a;
        border-color: #5a2a2a;
    }
}

