* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: transparent;
    overflow: hidden;
}

/* 右上角导航菜单 */
.top-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #595959;
    text-decoration: none;
    font-size: 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(84, 123, 244, 0.1);
    color: rgb(84, 123, 244);
}

.nav-link-download {
    background: linear-gradient(135deg, rgb(84, 123, 244) 0%, #667eea 100%);
    color: #ffffff !important;
    font-weight: 500;
}

.nav-link-download:hover {
    background: linear-gradient(135deg, #667eea 0%, rgb(84, 123, 244) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(84, 123, 244, 0.3);
}

.nav-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}


.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* 左侧插图区域 */
.illustration-section {
    flex: 0 0 55%;
    width: 55%;
    background-image: url('/fwis/com/is/flywings/login/images/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-container {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
}

.logo-image {
    max-width: 150px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.illustration-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.phone-image {
    display: block;
    max-width: 70%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 右侧登录表单区域 */
.login-section {
    flex: 0 0 40%;
    width: 40%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: #8c8c8c;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 2px;
}

.login-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #bfbfbf;
    z-index: 1;
}

.input-group input {
    width: 100%;
    height: 56px;
    padding: 0 50px 0 50px;
    border: 1px solid #e8e8e8;
    border-radius: 28px;
    font-size: 15px;
    color: #1a1a1a;
    background: #ffffff;
    transition: all 0.3s ease;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bfbfbf;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.input-group input::placeholder {
    color: #bfbfbf;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.agreement-group {
    margin-bottom: 22px;
    margin-left: 5px;
}

.agreement-error {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 8px;
    margin-left: 28px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: rgb(84, 123, 244);
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.agreement-text {
    font-size: 14px;
    color: #595959;
    line-height: 1.5;
}

.link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    height: 56px;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: rgb(84, 123, 244);
    border: none;
    border-radius: 28px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #bfbfbf;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e8e8e8;
}

.divider span {
    padding: 0 16px;
}

/* 其他登录方式按钮容器 */
.alternative-login-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

/* 登录图标按钮 */
.login-icon-btn {
    width: 48px;
    height: 48px;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.login-icon-btn:active {
    transform: translateY(0);
}

.login-icon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-icon-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 微信登录按钮特殊样式 */
.wechat-btn:hover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.05);
}

/* 手机登录按钮特殊样式 */
.phone-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.login-icon-btn:hover .login-icon-svg {
    color: #667eea;
}

.wechat-btn:hover .login-icon-img {
    transform: scale(1.1);
}

.phone-btn:hover .login-icon-svg {
    color: #667eea;
}

.login-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.login-icon-svg {
    width: 24px;
    height: 24px;
    color: #595959;
    transition: color 0.3s ease;
}

/* 微信登录面板：用于承载微信官方二维码 */
.wechat-login-panel {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 16px;
}

.wechat-login-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#wxLoginContainer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-cancel-btn {
    width: 60%;
    height: 46px;
}

.wechat-qrcode-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.qrcode-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.qrcode-placeholder svg {
    color: #d9d9d9;
}

.qrcode-tip {
    font-size: 14px;
    color: #8c8c8c;
    margin: 0;
}

.wechat-tip {
    font-size: 16px;
    color: #595959;
    margin: 0 0 8px 0;
}

.wechat-app-name {
    font-size: 14px;
    color: #8c8c8c;
    margin: 0;
}

/* 协议弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #8c8c8c;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    height: calc(90vh - 80px);
    min-height: 500px;
    border: none;
    display: block;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .top-nav {
        padding: 15px 20px;
    }
    
    .nav-links {
        gap: 4px;
        padding: 6px 8px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link-download span {
        display: inline;
    }
    
    .login-container {
        flex-direction: column;
    }
    
    .illustration-section {
        height: 40vh;
        min-height: 300px;
    }
    
    .logo-container {
        top: 20px;
        left: 20px;
    }
    
    .logo-image {
        max-width: 120px;
        max-height: 50px;
    }
    
    .login-section {
        height: 60vh;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 12px 15px;
    }
    
    .nav-links {
        gap: 2px;
        padding: 4px 6px;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .nav-icon {
        width: 14px;
        height: 14px;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .logo-container {
        top: 15px;
        left: 15px;
    }
    
    .logo-image {
        max-width: 100px;
        max-height: 40px;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-body iframe {
        height: calc(95vh - 70px);
        min-height: 400px;
    }
}
