/* 认证页面样式 - 修复浏览器缩放问题 */

/* 基础重置和字体设置 */
html {
    font-size: 16px; /* 固定基础字体大小 */
}

body {
    font-family: "OPPO Sans 4.0", 'Microsoft YaHei', Arial, sans-serif;
    background: #1565C0;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 返回首页按钮样式 */
.home-btn {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    z-index: 1000;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

/* 弹窗提示样式 */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #1565C0;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    border-left-color: #f44336;
}

.toast.success {
    border-left-color: #4caf50;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.toast-message {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #666;
}

.container {
    display: flex;
    height: 100vh;
    box-shadow: 0 0.9375rem 2.1875rem rgba(0, 0, 0, 0.1); /* 15px 35px */
}

/* 图片区域 */
.image-section {
    flex: 6;
    background: url('') center/cover;
    position: relative;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    color: white;
    font-size: 3.5rem; /* 固定大小，不使用clamp */
    font-weight: 700;
    text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.5); /* 2px 2px 4px */
}

/* 表单区域 */
.auth-section {
    flex: 4;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-form {
    width: 100%;
    max-width: 25rem; /* 400px */
    padding: 1.8rem;
}

.form-title {
    text-align: center;
    color: #333;
    font-size: 2rem; /* 固定32px */
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem; /* 固定15.2px */
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-label {
    display: block;
    color: #555;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem; /* 固定14.4px */
}

.form-input {
    width: 100%;
    padding: 0.85rem; /* 固定13.6px */
    border: 0.125rem solid #e1e5e9; /* 2px */
    border-radius: 0.5rem; /* 8px */
    font-size: 0.95rem; /* 固定15.2px */
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #1565C0;
    background: white;
    box-shadow: 0 0 0 0.1875rem rgba(21, 101, 192, 0.1); /* 3px */
}

/* 验证码输入框组 */
.verification-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.verification-input {
    flex: 1;
    min-width: 0;
}

.verification-btn {
    background: #1565C0;
    color: white;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 100px;
}

.verification-btn:hover:not(:disabled) {
    background: #1144a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.verification-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.auth-btn {
    width: 100%;
    padding: 0.9rem; /* 固定14.4px */
    background: #1565C0;
    color: white;
    border: none;
    border-radius: 0.5rem; /* 8px */
    font-size: 1rem; /* 固定16px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.2rem;
    box-sizing: border-box;
}

.auth-btn:hover {
    transform: translateY(-0.125rem); /* -2px */
    background: #0d47a1;
    box-shadow: 0 0.5rem 1.5625rem rgba(21, 101, 192, 0.3); /* 8px 25px */
}

.links {
    text-align: center;
}

.link {
    color: #1565C0;
    text-decoration: none;
    font-weight: 500;
    margin: 0 1rem;
    transition: color 0.3s ease;
    font-size: 0.9rem; /* 固定14.4px */
}

.link:hover {
    color: #0d47a1;
}

.divider {
    margin: 0 0.5rem;
    color: #ccc;
}


/* 大屏幕适配 */
@media (min-width: 75rem) { /* 1200px */
    .auth-form {
        max-width: 28.125rem; /* 450px */
        padding: 2.5rem;
    }
    
    .form-title {
        font-size: 2.5rem; /* 40px */
    }
    
    .form-subtitle {
        font-size: 1.1rem; /* 17.6px */
    }
    
    .form-input {
        padding: 1rem; /* 16px */
        font-size: 1rem; /* 16px */
    }
    
    .auth-btn {
        padding: 1rem; /* 16px */
        font-size: 1.1rem; /* 17.6px */
    }
}

/* 移动端适配 - 隐藏图片，全屏显示功能区 */
@media (max-width: 48rem) { /* 768px */
    body {
        overflow-y: auto; /* 允许移动端滚动 */
        height: auto;
        min-height: 100vh;
    }

    .container {
        height: auto;
        min-height: 100vh;
    }

    .home-btn {
        display: none; /* 手机模式隐藏返回主页按钮 */
    }

    .image-section {
        display: none;
    }

    .auth-section {
        flex: 1;
        width: 100%;
        background: #1565C0;
        padding: 1rem;
        box-sizing: border-box;
    }

    .auth-form {
        background: white;
        border-radius: 0.9375rem; /* 15px */
        padding: 1.5rem 1rem; /* 减少内边距 */
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.2); /* 10px 30px */
        margin: 0 auto;
    }

    .form-title {
        font-size: 1.8rem; /* 28.8px */
        margin-bottom: 0.3rem;
    }

    .form-subtitle {
        font-size: 0.9rem; /* 14.4px */
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    .form-label {
        font-size: 0.85rem; /* 13.6px */
        margin-bottom: 0.4rem;
    }

    .form-input {
        padding: 0.75rem; /* 12px */
        font-size: 0.9rem; /* 14.4px */
        border-radius: 0.375rem; /* 6px */
        width: 100%;
        box-sizing: border-box;
        border: 0.125rem solid #e1e5e9;
    }

    .auth-btn {
        padding: 0.8rem; /* 12.8px */
        font-size: 0.95rem; /* 15.2px */
        border-radius: 0.375rem; /* 6px */
        margin-bottom: 1.2rem;
        width: 100%;
        box-sizing: border-box;
    }

    .link {
        font-size: 0.85rem; /* 13.6px */
        margin: 0 0.5rem;
    }

    /* 手机模式弹窗调整 */
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .toast {
        min-width: auto;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
}

/* 小屏幕移动端 */
@media (max-width: 30rem) { /* 480px */
    .auth-section {
        padding: 0.5rem;
    }

    .auth-form {
        padding: 1.2rem 0.8rem;
        margin: 0;
        border-radius: 0.75rem;
    }
    
    .form-title {
        font-size: 1.5rem; /* 24px */
    }
    
    .form-group {
        margin-bottom: 0.9rem;
    }

    .form-input {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .auth-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* 小屏幕弹窗调整 */
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }

    .toast {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
}

/* 注册页面特殊样式 */
.register-form {
    padding: 1.5rem; /* 减少padding */
}

.register-form .form-group {
    margin-bottom: 1.1rem; /* 进一步减少间距 */
}

.register-form .form-subtitle {
    margin-bottom: 1.5rem; /* 减少副标题下方间距 */
}

.register-form .auth-btn {
    margin-bottom: 1rem; /* 减少按钮下方间距 */
}

@media (max-width: 48rem) {
    .register-form .form-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 30rem) {
    .register-form .form-group {
        margin-bottom: 0.9rem;
    }
    
    .verification-input-group {
        gap: 0.4rem;
    }
    
    .verification-btn {
        font-size: 0.8rem;
        padding: 0.85rem 0.6rem;
        min-width: 80px;
    }
    
    .form-help {
        font-size: 0.75rem;
    }
}
