/* ============================================
   ThinNav Navigation Styles
   命名规范: BEM + tn-前缀 (ThinNav Block)
   ============================================ */

/* ============================================
   Block: tn-header (主导航头部)
   ============================================ */
.tn-header {
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05),
                0 2px 8px rgba(0, 0, 0, 0.04);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

/* Element: 头部容器 */
.tn-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
}

/* Element: 导航区域 */
.tn-header__nav {
    background: transparent;
    padding: 0;
    flex-shrink: 0;
}

/* Element: 导航菜单 */
.tn-header__menu {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Element: 导航链接 */
.tn-header__link {
    display: block;
    padding: 6px 10px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 5px;
    white-space: nowrap;
}

.tn-header__link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
}

/* Modifier: 激活状态 */
.tn-header__link--active {
    color: #2563eb;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%);
    position: relative;
}

.tn-header__link--active::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2.5px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

.tn-header__link--active:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #1d4ed8;
}

/* Modifier: VIP链接 */
.tn-header__link--vip {
    color: #f59e0b;
}

.tn-header__link--vip:hover {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
}

/* Element: 搜索区域 */
.tn-header__search {
    flex: 0 0 380px;
    margin: 0 10px 0 10px;
    display: flex;
    align-items: center;
    margin-left:320px;
}

/* Element: 用户区域 */
.tn-header__user {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Block: tn-user-avatar (用户头像) */
.tn-user-avatar {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid #e5e7eb;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #f3f4f6;
}

.tn-user-avatar:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    transform: scale(1.03);
}

.tn-user-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   Block: tn-user-dropdown (已登录用户下拉菜单)
   现代化设计：平滑动画 + 阴影层次 + 悬停反馈
   ============================================ */
.tn-header__user {
    position: relative;
}

.tn-user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.tn-user-avatar--logged {
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
}

/* 下拉菜单面板 */
.tn-user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: -8px;
    width: 240px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    overflow: hidden;
    pointer-events: none;
}

/* 展开状态 */
.tn-user-dropdown--open .tn-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 菜单顶部箭头 */
.tn-user-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    transform: rotate(45deg);
}

/* 用户信息头部区域 */
.tn-user-menu__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.tn-user-menu__avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.tn-user-menu__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.tn-user-menu__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

/* 分割线 */
.tn-user-menu__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2px 16px;
}

/* 菜单列表 */
.tn-user-menu__list {
    list-style: none;
    margin: 4px 0;
    padding: 0 8px;
}

.tn-user-menu__list li a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    text-decoration: none;
    font-size: 0.85rem;
    color: #374151;
    border-radius: 9px;
    transition: all 0.2s ease;
    letter-spacing: 0.15px;
}

/* 彩色圆角胶囊图标容器 */
.tn-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.tn-menu-icon i {
    font-size: 0.82rem;
    line-height: 1;
}

