/**
 * 登录注册页面样式
 *
 * @package NiqiuCommunity
 * @since 1.0.0
 */

/* ===== 登录注册页面 ===== */
.niqiu-login-page,
.niqiu-register-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(108, 92, 231, 0.1));
    position: relative;
    overflow: hidden;
}

.login-container,
.register-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    z-index: 10;
}

.login-box,
.register-box {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.login-box::before,
.register-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* 页面头部 */
.login-header,
.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title,
.register-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle,
.register-subtitle {
    font-size: 15px;
    color: var(--text-light);
    margin: 0;
}

/* 表单样式 */
.login-form,
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.label-icon {
    font-size: 18px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-color);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    opacity: 0.6;
    transition: var(--transition);
}

.toggle-password:hover {
    opacity: 1;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: -4px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-color);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

.agree-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1.6;
}

.agree-terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.agree-terms a {
    color: var(--primary-color);
    text-decoration: none;
}

.agree-terms a:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.btn-login-submit,
.btn-register-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-login-submit:hover,
.btn-register-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.btn-login-submit:active,
.btn-register-submit:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
}

.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-loading .btn-icon {
    animation: spin 0.8s linear infinite;
}

.btn-register-link,
.btn-login-link {
    width: 100%;
    padding: 12px 24px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-register-link:hover,
.btn-login-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* 错误提示 */
.form-error {
    padding: 12px 16px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
}

.form-success {
    padding: 12px 16px;
    background: #efe;
    border: 1px solid #cfc;
    border-radius: 8px;
    color: #3c3;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
}

/* 分隔线 */
.login-divider,
.register-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

.login-divider::before,
.register-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.login-divider span,
.register-divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    z-index: 2;
}

/* 页脚 */
.login-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 装饰元素 */
.login-decoration,
.register-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.decoration-item {
    position: absolute;
    font-size: 40px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.decoration-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.decoration-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.decoration-3 {
    bottom: 30%;
    left: 15%;
    animation-delay: 2s;
}

.decoration-4 {
    bottom: 20%;
    right: 10%;
    animation-delay: 1.5s;
}

.decoration-5 {
    top: 50%;
    left: 5%;
    animation-delay: 0.5s;
}

.decoration-6 {
    top: 60%;
    right: 5%;
    animation-delay: 2.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .niqiu-login-page,
    .niqiu-register-page {
        padding: 20px 15px;
        min-height: calc(100vh - 150px);
    }
    
    .login-box,
    .register-box {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .login-title,
    .register-title {
        font-size: 26px;
    }
    
    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .decoration-item {
        font-size: 30px;
        opacity: 0.2;
    }
}

