/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --primary-light: rgba(102, 126, 234, 0.08);
    --primary-shadow: rgba(102, 126, 234, 0.3);
    --text-main: #333;
    --text-sub: #888;
    --border-color: #e0e5ec;
    --bg-page: #f5f6fa;
    --danger: #e53935;
    --success: #43a047;
    --warning: #fb8c00;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-page);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ========== 头部导航 ========== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.header .logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.22);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 900;
    backdrop-filter: blur(4px);
}

.header .logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.nav-menu a.active {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

/* 移动端汉堡菜单 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 55px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu-drawer.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer .drawer-content {
    background: #fff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.mobile-menu-drawer .drawer-content a {
    padding: 14px 16px;
    border-radius: 10px;
    color: #444;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-menu-drawer .drawer-content a:active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f6fa 0%, #eef0f9 50%, #f5f6fa 100%);
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.main-content::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102,126,234,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.main-content::after {
    content: '';
    position: absolute;
    bottom: -160px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(118,75,162,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* ========== 登录卡片 ========== */
.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.12);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px 40px;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header .brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

.auth-header .brand-logo img {
    width:100%;
    height:100%;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-sub);
}

/* Tab 切换 */
.tab-container {
    display: flex;
    background: #f4f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 32px;
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* 表单 */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #aaa;
    z-index: 2;
}

.form-group input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    background: #fafbfc;
    transition: all 0.3s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #bbb;
    font-size: 14px;
}

/* 验证码 */
.verify-code-wrapper {
    display: flex;
    gap: 12px;
}

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

.verify-btn {
    padding: 0 18px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    flex-shrink: 0;
}

.verify-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.verify-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
    letter-spacing: 4px;
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.submit-btn:active::after {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
}

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

/* 错误提示 */
.error-msg {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 4px;
}

.error-msg.show {
    display: flex;
}

.form-group.error input {
    border-color: var(--danger);
    background: #fff5f5;
}

.form-group.success input {
    border-color: var(--success);
}

/* 辅助链接 */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 10px;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-footer label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    cursor: pointer;
    font-weight: normal;
}

.form-footer input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* 表单面板切换动画 */
.form-panel {
    display: none;
    animation: fadeSlide 0.4s ease;
}

.form-panel.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 密码强度 */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.strength-bar span {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    transition: all 0.3s;
}

.strength-bar span.active-weak {
    background: var(--danger);
}

.strength-bar span.active-medium {
    background: var(--warning);
}

.strength-bar span.active-strong {
    background: var(--success);
}

.strength-text {
    font-size: 12px;
    color: #888;
}

/* 第三方登录 */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 0;
    color: #bbb;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

.oauth-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.oauth-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e8e8e8;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.oauth-btn:active {
    transform: scale(0.92);
    background: #f5f5f5;
}

/* ========== 底部 ========== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.6);
    padding: 32px 40px;
    text-align: center;
    font-size: 13px;
    line-height: 2;
}

.footer a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s;
}

.footer a:hover {
    color: #fff;
}

.footer .footer-links {
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer .copyright {
    color: rgba(255,255,255,0.35);
    font-size: 12px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    z-index: 999;
    opacity: 0;
    transition: all 0.4s;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--primary);
}

/* ========== 响应式 ========== */

/* 平板 */
@media (max-width: 900px) {
    .header {
        padding: 0 24px;
    }

    .nav-menu a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header {
        padding: 0 16px;
        height: 56px;
    }

    .header .logo-text {
        font-size: 18px;
    }

    .header .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 17px;
    }

    /* 隐藏桌面导航，显示汉堡按钮 */
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-drawer {
        display: block;
    }

    .main-content {
        padding: 24px 16px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .auth-card {
        padding: 36px 24px 28px;
        margin: 0;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(102, 126, 234, 0.1);
    }

    .auth-header .brand-logo {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .auth-header .brand-logo img {
        width:100%;
        height:100%;
    }

    .auth-header h1 {
        font-size: 20px;
    }

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

    .form-group input {
        padding: 14px 14px 14px 42px;
        font-size: 15px;
        height: 50px;
        border-radius: 10px;
    }

    .verify-btn {
        height: 50px;
        padding: 0 14px;
        font-size: 12px;
        border-radius: 10px;
    }

    .submit-btn {
        padding: 15px;
        font-size: 16px;
        border-radius: 10px;
    }

    .tab-btn {
        padding: 10px;
        font-size: 14px;
    }

    .form-footer {
        font-size: 12px;
    }

    .footer {
        padding: 24px 16px;
        font-size: 12px;
    }

    .footer .footer-links a {
        margin: 0 6px;
        font-size: 12px;
    }

    .footer .copyright {
        font-size: 11px;
        line-height: 1.8;
    }
}

/* 小屏手机 */
@media (max-width: 380px) {
    .auth-card {
        padding: 28px 18px 22px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .verify-btn {
        padding: 0 10px;
        font-size: 11px;
    }

    .verify-code-wrapper {
        gap: 8px;
    }
}

/* 横屏手机优化 */
@media (max-height: 600px) and (max-width: 768px) {
    .main-content {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-card {
        padding: 24px 20px 20px;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-header .brand-logo {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }

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

/* 安全区域适配 (iPhone刘海屏等) */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(0px, env(safe-area-inset-top));
    }

    .footer {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}
.logos{
    width:32px;
    height:32px;
}