/* 登录页面样式 */
* {
    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;
}

/* 登录页面导航栏样式覆盖 - 确保文字始终为白色 */
.navbar.transparent {
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.transparent .navbar-menu a {
    color: white !important;
}

.navbar.transparent .navbar-menu a:hover {
    color: white !important;
    opacity: 0.8;
}

.navbar.transparent .navbar-menu a.active {
    color: white !important;
    font-weight: 600;
}

.navbar.transparent .navbar-menu a.active:hover {
    color: white !important;
    opacity: 1;
}

.navbar.transparent .navbar-login {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar.transparent .navbar-login:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 移动端导航栏优化 */
@media (max-width: 768px) {
    /* 导航栏容器高度调整 */
    .navbar .navbar-container {
        height: 70px;
    }
    
    /* 汉堡菜单按钮 - 强制显示并设置白色 */
    .navbar .navbar-toggle {
        display: block !important;
        color: white !important;
    }
    
    /* 移动端菜单基础样式 - 默认隐藏 */
    .navbar .navbar-menu {
        display: none !important;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(102, 126, 234, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        gap: 15px;
        z-index: 999;
    }
    
    /* 确保移动端菜单可以展开 - 使用更高优先级 */
    .navbar .navbar-menu.active {
        display: flex !important;
    }
    
    /* 移动端展开菜单的所有列表项 */
    .navbar .navbar-menu.active li {
        width: 100%;
        text-align: center;
    }
    
    /* 移动端展开菜单的链接颜色 - 强制白色，覆盖 common.css 的深色设置 */
    body .navbar.transparent .navbar-menu.active a,
    body .navbar.transparent .navbar-menu.active li a {
        color: #ffffff !important;
    }
    
    body .navbar.transparent .navbar-menu.active a:hover,
    body .navbar.transparent .navbar-menu.active li a:hover {
        color: #ffffff !important;
        opacity: 0.8;
    }
    
    body .navbar.transparent .navbar-menu.active a.active,
    body .navbar.transparent .navbar-menu.active li a.active {
        color: #ffffff !important;
        font-weight: 600;
        opacity: 1;
    }
    
    /* 移动端菜单链接下划线 */
    .navbar .navbar-menu.active a::after {
        background: white !important;
    }
    
    /* 登录按钮在移动端的样式 - 调整为合适大小 */
    .navbar .navbar-login {
        margin-top: 10px;
        width: auto;
        max-width: 150px;
        margin-left: auto;
        margin-right: auto;
        padding: 8px 24px;
        font-size: 14px;
    }
    
    /* 移动端菜单中的登录按钮 */
    .navbar .navbar-menu.active .navbar-login {
        width: auto;
        max-width: 150px;
        margin: 10px auto 0;
    }
}

/* 登录区域 */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    padding-top: 100px; /* 为导航栏留出空间 */
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 700px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 左侧图片区域 */
.login-left {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.login-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.login-image-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
}

.login-image-overlay h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-image-overlay p {
    font-size: 18px;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* 右侧登录框 */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: white;
}

.login-box {
    width: 100%;
    max-width: 400px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    flex-shrink: 0;
}

.login-header h1 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    font-size: 14px;
    color: #718096;
}

/* 登录方式切换标签 */
.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f7fafc;
    padding: 5px;
    border-radius: 12px;
    flex-shrink: 0;
}

.login-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.login-tab i {
    font-size: 16px;
}

.login-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.login-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 登录表单 */
.login-form {
    display: none;
    min-height: 350px;
    flex: 1;
}

.login-form.active {
    display: flex;
    flex-direction: column;
}

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

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

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    font-size: 16px;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #cbd5e0;
}

/* 验证码输入组 */
.code-input-group {
    display: flex;
    gap: 10px;
}

.code-input-group .input-wrapper {
    flex: 1;
}

