/* Custom Modal Dialog Styles for Tenchi V2 */
@keyframes customModalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes customOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    animation: customOverlayFadeIn 0.2s ease-out forwards;
}

.custom-dialog-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 100000;
    padding: 28px 24px;
    font-family: 'Inter', 'Outfit', 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    animation: customModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ダークモードBadgeを検出したページ、または全体ダークモードに対応 */
.login-page .custom-dialog-box,
body.login-page .custom-dialog-box {
    background: rgba(255, 255, 255, 0.98);
    color: #1e293b;
}

.custom-dialog-content {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 24px;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-all;
}

.custom-dialog-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.custom-dialog-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    box-sizing: border-box;
}

.custom-dialog-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.2), 0 2px 4px -1px rgba(118, 75, 162, 0.1);
}

.custom-dialog-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.custom-dialog-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.custom-dialog-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}
