/**
 * 登录/注册弹窗样式
 * 
 * @package wwone
 * @author 吴畏的博客
 * @version 1.0.0
 * @link https://8ww.fun
 */

/* ==================== 弹窗遮罩层 ==================== */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ==================== 弹窗容器 ==================== */
.auth-modal-container {
    position: relative;
    width: 90%;
    max-width: 420px;
    perspective: 1200px;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.auth-modal-overlay.active .auth-modal-container {
    transform: scale(1);
}

/* ==================== 关闭按钮 ==================== */
.auth-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 10;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* ==================== 卡片翻转容器 ==================== */
.auth-card-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 450px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
}

.auth-card-wrapper.flipped {
    transform: rotateY(180deg);
}

/* ==================== 卡片基础样式 ==================== */
.auth-card {
    position: absolute;
    width: 100%;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.auth-card-front {
    transform: rotateY(0deg);
    z-index: 2;
}

.auth-card-back {
    transform: rotateY(180deg);
}

/* ==================== 卡片头部 ==================== */
.auth-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color, #333);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-card-title i {
    font-size: 32px;
    color: var(--primary-color, #333);
}

.auth-card-subtitle {
    font-size: 14px;
    color: var(--text-secondary, #666);
    margin: 0;
}

/* ==================== 表单样式 ==================== */
.auth-form {
    width: 100%;
}

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

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 15px;
    font-size: 20px;
    color: var(--text-secondary, #999);
    pointer-events: none;
    z-index: 1;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 15px 0 45px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-color, #333);
    background: var(--bg-secondary, #f8f9fa);
    transition: all 0.3s ease-in-out;
    outline: none;
}

.auth-input:focus {
    border-color: var(--primary-color, #333);
    background: var(--card-bg, #fff);
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.auth-input::placeholder {
    color: var(--text-secondary, #999);
}

/* ==================== 记住我复选框 ==================== */
.auth-form-remember {
    margin-bottom: 15px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.auth-checkbox-text {
    font-size: 14px;
    color: var(--text-color, #333);
}

/* ==================== 表单提示信息 ==================== */
.auth-form-notice {
    padding: 12px 15px;
    background: rgba(51, 51, 51, 0.05);
    border-left: 3px solid var(--primary-color, #333);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-color, #333);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.auth-form-notice i {
    font-size: 16px;
    color: var(--primary-color, #333);
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-form-message {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    align-items: center;
    gap: 8px;
}

.auth-form-message.error {
    display: flex;
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
    color: #dc3545;
}

.auth-form-message.success {
    display: flex;
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
    color: #28a745;
}

.auth-form-message::before {
    font-family: 'remixicon';
    font-size: 18px;
}

.auth-form-message.error::before {
    content: '\EA4E'; /* ri-error-warning-line */
}

.auth-form-message.success::before {
    content: '\EB7C'; /* ri-checkbox-circle-line */
}

/* ==================== 提交按钮 ==================== */
.auth-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease-in-out;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 73, 94, 0.4);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.auth-submit-btn:hover::before {
    left: 100%;
}

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

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

.auth-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== 卡片底部 ==================== */
.auth-card-footer {
    margin-top: 25px;
    text-align: center;
}

.auth-switch-text {
    font-size: 14px;
    color: var(--text-secondary, #666);
    margin: 0;
}

.auth-switch-link {
    color: var(--primary-color, #333);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.auth-switch-link:hover {
    text-decoration: underline;
    color: #000;
}

/* ==================== 密码提示弹窗 ==================== */
.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.password-modal-overlay.active {
    opacity: 1;
}

.password-modal-container {
    width: 90%;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.password-modal-overlay.active .password-modal-container {
    transform: scale(1);
}

.password-modal-content {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    padding: 45px 40px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* ==================== 密码弹窗图标 ==================== */
.password-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 2s ease-in-out infinite;
}

.password-modal-icon i {
    font-size: 48px;
    color: #fff;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==================== 密码弹窗标题 ==================== */
.password-modal-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
}

.password-modal-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 30px 0;
}

/* ==================== 密码信息框 ==================== */
.password-info-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.password-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.password-info-item:last-child {
    border-bottom: none;
}

.password-info-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.password-info-value {
    font-size: 18px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

.password-info-highlight {
    padding: 18px 0;
}

.password-info-highlight .password-info-value {
    font-size: 24px;
    font-family: 'Courier New', monospace;
}

.password-value-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-copy-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.password-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.password-copy-btn:active {
    transform: scale(0.95);
}

/* ==================== 密码警告提示 ==================== */
.password-modal-warning {
    background: rgba(255, 193, 7, 0.25);
    border: 2px solid rgba(255, 193, 7, 0.6);
    border-radius: 10px;
    padding: 15px 18px;
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
    text-align: left;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.password-modal-warning i {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    animation: warningPulse 2s ease-in-out infinite;
}

.password-modal-warning strong {
    font-weight: 700;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ==================== 密码确认按钮 ==================== */
.password-modal-btn {
    width: 100%;
    height: 52px;
    background: #fff;
    border: none;
    border-radius: 12px;
    color: #2c3e50;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.password-modal-btn i {
    font-size: 20px;
}

.password-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    background: #f8f9fa;
    color: #1a252f;
}

.password-modal-btn:active {
    transform: translateY(0);
}

/* ==================== 深色模式适配 ==================== */
html[data-theme="dark"] .auth-card {
    background: var(--card-bg, #1a1a1a);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .auth-input {
    background: var(--bg-secondary, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color, #e0e0e0);
}

html[data-theme="dark"] .auth-input:focus {
    background: var(--card-bg, #1a1a1a);
    border-color: var(--primary-color, #667eea);
}

html[data-theme="dark"] .auth-form-notice {
    background: rgba(102, 126, 234, 0.15);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .auth-modal-container {
        max-width: 350px;
    }
    
    .auth-card {
        padding: 30px 25px;
        border-radius: 12px;
    }
    
    .auth-card-title {
        font-size: 24px;
    }
    
    .auth-card-title i {
        font-size: 28px;
    }
    
    .auth-input {
        height: 44px;
    }
    
    .auth-submit-btn {
        height: 44px;
        font-size: 15px;
    }
    
    .auth-modal-close {
        top: -45px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .password-modal-content {
        padding: 35px 30px;
        border-radius: 16px;
    }
    
    .password-modal-title {
        font-size: 26px;
    }
    
    .password-info-highlight .password-info-value {
        font-size: 20px;
    }
    
    .password-modal-btn {
        height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .auth-modal-container {
        width: 95%;
    }
    
    .auth-card {
        padding: 25px 20px;
    }
    
    .password-modal-content {
        padding: 30px 25px;
    }
    
    .password-info-box {
        padding: 20px;
    }
}

