/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* 模态框头部 */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

/* 模态框主体 */
.modal-body {
    padding: 1.5rem;
}

/* 表单样式 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 标签行样式 - 用于密码字段的标签和忘记密码链接 */
.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: #a0aec0;
}

/* 提交按钮 */
.form-submit {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-submit:hover {
    background-color: var(--primary-hover);
}

/* 认证链接区域 */
.auth-links {
    margin-top: 1rem;
}

/* 切换链接 */
.form-switch {
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
}

/* 注册模式中的form-switch需要额外的上间距以匹配登录模式 */
#register-step1 .form-switch {
    margin-top: 1rem;
}

.form-switch a {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.form-switch a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 忘记密码链接 - 新样式，位于密码标签右侧 */
.forgot-password-link {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 400;
}

.forgot-password-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 错误提示 */
.form-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* 加载状态 */
.form-submit.loading {
    position: relative;
    color: transparent;
}

.form-submit.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

/* 动画效果 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 验证步骤样式 */
.verification-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    background-color: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.info-icon i {
    font-size: 1.5rem;
}

.verification-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

.verification-info p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-muted {
    color: #999 !important;
    font-size: 0.8rem;
}

/* 验证码输入框样式 */
.verification-code {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    font-family: 'Courier New', monospace;
}

/* 验证操作区域 */
.verification-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.resend-section {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.back-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* 链接按钮样式 */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    font-size: inherit;
    transition: color 0.2s;
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-link:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

.btn-link i {
    margin-right: 0.25rem;
}

/* 响应式调整 */
#contact-modal .modal-content {
    max-width: 700px;
    min-height: 600px; /* 增加整体高度 */
}

#contact-modal .form-actions > * {
    flex: 1;
}

/* 邮件内容文本框高度增加 */
#contact-modal textarea {
    min-height: 260px;
    margin-bottom: 20px;
}
#contact-modal .form-actions .btn,
#contact-modal .form-actions .form-submit {
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .modal-content {
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }

    .verification-code {
        font-size: 1.1rem;
        letter-spacing: 0.3rem;
    }
    
    /* 小屏幕下的标签行调整 */
    .form-label-row {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .forgot-password-link {
        font-size: 0.75rem;
    }
} 