/* ========== MIRROR - 用户设计版本 ========== */

/* CSS变量定义 */
:root {
    --mirror-dark: #2E1065;
    --mirror-primary: #4C1D95;
    --mirror-secondary: #701A75;
    --mirror-accent: #2DD4BF;
    --mirror-accent-hover: #14B8A6;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
}

/* 主背景容器 */
.login-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(to bottom right, #1a0b2e, #2d1b4e, #431452);
    color: white;
    overflow: hidden;
}

/* 动态背景效果 */
.bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(100px);
    animation: blob 10s infinite;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(76, 29, 149, 0.4);
    opacity: 0.6;
}

.blob-2 {
    top: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(112, 26, 117, 0.4);
    opacity: 0.6;
    animation-delay: 2s;
}

.blob-3 {
    bottom: -10%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: rgba(67, 56, 202, 0.4);
    opacity: 0.5;
    animation-delay: 4s;
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* 主内容区 */
.login-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 96px 20px 48px;
}

/* 品牌头部 */
.brand-header {
    margin-bottom: 48px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.brand-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 60px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    background: linear-gradient(to bottom, white, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
}

.brand-divider {
    height: 1px;
    width: 48px;
    background: rgba(45, 212, 191, 0.5);
    margin: 0 auto 16px;
}

.brand-tagline {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* 登录卡片 */
.login-card {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out 150ms both;
}

.card-container {
    position: relative;
    transition: all 0.5s;
}

/* 桌面端毛玻璃效果 */
@media (min-width: 768px) {
    .card-container {
        padding: 40px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .card-shine {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    }
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 输入框样式 */
.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-input:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--mirror-accent);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

/* Chrome自动填充样式 */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #452475 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* 密码显示切换按钮 */
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: white;
}

/* 验证码区域 */
.captcha-wrapper {
    display: flex;
    gap: 12px;
    height: 52px;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    height: 100%;
    width: 110px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s;
}

.captcha-image:hover {
    opacity: 0.9;
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 辅助链接 */
.form-helpers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 13px;
}

.remember-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

.remember-wrapper:hover {
    color: white;
}

.custom-checkbox {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.3s;
}

.remember-wrapper:hover .custom-checkbox {
    border-color: rgba(45, 212, 191, 0.5);
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.checkbox-fill {
    width: 100%;
    height: 100%;
    background: var(--mirror-accent);
    transform: scale(0);
    transition: transform 0.3s;
}

.checkbox-input:checked ~ .checkbox-fill {
    transform: scale(1);
}

.forgot-link {
    color: var(--mirror-accent);
    text-decoration: none;
    transition: all 0.3s;
}

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

/* 提交按钮 */
.submit-button {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--mirror-accent), var(--mirror-accent-hover));
    border: none;
    border-radius: 12px;
    color: var(--mirror-dark);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(45, 212, 191, 0.3);
}

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

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button svg {
    margin-left: 8px;
    opacity: 0.8;
}

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

.submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mirror-dark);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* 服务条款 */
.terms-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 4px;
    padding: 0 4px;
}

.terms-checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.terms-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.terms-checkbox:checked {
    background: var(--mirror-accent);
    border-color: var(--mirror-accent);
}

.terms-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--mirror-dark);
    font-size: 10px;
    font-weight: bold;
}

.terms-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.terms-label a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.terms-label a:hover {
    color: white;
}

/* 注册链接 */
.register-footer {
    margin-top: 32px;
    text-align: center;
    animation: fadeIn 0.8s ease-out 300ms both;
}

.register-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.register-link {
    margin-left: 8px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.register-link:hover {
    color: var(--mirror-accent);
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .login-content {
        padding: 80px 16px 40px;
    }
    
    .brand-title {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 40px;
    }
    
    .brand-tagline {
        font-size: 11px;
    }
}