.btn-send-code {
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-send-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-send-code:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

/* 微信登录 */
.wechat-login {
    display: none;
    padding: 20px 0;
    min-height: 350px;
    flex: 1;
}

.wechat-login.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wechat-qr-container {
    text-align: center;
}

.wechat-qr-code {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
}

.loading-text {
    color: #a0aec0;
    font-size: 14px;
}

.wechat-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4a5568;
    font-size: 15px;
    margin-bottom: 10px;
}

.wechat-tip i {
    color: #07c160;
    font-size: 20px;
}

/* 底部信息 */
.login-footer {
    text-align: center;
    font-size: 14px;
    color: #718096;
}

.contact-service {
    color: #667eea;
    cursor: pointer;
    transition: color 0.3s ease;
}

.contact-service:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.toast.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.toast.info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .login-container {
        max-width: 900px;
        height: 650px;
    }
    
    .login-right {
        padding: 40px;
    }
    
    .login-image-overlay h2 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .login-section {
        padding: 0;
        padding-top: 80px; /* 为导航栏留出空间 */
    }
    
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 80px);
        border-radius: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .login-left {
        min-height: 180px;
        max-height: 180px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .login-image {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .login-image-overlay h2 {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .login-image-overlay p {
        font-size: 14px;
    }
    
    .login-right {
        padding: 30px 20px 40px;
        background: white;
        border-radius: 24px 24px 0 0;
        margin-top: -20px; /* 让白色背景稍微覆盖紫色区域，产生层次感 */
        position: relative;
        z-index: 2;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* 移动端顶部把手装饰 */
    .login-right::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e2e8f0;
        border-radius: 2px;
    }
    
    .login-box {
        max-width: 100%;
        min-height: auto;
    }
    
    .login-header {
        margin-bottom: 30px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    .login-tabs {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 25px;
        padding: 4px;
    }
    
    .login-tab {
        flex-direction: column;
        gap: 4px;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .login-tab i {
        font-size: 18px;
    }
    
    .login-tab span {
        display: block;
    }
    
    .login-form {
        min-height: auto;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-input {
        padding: 12px 14px 12px 42px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    .input-wrapper i {
        left: 14px;
        font-size: 15px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .btn-send-code {
        border-radius: 12px;
    }
    
    .form-options {
        margin-bottom: 20px;
    }
    
    .wechat-qr-container {
        padding: 10px 0;
    }
    
    .wechat-qr-code {
        width: 220px;
        height: 220px;
        margin: 0 auto 16px;
    }
    
    .wechat-tip {
        font-size: 14px;
    }
    
    .code-input-group {
        gap: 8px;
    }
    
    .alert {
        padding: 10px 14px;
        font-size: 13px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding-top: 70px;
    }
    
    .login-container {
        min-height: calc(100vh - 70px);
    }
    
    .login-left {
        min-height: 160px;
        max-height: 160px;
    }
    
    .login-image-overlay h2 {
        font-size: 24px;
    }
    
    .login-image-overlay p {
        font-size: 13px;
    }
    
    .login-right {
        padding: 25px 16px 30px;
        margin-top: -24px;
    }
    
    .login-header {
        margin-bottom: 25px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-header p {
        font-size: 12px;
    }
    
    .login-tabs {
        gap: 6px;
        padding: 3px;
    }
    
    .login-tab {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .login-tab i {
        font-size: 16px;
    }
    
    .wechat-qr-code {
        width: 200px;
        height: 200px;
    }
    
    .form-options {
        font-size: 13px;
    }
    
    .btn-send-code {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* 错误提示样式 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.alert i {
    font-size: 16px;
}

.alert-danger {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

/* 移动端 Toast 优化 */
@media (max-width: 768px) {
    .toast {
        top: 90px; /* 避开导航栏 */
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: calc(100vw - 40px);
        padding: 14px 20px;
        font-size: 13px;
    }
}

.toast.success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toast.error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.toast.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.toast.warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