/* 个人主页 - 蓝紫 */
.tn-menu-icon--profile { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
/* 题库中心 - 蓝色 */
.tn-menu-icon--bank { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
/* 全部错题 - 红橙 */
.tn-menu-icon--wrong { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }
/* 发起考试 - 翠绿 */
.tn-menu-icon--exam { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
/* 账户中心 - 琥珀 */
.tn-menu-icon--account { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
/* 帮助教程 - 靛蓝 */
.tn-menu-icon--help { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }

.tn-user-menu__list li a:hover .tn-menu-icon--profile { background: linear-gradient(135deg, #c4b5fd, #a78bfa); box-shadow: 0 2px 8px rgba(124,58,237,0.25); }
.tn-user-menu__list li a:hover .tn-menu-icon--bank { background: linear-gradient(135deg, #93c5fd, #60a5fa); box-shadow: 0 2px 8px rgba(37,99,235,0.25); }
.tn-user-menu__list li a:hover .tn-menu-icon--wrong { background: linear-gradient(135deg, #fca5a5, #f87171); box-shadow: 0 2px 8px rgba(220,38,38,0.25); }
.tn-user-menu__list li a:hover .tn-menu-icon--exam { background: linear-gradient(135deg, #6ee7b7, #34d399); box-shadow: 0 2px 8px rgba(5,150,105,0.25); }
.tn-user-menu__list li a:hover .tn-menu-icon--account { background: linear-gradient(135deg, #fcd34d, #fbbf24); box-shadow: 0 2px 8px rgba(217,119,6,0.25); }
.tn-user-menu__list li a:hover .tn-menu-icon--help { background: linear-gradient(135deg, #a5b4fc, #818cf8); box-shadow: 0 2px 8px rgba(79,70,229,0.25); }

.tn-user-menu__list li a:hover i { color: inherit; }

.tn-user-menu__list li a:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #111827;
    transform: translateX(3px);
}

/* 底部退出登录区 */
.tn-user-menu__footer {
    padding: 8px 16px 12px;
}

.tn-user-menu__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 20px;
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
    color: #ef4444;
    border: 1.3px solid #fecaca;
    border-radius: 9px;
    background: linear-gradient(180deg, #fef2f2 0%, #fff1f1 100%);
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.tn-user-menu__logout i {
    font-size: 0.78rem;
    transition: transform 0.25s;
}

.tn-user-menu__logout:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.tn-user-menu__logout:hover i {
    transform: translateX(-2px);
}

/* Block: tn-search (搜索组件) */
.tn-search {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Element: 搜索输入框 */
.tn-search__input {
    width: 100%;
    height: 36px;
    padding: 0 44px 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    font-size: 0.8125rem;
    color: #374151;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.02),
        0 1px 2px rgba(0, 0, 0, 0.02);
}

.tn-search__input::placeholder {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.8125rem;
}

/* ============================================
   Block: tn-modal (微信扫码登录模态窗口)
   紧凑布局，减少空白区域
   ============================================ */
.tn-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tn-modal--active {
    opacity: 1;
    visibility: visible;
}

.tn-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.35s ease;
}

.tn-modal__container {
    position: relative;
    z-index: 2001;
    width: 90%;
    max-width: 440px;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tn-modal--active .tn-modal__container {
    transform: scale(1) translateY(0);
}

.tn-modal__content {
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.16),
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

/* 关闭按钮 */
.tn-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 12px;
    transition: all 0.25s ease;
    z-index: 10;
}

.tn-modal__close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
    transform: rotate(90deg) scale(1.08);
}

/* 头部区域 - 绿色渐变背景 */
.tn-modal__header {
    text-align: center;
    padding: 20px 20px 14px;
    background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 50%, #86efac 100%);
    border-radius: 18px 18px 0 0;
}

.tn-modal__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #166534;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}

.tn-modal__subtitle {
    font-size: 0.85rem;
    color: #15803d;
    margin: 0;
    letter-spacing: 0.3px;
}

/* 主体内容区 - 白色卡片内边距 */
.tn-modal__body {
    padding: 16px 20px;
    background: #ffffff;
}

.tn-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 关键修复：确保 wrapper 填满 body 容器 */
    width: 100%;
    height: 100%;
}

/*
 * 二维码容器 - 白色卡片样式，适配320x400二维码
 */
.tn-qr-container {
    width: 100%;
    min-height: 420px;
    max-height: 420px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
    box-sizing: border-box;
}
/* ============================================
   微信快捷登录 - 调整样式匹配图片效果
   ============================================ */
.tn-wxlogin-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* 微信登录标题（图片中的"微信登录"文字） */
.tn-wxlogin-profile::before {
    content: '微信登录';
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.tn-wxlogin-avatar {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tn-wxlogin-nickname {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 12px;
    letter-spacing: 0.3px;
}

.tn-wxlogin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 48px;
    background: #07c160;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.tn-wxlogin-btn:hover {
    background: #06ad56;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(7, 193, 96, 0.3);
}

.tn-wxlogin-switch {
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.2px;
}

.tn-wxlogin-switch:hover {
    color: #07c160;
    text-decoration: underline;
}

/* WxLogin SDK 渲染容器 - 适配320x400二维码 */
.tn-wxlogin-wrapper {
    width: 320px !important;
    max-width: 320px !important;
    min-height: 400px !important;
    max-height: 400px !important;
    height: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    position: relative !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 隐藏微信SDK生成的底部文字区域（红色框2标记区域） */
.tn-wxlogin-wrapper .sub_title,
.tn-wxlogin-wrapper .sub_title_info,
.tn-wxlogin-wrapper .wx_login_tips,
.tn-wxlogin-wrapper p[class*="sub"],
.tn-wxlogin-wrapper span[class*="sub"],
.tn-wxlogin-wrapper div[class*="sub"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 调整iframe尺寸以适应320x400二维码 */
.tn-wxlogin-wrapper iframe {
    width: 320px !important;
    height: 400px !important;
    max-width: 320px !important;
    max-height: 400px !important;
    overflow: visible !important;
}

/* 核心：约束 WxLogin SDK 生成的所有子元素 */
.tn-wxlogin-wrapper iframe,
.tn-wxlogin-wrapper > div,
.tn-wxlogin-wrapper img,
.tn-wxlogin-wrapper p,
.tn-wxlogin-wrapper span,
.tn-wxlogin-wrapper a,
.tn-wxlogin-wrapper button,
.tn-wxlogin-wrapper strong,
.tn-wxlogin-wrapper em,
.tn-wxlogin-wrapper [class*="wx"],
.tn-wxlogin-wrapper [id*="wx"],
.tn-wxlogin-wrapper [style*="width"] {
    max-width: 242px !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

/* 按钮和链接元素约束 */
.tn-wxlogin-wrapper a,
.tn-wxlogin-wrapper button,
.tn-wxlogin-wrapper [role="button"] {
    max-width: 224px !important;
    display: inline-flex !important;
    justify-content: center !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* 图片约束 */
.tn-wxlogin-wrapper img {
    max-width: 76px !important;
    max-height: 76px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

.tn-qr-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* 加载状态占位 - 减少padding */
.tn-qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-align: center;
    padding: 24px 16px;
}

.tn-qr-placeholder i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #07c160;
}

.tn-qr-placeholder span {
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* 二维码加载动画 - 紧凑版 */
.tn-qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    padding: 28px 16px;
}

.tn-qr-loading .tn-qr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: tnQrSpin 0.8s linear infinite;
    margin-bottom: 12px;
}

.tn-qr-loading span {
    font-size: 0.8125rem;
    white-space: nowrap;
}

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

/* 二维码有效期提示 */
.tn-qr-expire-tip {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 8px 0 4px;
}

/* 二维码已过期状态 */
.tn-qr-expired {
    color: #ef4444 !important;
}

.tn-qr-expired i {
    color: #ef4444 !important;
}

/* 错误信息文字 - 紧凑版 */
.tn-qr-error-msg {
    display: block;
    font-size: 0.725rem;
    color: #9ca3af;
    margin-top: 6px;
    word-break: break-all;
    line-height: 1.35;
    max-width: 240px;
}

/* 降级方案 - 紧凑版 */
.tn-qr-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 0;
}

.tn-qr-fallback__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;              /* 原 10px → 8px */
    padding: 22px 20px;    /* 原 28px 24px → 22px 20px */
    text-decoration: none;
    color: #4b5563;
    border-radius: 12px;
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 60%, #f0f9ff 100%);
    border: 1.5px dashed #07c160;
    transition: all 0.3s ease;
    min-width: 180px;
}

.tn-qr-fallback__link:hover {
    background: linear-gradient(180deg, #dcfce7 0%, #d1fae5 100%);
    border-color: #05a350;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(7, 193, 96, 0.18);
}

.tn-qr-fallback__icon {
    width: 48px;           /* 原 56px → 48px */
    height: 48px;
    background: linear-gradient(135deg, #07c160 0%, #05a350 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.tn-qr-fallback__text {
    font-size: 0.8875rem;
    font-weight: 600;
    color: #111827;
}

.tn-qr-fallback__sub {
    font-size: 0.75rem;
    color: #6b7280;
}

/* 页脚协议区域 - 白色背景 */
.tn-modal__footer {
    padding: 12px 20px 16px;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
    border-radius: 0 0 18px 18px;
}

.tn-modal__agreement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.tn-modal__agreement i {
    color: #22c55e;
    font-size: 0.9rem;
}

.tn-modal__agreement a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.tn-modal__agreement a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.tn-search__input:hover {
    border-color: #c9cdd4;
    background: #ffffff;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.02),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.tn-search__input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.12),
        0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Element: 搜索按钮 */
.tn-search__btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(37, 99, 235, 0.35),
        0 1px 2px rgba(37, 99, 235, 0.2);
}

.tn-search__btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 
        0 4px 14px rgba(37, 99, 235, 0.45),
        0 2px 4px rgba(37, 99, 235, 0.3);
}

.tn-search__btn:active {
    transform: translateY(-50%) scale(0.96);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Element: 操作区域 */
.tn-header__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

/* ============================================
   Block: tn-auth (登录/注册区域)
   ============================================ */
.tn-auth {
    position: relative;
    display: flex;
    gap: 8px;
}

/* Element: 登录按钮 */
.tn-auth__login {
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    border: 1px solid #2563eb;
    background: transparent;
}

.tn-auth__login:hover,
.tn-auth__login--active {
    color: #1d4ed8;
    border-color: #1d4ed8;
    background: rgba(37, 99, 235, 0.05);
}

/* Element: 注册按钮 */
.tn-auth__register {
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}

.tn-auth__register:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Hover时按钮联动效果 */
.tn-auth:hover .tn-auth__login {
    color: #1d4ed8;
    border-color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
}

.tn-auth:hover .tn-auth__register {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* ============================================
   Block: tn-tooltip (悬浮提示框)
   ============================================ */
.tn-tooltip {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.1s;
    z-index: 1001;
}

/* Hover触发显示 */
.tn-auth:hover .tn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

/* Modifier: 强制显示 */
.tn-tooltip--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 扩展悬停区域 - 按钮与提示框之间的隐形桥梁 */
.tn-tooltip::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

/* Element: 箭头 */
.tn-tooltip__arrow {
    position: absolute;
    top: -6px;
    right: 40px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.03);
}

/* Element: 内容区域 */
.tn-tooltip__content {
    padding: 20px;
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

/* Element: 头部 */
.tn-tooltip__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.tn-tooltip__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    max-width: 40px;
}

.tn-tooltip__title {
    font-size: 15px;
    font-weight: 600;
    color: #d4a574;
    white-space: nowrap;
    margin: 0;
}

/* ============================================
   Block: tn-features (功能网格)
   ============================================ */
.tn-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

/* Element: 功能项 */
.tn-features__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.tn-features__item:hover {
    background: #f9fafb;
}

/* Element: 功能图标 */
.tn-features__icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: transform 0.2s;
}

.tn-features__item:hover .tn-features__icon {
    transform: scale(1.1);
}

/* Modifier: 不同功能的颜色 */
.tn-features__icon--upload {
    background: #fef3c7;
    color: #f59e0b;
}

.tn-features__icon--search {
    background: #dbeafe;
    color: #3b82f6;
}

.tn-features__icon--exam {
    background: #fce7f3;
    color: #ec4899;
}

.tn-features__icon--practice {
    background: #d1fae5;
    color: #10b981;
}

.tn-features__icon--analysis {
    background: #e0e7ff;
    color: #6366f1;
}

.tn-features__icon--prepare {
    background: #fed7aa;
    color: #f97316;
}

/* Element: 功能文字 */
.tn-features__text {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

/* ============================================
   Block: tn-login-btn (登录按钮)
   ============================================ */
.tn-login-btn {
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.tn-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    color: #ffffff;
}

/* ============================================
   Block: tn-footer (底部区域)
   ============================================ */
.tn-footer {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.tn-footer__link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.tn-footer__link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ============================================
   Block: tn-spacer (占位元素)
   ============================================ */
.tn-spacer {
    height: 60px;
}


/* ============================================
   Responsive Design - 紧凑版（微信弹窗响应式见下方专用区域）
   ============================================ */

@media (max-width: 768px) {
    .tn-header__container {
        padding: 0 12px;
        gap: 8px;
        justify-content: center;
    }
    
    .tn-header__search {
        flex: 0 0 260px;
        margin: 0 10px 0 6px;
    }
    
    .tn-search__input {
        height: 34px;
        padding: 0 40px 0 12px;
        font-size: 0.8125rem;
    }
    
    .tn-search__btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
        right: 3px;
    }
    
    .tn-user-avatar {
        width: 30px;
        height: 30px;
        border-width: 1.5px;
    }
}

/* ============================================
   Responsive Design - 微信登录弹窗响应式（紧凑版）
   ============================================ */

@media (max-width: 1200px) {
    .tn-header__container { padding: 0 16px; gap: 10px; justify-content: center; }
    .tn-header__link { padding: 6px 8px; font-size: 0.8125rem; }
    .tn-header__search { flex: 0 0 320px; margin: 0 10px 0 8px; }
    .tn-user-avatar { width: 32px; height: 32px; }
    .tn-modal__container { max-width: 400px; }
    .tn-qr-container { min-height: 380px; max-height: 380px; }
    .tn-wxlogin-wrapper { width: 300px !important; height: 360px !important; min-height: 360px !important; max-height: 360px !important; }
    .tn-wxlogin-wrapper iframe { width: 300px !important; height: 360px !important; max-width: 300px !important; max-height: 360px !important; }
}

@media (max-width: 1100px) {
    .tn-header__search { max-width: 340px; }
}

@media (max-width: 992px) {
    .tn-header__nav { display: none; }
    .tn-header__search { flex: 0 0 400px; margin: 0 10px; }

    /* 弹窗平板 - 适配320x400 */
    .tn-modal__container { max-width: 380px; }
    .tn-modal__header { padding: 14px 16px 8px; }
    .tn-modal__title { font-size: 1.05rem; }
    .tn-modal__subtitle { font-size: 0.75rem; }
    .tn-modal__body { padding: 10px 16px 12px; }
    .tn-qr-container { min-height: 360px !important; max-height: 360px !important; border-radius: 11px; margin-bottom: 9px; }
    .tn-wxlogin-wrapper { width: 280px !important; max-width: 280px !important; min-height: 340px !important; max-height: 340px !important; height: 340px !important; padding: 4px 0 2px !important; }
    .tn-wxlogin-wrapper iframe { width: 280px !important; height: 340px !important; max-width: 280px !important; max-height: 340px !important; }
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] { max-width: 264px !important; }
    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] { max-width: 246px !important; }
    .tn-wxlogin-wrapper img { max-width: 68px !important; max-height: 68px !important; border-radius: 7px !important; }
    .tn-modal__footer { padding: 8px 14px 11px; }
    .tn-modal__agreement { font-size: 0.68rem; }
    .tn-wxlogin-profile { padding: 36px 16px 0; }
    .tn-wxlogin-avatar { width: 72px; height: 72px; margin-bottom: 8px; }
    .tn-wxlogin-nickname { font-size: 0.95rem; margin-bottom: 16px; }
    .tn-wxlogin-btn { padding: 10px 42px; font-size: 0.9rem; margin-bottom: 12px; }
    .tn-wxlogin-switch { font-size: 0.76rem; }

    /* 下拉菜单 - 平板适配（992px断点第一组） */
    .tn-user-menu { width: 220px; right: -12px; border-radius: 12px; }
    .tn-user-menu__header { padding: 14px 14px 12px; }
    .tn-user-menu__avatar { width: 40px; height: 40px; border-radius: 10px; }
    .tn-user-menu__name { font-size: 0.86rem; }
    .tn-user-menu__list li a { padding: 9px 10px; font-size: 0.82rem; gap: 8px; }
    .tn-menu-icon { width: 28px; height: 28px; border-radius: 7px; }
    .tn-menu-icon i { font-size: 0.76rem; }
    .tn-user-menu__logout { padding: 8px 18px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
    .tn-header__container { padding: 0 12px; gap: 8px; justify-content: center; }
    .tn-header__search { flex: 0 0 260px; margin: 0 10px 0 6px; }
    .tn-search__input { height: 34px; padding: 0 40px 0 12px; font-size: 0.8125rem; }
    .tn-search__btn { width: 26px; height: 26px; font-size: 11px; right: 3px; }
    .tn-user-avatar { width: 30px; height: 30px; border-width: 1.5px; }

    /* 平板/大屏手机 - 适配缩小尺寸 */
    .tn-modal__container { width: 94%; max-width: 360px; }
    .tn-modal__content { border-radius: 16px; }
    .tn-modal__header { padding: 13px 14px 7px; }
    .tn-modal__title { font-size: 1.02rem; margin-bottom: 3px; }
    .tn-modal__subtitle { font-size: 0.73rem; }
    .tn-modal__body { padding: 9px 14px 11px; }
    .tn-qr-container { min-height: 340px !important; max-height: 340px !important; border-radius: 10px; margin-bottom: 8px; border-width: 1.2px; }
    .tn-wxlogin-wrapper { width: 260px !important; max-width: 260px !important; min-height: 320px !important; max-height: 320px !important; height: 320px !important; padding: 4px 0 2px !important; }
    .tn-wxlogin-wrapper iframe { width: 260px !important; height: 320px !important; max-width: 260px !important; max-height: 320px !important; }
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] { max-width: 244px !important; }
    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] { max-width: 226px !important; }
    .tn-wxlogin-wrapper img { max-width: 64px !important; max-height: 64px !important; border-radius: 7px !important; }
    .tn-modal__footer { padding: 7px 12px 10px; }
    .tn-modal__agreement { font-size: 0.65rem; gap: 4px; }
    .tn-wxlogin-profile { padding: 32px 14px 0; }
    .tn-wxlogin-avatar { width: 68px; height: 68px; margin-bottom: 7px; border-radius: 10px; }
    .tn-wxlogin-nickname { font-size: 0.9rem; margin-bottom: 14px; }
    .tn-wxlogin-btn { padding: 10px 38px; font-size: 0.86rem; margin-bottom: 11px; }
    .tn-wxlogin-switch { font-size: 0.73rem; }
}

@media (max-width: 640px) {
    .tn-header__container { padding: 0 10px; gap: 6px; justify-content: center; }
    .tn-header__search { flex: 0 0 220px; margin: 0 8px 0 4px; }
    .tn-auth__login, .tn-auth__register { padding: 6px 12px; font-size: 0.75rem; }
    .tn-tooltip { width: 280px; right: -20px; }

    /* 小屏手机 */
    .tn-modal__container { width: 96%; max-width: 380px; }
    .tn-modal__content { border-radius: 14px; box-shadow: 0 14px 44px rgba(0,0,0,0.19), 0 0 0 1px rgba(0,0,0,0.04); }
    .tn-modal__close { top: 10px; right: 10px; width: 28px; height: 28px; font-size: 12px; }
    .tn-modal__header { padding: 14px 14px 8px; }
    .tn-modal__title { font-size: 1.05rem; margin-bottom: 4px; }
    .tn-modal__subtitle { font-size: 0.78rem; }
    .tn-modal__body { padding: 14px 16px 10px; }
    .tn-qr-container { min-height: 320px !important; max-height: 320px !important; border-radius: 12px; padding: 14px; }
    .tn-wxlogin-wrapper { width: 260px !important; max-width: 260px !important; min-height: 300px !important; max-height: 300px !important; height: 300px !important; padding: 0 !important; }
    .tn-wxlogin-wrapper iframe { width: 260px !important; height: 300px !important; max-width: 260px !important; max-height: 300px !important; }
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] { max-width: 194px !important; }
    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] { max-width: 176px !important; padding-left: 8px !important; padding-right: 8px !important; font-size: 0.88em !important; }
    .tn-wxlogin-wrapper img { max-width: 58px !important; max-height: 58px !important; border-radius: 6px !important; }
    .tn-qr-placeholder { padding: 20px 14px; }
    .tn-qr-placeholder i { font-size: 34px; margin-bottom: 8px; }
    .tn-qr-loading { padding: 22px 14px; }
    .tn-qr-loading .tn-qr-spinner { width: 28px; height: 28px; margin-bottom: 10px; }
    .tn-qr-fallback__link { padding: 18px 16px; gap: 6px; min-width: 160px; }
    .tn-qr-fallback__icon { width: 42px; height: 42px; font-size: 21px; }
    .tn-qr-fallback__text { font-size: 0.8375rem; }
    .tn-qr-fallback__sub { font-size: 0.7rem; }
    .tn-qr-tips { gap: 8px; margin-top: 2px; }
    .tn-qr-tip { padding: 6px 10px; font-size: 0.67rem; border-radius: 8px; gap: 3px; }
    .tn-qr-tip i { font-size: 15px; }
    .tn-qr-arrow { font-size: 12px; }
    .tn-modal__footer { padding: 8px 12px 10px; }
    .tn-modal__agreement { font-size: 0.63rem; gap: 3px; line-height: 1.4; }
    .tn-modal__agreement i { font-size: 0.72rem; }
    .tn-wxlogin-profile { padding: 28px 12px 0; }
    .tn-wxlogin-avatar { width: 64px; height: 64px; margin-bottom: 6px; border-radius: 10px; }
    .tn-wxlogin-nickname { font-size: 0.88rem; margin-bottom: 14px; }
    .tn-wxlogin-btn { padding: 9px 34px; font-size: 0.84rem; margin-bottom: 10px; border-radius: 5px; }
    .tn-wxlogin-switch { font-size: 0.7rem; }

    /* 下拉菜单 - 大屏手机适配（768px断点第一组） */
    .tn-user-menu { width: 200px; right: -16px; border-radius: 11px; }
    .tn-user-menu__header { padding: 12px 12px 10px; }
    .tn-user-menu__avatar { width: 36px; height: 36px; border-radius: 9px; }
    .tn-user-menu__name { font-size: 0.82rem; }
    .tn-user-menu__list li a { padding: 8px 9px; font-size: 0.78rem; gap: 7px; }
    .tn-menu-icon { width: 26px; height: 26px; border-radius: 6px; }
    .tn-menu-icon i { font-size: 0.72rem; }
    .tn-user-menu__logout { padding: 7px 16px; font-size: 0.77rem; }
}

@media (max-width: 400px) {
    /* 超小屏 */
    .tn-modal__container { width: 98%; max-width: 340px; }
    .tn-modal__content { border-radius: 12px; }
    .tn-modal__close { top: 8px; right: 8px; width: 26px; height: 26px; font-size: 11px; }
    .tn-modal__header { padding: 12px 12px 8px; }
    .tn-modal__title { font-size: 1rem; }
    .tn-modal__subtitle { font-size: 0.75rem; }
    .tn-modal__body { padding: 12px 14px 10px; }
    .tn-qr-container { min-height: 300px !important; max-height: 300px !important; border-radius: 10px; padding: 12px; }
    .tn-wxlogin-wrapper { width: 240px !important; max-width: 240px !important; min-height: 280px !important; max-height: 280px !important; height: 280px !important; padding: 0 !important; }
    .tn-wxlogin-wrapper iframe { width: 240px !important; height: 280px !important; max-width: 240px !important; max-height: 280px !important; }
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] { max-width: 184px !important; }
    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] { max-width: 168px !important; font-size: 0.84em !important; }
    .tn-qr-tip { padding: 5px 9px; font-size: 0.63rem; border-radius: 7px; }
    .tn-wxlogin-profile { padding: 24px 10px 0; }
    .tn-wxlogin-avatar { width: 58px; height: 58px; margin-bottom: 5px; border-radius: 8px; }
    .tn-wxlogin-nickname { font-size: 0.84rem; margin-bottom: 12px; }
    .tn-wxlogin-btn { padding: 8px 30px; font-size: 0.8rem; margin-bottom: 9px; border-radius: 5px; }
    .tn-wxlogin-switch { font-size: 0.68rem; }
}

@media (max-width: 1200px) {
    .tn-header__container {
        padding: 0 16px;
        gap: 10px;
        justify-content: center;
    }

    .tn-header__link {
        padding: 6px 8px;
        font-size: 0.8125rem;
    }

    .tn-header__search {
        flex: 0 0 320px;
        margin: 0 10px 0 8px;
    }

    .tn-user-avatar {
        width: 32px;
        height: 32px;
    }

    /* 弹窗中等屏幕 */
    .tn-modal__container {
        max-width: 380px;
    }
}

@media (max-width: 1100px) {
    .tn-header__search {
        max-width: 340px;
    }
}

@media (max-width: 992px) {
    .tn-header__nav {
        display: none;
    }

    .tn-header__search {
        flex: 0 0 400px;
        margin: 0 10px;
    }

    /* 弹窗平板 - 超紧凑 */
    .tn-modal__container {
        max-width: 380px;
    }

    .tn-modal__header {
        padding: 15px 20px 9px;
    }

    .tn-qr-container {
        height: 290px !important;
        border-radius: 12px;
    }

    .tn-wxlogin-wrapper {
        width: 248px !important;
        max-width: 248px !important;
        min-height: 240px !important;
    }

    .tn-wxlogin-wrapper iframe,
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] {
        max-width: 232px !important;
    }

    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] {
        max-width: 214px !important;
    }

    .tn-wxlogin-profile { padding: 36px 16px 0; }
    .tn-wxlogin-avatar { width: 72px; height: 72px; margin-bottom: 8px; }
    .tn-wxlogin-nickname { font-size: 0.95rem; margin-bottom: 16px; }
    .tn-wxlogin-btn { padding: 10px 42px; font-size: 0.9rem; margin-bottom: 12px; }
    .tn-wxlogin-switch { font-size: 0.76rem; }

    /* 下拉菜单 - 平板适配（992px断点第二组） */
    .tn-user-menu { width: 220px; right: -12px; border-radius: 12px; }
    .tn-user-menu__header { padding: 14px 14px 12px; }
    .tn-user-menu__avatar { width: 40px; height: 40px; border-radius: 10px; }
}

@media (max-width: 768px) {
    .tn-header__container {
        padding: 0 12px;
        gap: 8px;
        justify-content: center;
    }

    .tn-header__search {
        flex: 0 0 260px;
        margin: 0 10px 0 6px;
    }

    .tn-search__input {
        height: 34px;
        padding: 0 40px 0 12px;
        font-size: 0.8125rem;
    }

    .tn-search__btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
        right: 3px;
    }

    .tn-user-avatar {
        width: 30px;
        height: 30px;
        border-width: 1.5px;
    }

    /* ====== 微信弹窗 - 平板/大屏手机适配 ====== */
    .tn-modal__container {
        width: 94%;
        max-width: 360px;
    }

    .tn-modal__content {
        border-radius: 18px;
    }

    .tn-modal__header {
        padding: 13px 16px 7px;
    }

    .tn-modal__title {
        font-size: 1.05rem;
    }

    .tn-modal__subtitle {
        font-size: 0.75rem;
    }

    .tn-modal__body {
        padding: 9px 14px 11px;
    }

    .tn-qr-container {
        height: 275px !important;
        border-radius: 12px;
    }

    .tn-wxlogin-wrapper {
        width: 230px !important;
        max-width: 230px !important;
        min-height: 225px !important;
        padding: 4px 0 2px !important;
    }

    .tn-wxlogin-wrapper iframe,
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] {
        max-width: 214px !important;
    }

    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] {
        max-width: 198px !important;
    }

    .tn-wxlogin-wrapper img {
        max-width: 66px !important;
        max-height: 66px !important;
    }

    .tn-modal__footer {
        padding: 8px 12px 11px;
    }

    .tn-modal__agreement {
        font-size: 0.67rem;
    }

    .tn-wxlogin-profile { padding: 32px 14px 0; }
    .tn-wxlogin-avatar { width: 68px; height: 68px; margin-bottom: 7px; border-radius: 10px; }
    .tn-wxlogin-nickname { font-size: 0.9rem; margin-bottom: 14px; }
    .tn-wxlogin-btn { padding: 10px 38px; font-size: 0.86rem; margin-bottom: 11px; }
    .tn-wxlogin-switch { font-size: 0.73rem; }

    /* 下拉菜单 - 大屏手机适配（768px断点第二组） */
    .tn-user-menu { width: 200px; right: -16px; border-radius: 11px; }
    .tn-user-menu__header { padding: 12px 12px 10px; }
    .tn-user-menu__avatar { width: 36px; height: 36px; border-radius: 9px; }
}

@media (max-width: 640px) {
    .tn-header__container {
        padding: 0 10px;
        gap: 6px;
        justify-content: center;
    }

    .tn-header__search {
        flex: 0 0 220px;
        margin: 0 8px 0 4px;
    }

    .tn-auth__login,
    .tn-auth__register {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .tn-tooltip {
        width: 280px;
        right: -20px;
    }

    /* ====== 微信弹窗 - 小屏手机适配 ====== */
    .tn-modal__container {
        width: 96%;
        max-width: 340px;
    }

    .tn-modal__content {
        border-radius: 16px;
        box-shadow:
            0 16px 48px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(0, 0, 0, 0.04);
    }

    .tn-modal__close {
        top: 8px;
        right: 8px;
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .tn-modal__header {
        padding: 12px 12px 6px;
    }

    .tn-modal__title {
        font-size: 1rem;
    }

    .tn-modal__subtitle {
        font-size: 0.72rem;
    }

    .tn-modal__body {
        padding: 8px 12px 10px;
    }

    .tn-qr-container {
        height: 265px !important;
        border-radius: 10px;
        margin-bottom: 8px;
        border-width: 1.3px;
    }

    .tn-wxlogin-wrapper {
        width: 214px !important;
        max-width: 214px !important;
        min-height: 210px !important;
        padding: 3px 0 2px !important;
    }

    .tn-wxlogin-wrapper iframe,
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] {
        max-width: 198px !important;
    }

    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] {
        max-width: 180px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 0.85em !important;
    }

    .tn-wxlogin-wrapper img {
        max-width: 58px !important;
        max-height: 58px !important;
    }

    .tn-modal__footer {
        padding: 7px 12px 9px;
    }

    .tn-modal__agreement {
        font-size: 0.63rem;
        gap: 4px;
    }

    .tn-wxlogin-profile { padding: 28px 12px 0; }
    .tn-wxlogin-avatar { width: 64px; height: 64px; margin-bottom: 6px; border-radius: 10px; }
    .tn-wxlogin-nickname { font-size: 0.88rem; margin-bottom: 14px; }
    .tn-wxlogin-btn { padding: 9px 34px; font-size: 0.84rem; margin-bottom: 10px; border-radius: 5px; }
    .tn-wxlogin-switch { font-size: 0.7rem; }

    /* 下拉菜单 - 小屏手机适配（640px断点第二组） */
    .tn-user-menu { width: 190px; right: -20px; border-radius: 10px; }
    .tn-user-menu__header { padding: 11px 11px 9px; }
    .tn-user-menu__avatar { width: 34px; height: 34px; border-radius: 8px; }
}

@media (max-width: 400px) {
    /* ====== 微信弹窗 - 超小屏适配 ====== */
    .tn-modal__container {
        width: 98%;
        max-width: 300px;
    }

    .tn-modal__header {
        padding: 10px 10px 5px;
    }

    .tn-modal__title {
        font-size: 0.95rem;
    }

    .tn-modal__subtitle {
        font-size: 0.68rem;
    }

    .tn-modal__body {
        padding: 7px 10px 9px;
    }

    .tn-qr-container {
        height: 255px !important;
        border-radius: 8px;
        margin-bottom: 7px;
    }

    .tn-wxlogin-wrapper {
        width: 196px !important;
        max-width: 196px !important;
        min-height: 195px !important;
        padding: 3px 0 1px !important;
    }

    .tn-wxlogin-wrapper iframe,
    .tn-wxlogin-wrapper > div,
    .tn-wxlogin-wrapper [class*="wx"],
    .tn-wxlogin-wrapper [id*="wx"],
    .tn-wxlogin-wrapper [style*="width"] {
        max-width: 182px !important;
    }

    .tn-wxlogin-wrapper a,
    .tn-wxlogin-wrapper button,
    .tn-wxlogin-wrapper [role="button"] {
        max-width: 166px !important;
        font-size: 0.8em !important;
    }

    .tn-wxlogin-profile { padding: 24px 10px 0; }
    .tn-wxlogin-avatar { width: 58px; height: 58px; margin-bottom: 5px; border-radius: 8px; }
    .tn-wxlogin-nickname { font-size: 0.84rem; margin-bottom: 12px; }
    .tn-wxlogin-btn { padding: 8px 30px; font-size: 0.8rem; margin-bottom: 9px; border-radius: 5px; }
    .tn-wxlogin-switch { font-size: 0.68rem; }

    /* 下拉菜单 - 超小屏适配（400px断点第二组） */
    .tn-user-menu { width: 180px; right: -22px; border-radius: 9px; }
    .tn-user-menu__header { padding: 10px 10px 8px; }
    .tn-user-menu__avatar { width: 32px; height: 32px; border-radius: 8px; }
}
