/**
 * ZenAuth 认证系统样式
 */

/* 基础模态框样式 */
.zen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zen-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.zen-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    z-index: 1;
}

.zen-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.zen-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #2c2c2c;
}

.zen-modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.zen-modal-close:hover {
    background: #f8f9fa;
    color: #2c2c2c;
}

.zen-modal-body {
    padding: 24px;
}

/* 表单样式 */
.zen-form-group {
    margin-bottom: 20px;
}

.zen-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.zen-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    background: white;
    color: #2c2c2c;
}

.zen-input::placeholder {
    color: #adb5bd;
}

.zen-text-muted {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: block;
}

.zen-text-muted small {
    display: block;
    margin-top: 6px;
}

/* 按钮样式 */
.zen-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.zen-btn-primary {
    background: #667eea;
    color: white;
}

.zen-btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.zen-btn-primary:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.zen-btn-text {
    background: transparent;
    color: #667eea;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.zen-btn-text:hover:not(:disabled) {
    color: #5568d3;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.zen-btn-text:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* 错误消息 */
.zen-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
}

/* 认证模态框特殊样式 */
.zen-auth-modal .zen-modal-content {
    max-width: 450px;
}

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

/* 认证步骤 */
.auth-step {
    animation: fadeIn 0.3s ease-in-out;
}

/* 邮箱显示区域 */
.auth-email-display {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: #495057;
}

.auth-email-display strong {
    color: #667eea;
    margin: 0 5px;
}

/* 重新发送按钮 */
.auth-resend {
    text-align: center;
    margin-top: 15px;
}

.auth-resend button:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* 按钮块级样式 */
.zen-btn-block {
    width: 100%;
    display: block;
}

/* 成功消息 */
.zen-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
}

/* 倒计时样式 */
#auth-countdown {
    font-weight: bold;
    color: #667eea;
}

/* 输入框聚焦状态 */
.zen-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    color: #000000;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式 */
@media (max-width: 500px) {
    .zen-auth-modal .zen-modal-content {
        max-width: 95%;
        margin: 20px auto;
    }
}
