/* 现代科技感CSS设计 */
:root {
    /* 全站淺色主題色板 */
    --primary-bg: #f7f9fc;
    --bg-primary: #f7f9fc;
    --secondary-bg: #ffffff;
    --accent-bg: #eef2f7;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(0, 0, 0, 0.05);
    --hover-bg: rgba(0, 0, 0, 0.06);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --neon-blue: #0078ff;
    --neon-purple: #7d32c9;
    --neon-pink: #d81b60;
    --text-primary: #1a1f2b;
    --text-secondary: #4a5568;
    --text-muted: #6b7280;
    --text-tertiary: #8a9ba8;
    --border-color: rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.12);
    --nav-bg: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-bg);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.10) 0%, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 抽屉打开时禁止背景滚动 */
body.drawer-open {
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
nav {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    z-index: 1001;
}

/* 頭部操作區（移動端語言切換 + 折疊按鈕） */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 移動端語言按鈕：桌面隱藏，移動端顯示 */
.lang-switch-mobile { display: none !important; }

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-gradient);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.mobile-menu-toggle.active span:first-child {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

  .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
    transform: translateY(-2px);
}

.nav-links a.active {
    color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.1);
}

/* 语言切换 */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent; /* 移除外层背景避免双外框 */
    padding: 0;              /* 去除外层内边距 */
    border-radius: 0;        /* 去除外层圆角 */
    border: 0;               /* 去除外层边框 */
}

/* Clickable language button */
.lang-button { 
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}
.lang-button:hover { background: rgba(0, 0, 0, 0.08); border-color: rgba(0, 0, 0, 0.25); }
.lang-button:focus { outline: none; border-color: rgba(0, 0, 0, 0.25); }
.lang-button-text { display: inline-flex; align-items: center; gap: 6px; }

/* Language menu button */
.lang-menu { position: relative; }
.lang-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;           /* 收紧高度，与个人中心视觉一致 */
  min-height: 30px;            /* 与个人中心按钮高度对齐 */
  font-size: 0.875rem;         /* 字号与个人中心统一 */
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;         /* 与个人中心一致 */
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.lang-menu-button::-webkit-details-marker { display: none; }
.lang-menu-button:hover { color: var(--text-primary); background: var(--hover-bg); border-color: var(--border-color); }
.lang-menu[open] .lang-menu-button { border-color: var(--border-color); }
.lang-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.10); /* 浅色圆圈背景 */
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--neon-blue);
  font-size: 0.68rem; /* 兼顾 EN 两字符与紧凑视觉 */
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.lang-menu-button .lang-icon { color: var(--neon-blue); }
.lang-caret { font-size: 0.8rem; opacity: 0.7; }

/* Dropdown panel */
.lang-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1200; /* 提升层级，确保位于导航与品牌之上 */
  pointer-events: auto; /* 显式允许点击 */
  width: 100%;             /* 与切换语言按钮保持一致宽度 */
  min-width: 100%;         /* 保证不小于按钮宽度 */
  box-sizing: border-box; /* 计入 padding/border */
  max-width: none;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  display: none;
}
.lang-menu[open] .lang-menu-list { display: inline-block; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  text-align: left;
  padding: 6px 8px;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
/* 图标样式：通用语言图标，避免国旗 */
.lang-item .lang-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  font-size: 0.68rem; /* 與按钮一致的紧凑尺寸 */
}

.lang-item .lang-text { color: var(--text-primary); }
.lang-item:hover { background: var(--hover-bg); }
.lang-item:focus { outline: none; background: var(--hover-bg); }
.lang-item.is-current { background: var(--hover-bg); }

/* 用户菜单下拉 */
.user-menu { position: relative; }
.user-menu-toggle {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.user-menu-toggle:hover { color: var(--text-primary); background: var(--hover-bg); }
.user-menu .caret { font-size: 0.8rem; opacity: 0.7; }
.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 0;
    width: fit-content;
    box-shadow: var(--shadow-card);
    display: none;
    padding: 8px;
    z-index: 1100;
}
.user-menu.open .user-menu-dropdown { display: inline-block; }
.user-menu-dropdown li { list-style: none; }
.user-menu-dropdown a {
    display: block;
    /* 使用主文本色，在深色背景上增加可读性 */
    color: var(--text-primary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
}
.user-menu-dropdown a:hover { background: var(--hover-bg); color: var(--neon-blue); }

.lang-switch a {
    padding: 6px 12px !important;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.lang-switch a.active {
    background: var(--primary-gradient);
    color: white;
}

/* Language select in navigation */
.lang-select {
    display: inline-block;
    min-width: 90px;
    padding: 6px 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    outline: none;
}
.lang-select:focus {
    border-color: rgba(0, 0, 0, 0.25);
}
/* Ensure readable options across browsers (dropdown is often white) */
.lang-select option {
    color: #000;
    background: #fff;
}

/* 英雄区 */
.hero {
    text-align: center;
    padding: 6rem 0;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 统计数据 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--neon-blue);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(181, 55, 242, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* 避免遮罩层拦截输入框点击 */
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), var(--shadow-glow);
    border-color: var(--neon-blue);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--glass-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--hover-bg);
    border-color: var(--neon-blue);
}

.btn-primary {
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-blue);
    border-color: rgba(0, 212, 255, 0.35);
}

.btn-primary:hover {
    background: rgba(0, 212, 255, 0.18);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--neon-blue);
    box-shadow: var(--shadow-glow);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
    border-color: rgba(234, 179, 8, 0.25);
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--glass-bg);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    /* 原生控件采用浅色配色，保证白底可读性 */
    color-scheme: light;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--accent-bg);
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

/* 特色标签 */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.feature-tag {
    padding: 4px 10px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 页面标题 */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* 响应式设计 */
/* 管理后台通用文字颜色修复 */
.admin-body *,
.admin-main *,
.admin-content *,
.admin-page * {
  color: inherit;
}

.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body h4,
.admin-body h5,
.admin-body h6 {
  color: var(--text-primary);
}

.admin-body p,
.admin-body span,
.admin-body div {
  color: var(--text-primary);
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none; /* 默认隐藏，避免初始渲染可见 */
        position: fixed;
        top: 0;
        right: 0;
        /* 使用 transform 控制抽屉隐藏/显示，避免百分比位移造成越界 */
        transform: translateX(100%);
        /* 默认完全不可见且不可交互，避免部分设备上出现半露 */
        opacity: 0;
        pointer-events: none;
        z-index: 1001;
        /* 移动端宽度自适应，避免过窄或越界 */
    width: min(72vw, 150px);
        height: 100vh;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 64px 1rem 1rem;
        gap: 1.5rem;
        transition: transform 0.3s ease;
        border-left: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        display: flex; /* 激活时展示 */
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* 移动端遮罩层（前台） */
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 950; /* 低于抽屉，高于页面内容 */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 10px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* 抽屜內語言菜單隱藏，改用頭部的移動端語言按鈕 */
    .nav-links .lang-switch { display: none !important; }

    /* 頭部的移動端語言按鈕樣式（顯示在折疊按鈕左側） */
    .lang-switch-mobile { 
        display: inline-flex !important; 
        width: auto; 
        justify-content: flex-start; 
        margin: 0; 
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .card {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Invite box left alignment tweak for desktop: slide into left empty space */
.exchange-card { /* 用变量统一控制左移偏移 */
    --logo-size: 64px;
    --content-gap: 1.5rem;
    --shift-left: calc(-1 * (var(--logo-size) + var(--content-gap)));
}

.invite-box.align-left {
    position: relative;
    z-index: 2;
    transform: translateX(var(--shift-left, -88px)); /* 64px logo + 1.5rem gap */
}

@media (max-width: 768px) {
    .invite-box.align-left {
        transform: translateX(var(--shift-left, -88px)); /* Keep desktop alignment */
    }
}

/* Mobile fixes: ensure text wraps without shifting layout */
@media (max-width: 768px) {
    /* Allow invite code to wrap if needed */
    .invite-box .invite-code {
        white-space: normal !important;
    }

    /* Fee badges should wrap lines to avoid horizontal clipping */
    .badges-row .badge {
        white-space: normal !important;
    }
}

/* Align fee badges with invite box on desktop */
.badges-row.align-left {
    position: relative;
    transform: translateX(var(--shift-left, -88px));
}

@media (max-width: 768px) {
    .badges-row.align-left {
        transform: translateX(var(--shift-left, -88px));
    }
}

/* Exchange detail: stack header on mobile so content aligns to left */
@media (max-width: 768px) {
    .exchange-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 认证页面样式 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--primary-bg);
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 119, 198, 0.2) 0%, transparent 50%);
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0.5;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--primary-gradient);
    margin-bottom: 1.5rem;
    color: white;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-label svg {
    color: var(--neon-blue);
}

.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color-scheme: dark;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* 修复 select 下拉选项在不同浏览器上的可读性（白底白字问题） */
.form-group select option,
.form-input option {
    background: #ffffff;
    color: #1a202c;
}
.form-group select option:disabled,
.form-input option:disabled {
    color: #7a7a7a;
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-hint svg {
    color: var(--neon-blue);
    flex-shrink: 0;
}

/* 复选框开关样式 */
.form-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.switch input[type="checkbox"] {
    appearance: none;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.2s ease;
}

.switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
}

.switch input[type="checkbox"]:checked {
    background: var(--primary-gradient);
    border-color: transparent;
}

.switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.switch .switch-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-actions {
    margin-top: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-full {
    width: 100%;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--neon-blue);
}

.auth-link svg {
    flex-shrink: 0;
}

.auth-divider {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.alert-error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: #51cf66;
}

.alert svg {
    flex-shrink: 0;
}

/* 文章页面样式 */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-category,
.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-category svg,
.article-date svg {
    color: var(--neon-blue);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.article-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 1.5rem;
}

/* 图片与媒体 */
.article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}
.article-body figure {
    margin: 1.5rem 0;
    text-align: center;
}
.article-body figcaption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 标题与文本排版 */
.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 {
    margin: 1.5rem 0 1rem;
    line-height: 1.4;
}
.article-body a { color: var(--neon-blue); text-decoration: underline; }
.article-body blockquote {
    border-left: 3px solid var(--border-color);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

/* 代码块 */
.article-body pre {
    background: rgba(0, 0, 0, 0.35);
    color: #e8e8e8;
    padding: 1rem;
    border-radius: 12px;
    overflow: auto;
}
.article-body code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-tags svg {
    color: var(--neon-blue);
}

.tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.article-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--neon-blue);
}

.action-btn svg {
    flex-shrink: 0;
}

/* 响应式设计 - 认证页面 */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .auth-divider {
        display: none;
    }
}

/* 响应式设计 - 文章页面 */
@media (max-width: 768px) {
    .article-container {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 2rem 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* 后台管理页面样式 */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.page-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 1rem;
}

/* 后台管理仪表板样式 */
.admin-dashboard {
    padding: 2rem 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--neon-blue);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-blue);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
}

.stat-trend.negative {
    color: #ef4444;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--neon-blue);
    text-decoration: none;
    color: inherit;
}

.action-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.action-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(181, 55, 242, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-purple);
}

.action-card-arrow {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.action-card:hover .action-card-arrow {
    color: var(--neon-blue);
    transform: translateX(4px);
}

.action-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.action-card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 后台管理表格样式 */
.admin-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

/* 访客列表专用：更紧凑的间距与列宽 */
.admin-table.visitors-table {
    table-layout: fixed;
}
.admin-table.visitors-table th,
.admin-table.visitors-table td {
    padding: 0.75rem 0.75rem;
    line-height: 1.4;
}
.admin-table.visitors-table thead th:nth-child(1),
.admin-table.visitors-table tbody td:nth-child(1) { width: 280px; }
.admin-table.visitors-table thead th:nth-child(2),
.admin-table.visitors-table tbody td:nth-child(2) { width: 160px; }
.admin-table.visitors-table thead th:nth-child(3),
.admin-table.visitors-table tbody td:nth-child(3) { width: 160px; }
.admin-table.visitors-table thead th:nth-child(4),
.admin-table.visitors-table tbody td:nth-child(4) { width: 220px; }
.admin-table.visitors-table thead th:nth-child(5),
.admin-table.visitors-table tbody td:nth-child(5) { width: 100px; text-align:right; }
.admin-table.visitors-table thead th:nth-child(6),
.admin-table.visitors-table tbody td:nth-child(6) { width: 180px; }
.admin-table.visitors-table thead th:nth-child(7),
.admin-table.visitors-table tbody td:nth-child(7) { width: 180px; }
.admin-table.visitors-table thead th:nth-child(8),
.admin-table.visitors-table tbody td:nth-child(8) { width: 90px; }

/* IP 与来源列溢出处理 */
.admin-table.visitors-table td code,
.admin-table.visitors-table td.truncate,
.admin-table.visitors-table .truncate {
    display: inline-block;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.admin-table.visitors-table td:nth-child(4) .truncate {
    max-width: 220px;
}

/* IP详情信息表更紧凑 */
.admin-table.visitors-info th,
.admin-table.visitors-info td {
    padding: 0.6rem 0.75rem;
}

.admin-table thead {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    padding: 1.5rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-content:hover {
    color: var(--text-primary);
}

.header-content svg {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.header-content:hover svg {
    opacity: 1;
    color: var(--neon-blue);
}

.table-row {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-table td {
    padding: 1.5rem 1rem;
    vertical-align: middle;
    color: var(--text-primary);
}

.table-cell-id {
    width: 80px;
}

.id-badge {
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.table-cell-name {
    min-width: 250px;
}

.article-info, .exchange-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-icon, .exchange-icon {
    width: 40px;
    height: 40px;
    background: rgba(181, 55, 242, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-purple);
    flex-shrink: 0;
}

.article-details, .exchange-details {
    flex: 1;
    min-width: 0;
}

.article-details .article-title, .exchange-details .exchange-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-meta, .exchange-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item svg {
    flex-shrink: 0;
}

.slug-code {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-blue);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.rebate-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.no-rebate {
    color: var(--text-muted);
    font-style: italic;
}

.url-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--neon-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.url-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--neon-blue);
    text-decoration: none;
}

.edit-btn:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.delete-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.delete-form {
    display: inline;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* 文章页面样式 */
.articles-page {
    padding: 2rem 0;
}

.articles-header {
    padding: 1.5rem 0 2rem;
}

.articles-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.articles-hero .hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-blue);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
}

.articles-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 0.25rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card);
    border-color: var(--neon-blue);
    text-decoration: none;
    color: inherit;
}

.article-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.35), var(--shadow-card);
    border-color: var(--neon-blue);
}

.article-card-header {
    padding: 2rem 2rem 0;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-card-icon {
    width: 32px;
    height: 32px;
    background: rgba(181, 55, 242, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-purple);
}

.article-card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-card-content {
    padding: 0 2rem 2rem;
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.article-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.read-more-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--neon-blue);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.read-more-btn svg {
    transition: all 0.3s ease;
}

.read-more-btn:hover svg {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .article-card-header {
        padding: 1.25rem 1.25rem 0;
    }
    .article-card-content {
        padding: 0 1.25rem 1.25rem;
    }
}

/* 响应式设计 - 后台管理页面 */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .dashboard-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-page-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .page-header-content {
        width: 100%;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .action-card {
        padding: 1.5rem;
    }
    
    .table-wrapper {
        overflow-x: scroll;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 1rem 0.75rem;
    }
    
    .article-info, .exchange-info {
        gap: 0.75rem;
    }
    
    .article-icon, .exchange-icon {
        width: 32px;
        height: 32px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card-header {
        padding: 1.5rem 1.5rem 0;
    }
    
    .article-card-content {
        padding: 0 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        justify-content: center;
    }
    
    .empty-state {
        padding: 3rem 1rem;
    }
    
    .empty-icon {
        width: 60px;
        height: 60px;
    }
}

/* ===== 管理后台布局样式 ===== */
.admin-body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

/* 管理后台导航栏 */
.admin-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.admin-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 2rem;
  max-width: none;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.admin-logo:hover {
  color: var(--neon-blue);
}

.admin-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-radius: 10px;
  color: white;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.admin-nav-link:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.admin-logout:hover {
  background: rgba(248, 81, 73, 0.1);
  color: #f85149;
}

/* 管理后台布局 */
.admin-layout {
  display: flex;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* 侧边栏 */
.admin-sidebar {
  position: fixed;
  left: 0;
  top: 64px;
  width: 280px;
  height: calc(100vh - 64px);
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 900;
  transition: transform 0.3s ease;
}

.admin-sidebar-content {
  padding: 2rem 0;
}

.admin-menu-section {
  margin-bottom: 2rem;
}

.admin-menu-title {
  padding: 0 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.admin-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-menu-item {
  margin-bottom: 0.25rem;
}

.admin-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  position: relative;
}

.admin-menu-link:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.admin-menu-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
  color: var(--neon-blue);
  font-weight: 600;
}

.admin-menu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--neon-blue);
}

/* 主要内容区域 */
.admin-main {
  flex: 1;
  margin-left: 280px;
  min-height: calc(100vh - 64px);
  color: var(--text-primary);
}

.admin-content {
  padding: 2rem;
  max-width: none;
  color: var(--text-primary);
}

/* 移动端遮罩层 */
.admin-overlay {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 850;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.admin-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 移动端菜单按钮 */
.admin-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--hover-bg);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-menu-toggle:hover {
  background: var(--border-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .admin-nav-container {
    padding: 0 1.5rem;
  }
  
  .admin-content {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .admin-nav-container {
    padding: 0 1rem;
  }
  
  .admin-menu-toggle {
    display: flex;
  }
  
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.active {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-content {
    padding: 1rem;
  }
  
  .admin-logo-text {
    display: none;
  }
  
  .admin-nav-actions {
    gap: 0.5rem;
  }
  
  .admin-nav-link span {
    display: none;
  }
}

@media (max-width: 480px) {
  .admin-nav-container {
    padding: 0 0.75rem;
  }
  
  .admin-content {
    padding: 0.75rem;
  }
  
  .admin-logo-icon {
    width: 32px;
    height: 32px;
  }
}

/* 管理后台页面通用样式增强 */
.admin-page {
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--text-primary);
}

.admin-dashboard,
.admin-articles,
.admin-exchanges {
  background: transparent;
  color: var(--text-primary);
}

/* 语言选项卡样式 */
.lang-tabs { margin-top: 0.5rem; }
.lang-tabs .tab-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.lang-tabs .tab-btn {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
}
.lang-tabs .tab-btn:hover { color: var(--text-primary); background: var(--hover-bg); }
.lang-tabs .tab-btn.active { color: var(--neon-blue); border-color: var(--neon-blue); }
.lang-tabs .tab-panels { padding-top: 0.75rem; }
.lang-tabs .tab-panel { display: none; }
.lang-tabs .tab-panel.active { display: block; }

/* 后台文章上传控件 */
.upload-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.upload-bar .form-input {
  padding: 0.5rem 0.75rem;
}
.upload-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* 确保所有管理后台页面都有合适的间距 */
.admin-content > .admin-page {
  margin: 0;
}

.admin-content > .admin-page > * {
  margin-bottom: 2rem;
  color: inherit;
}

.admin-content > .admin-page > *:last-child {
  margin-bottom: 0;
}

/* 管理后台：表单与筛选控件的可读性修复 */
.admin-page .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem 1rem;
}

.admin-page .form-row label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

/* 通用输入控件（不依赖 .form-group/.form-input 包装） */
.admin-page input[type="text"],
.admin-page input[type="number"],
.admin-page input[type="email"],
.admin-page input[type="password"],
.admin-page input[type="date"],
.admin-page input[type="datetime-local"],
.admin-page textarea,
.admin-page select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--glass-bg);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  color-scheme: dark; /* 强制暗色控件渲染，避免白底白字 */
}

.admin-page input[type="text"]::placeholder,
.admin-page input[type="number"]::placeholder,
.admin-page input[type="email"]::placeholder,
.admin-page input[type="password"]::placeholder,
.admin-page textarea::placeholder {
  color: var(--text-muted);
}

.admin-page input[type="text"]:focus,
.admin-page input[type="number"]:focus,
.admin-page input[type="email"]:focus,
.admin-page input[type="password"]:focus,
.admin-page input[type="date"]:focus,
.admin-page input[type="datetime-local"]:focus,
.admin-page textarea:focus,
.admin-page select:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

/* 修复原生下拉的选项在不同浏览器的白底可读性 */
.admin-page select option {
  background: #ffffff;
  color: #1a202c;
}
.admin-page select option:disabled { color: #7a7a7a; }

/* 日期控件在暗色主题下的细节优化 */
.admin-page input[type="date"] {
  min-height: 40px;
  padding-right: 38px; /* 为原生日历图标留出空间，避免文字拥挤 */
}
.admin-page input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.85;
}
.admin-page input[type="date"]::-webkit-datetime-edit,
.admin-page input[type="date"]::-webkit-datetime-edit-text,
.admin-page input[type="date"]::-webkit-datetime-edit-month-field,
.admin-page input[type="date"]::-webkit-datetime-edit-day-field,
.admin-page input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text-primary);
}

/* 日期时间控件：与 date 保持一致的暗色优化与尺寸 */
.admin-page input[type="datetime-local"] {
  min-height: 40px;
  padding-right: 38px; /* 为原生日历/时间图标留出空间 */
}
.admin-page input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.85;
}
.admin-page input[type="datetime-local"]::-webkit-datetime-edit,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-text,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-month-field,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-day-field,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-year-field,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
.admin-page input[type="datetime-local"]::-webkit-datetime-edit-second-field {
  color: var(--text-primary);
}
.admin-page input[type="date"]:focus,
.admin-page input[type="datetime-local"]:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

/* 行内表单（返佣录入） */
.admin-page .form-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-page .form-inline input[type="number"],
.admin-page .form-inline input[type="text"] {
  height: 36px;
  padding: 8px 10px;
}
.admin-page .form-inline .btn { height: 36px; padding: 8px 14px; }
.admin-page .form-inline .btn { white-space: nowrap; }

/* 筛选区按钮间距优化 */
.admin-page .form-actions { display: flex; gap: 10px; align-items: center; }

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .card {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}
.badges-row { /* 下移以避免与左侧Logo/标题重叠 */
    margin-top: 2rem; /* ≈32px（再下移约20px）*/
}
/* 文章正文表格基础样式，确保前台表格清晰显示 */
.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
.article-body th, .article-body td {
  border: 1px solid rgba(0,0,0,0.12);
  padding: 8px 12px;
}
.article-body th {
  background: #f7f9fc;
  font-weight: 600;
}
/* 后台：wangEditor 背景与边框适配 */
.admin-page .wangeditor-container .w-e-text-container {
  background: #fff !important;
}
.admin-page .wangeditor-container .w-e-menu {
  background: #fff !important;
}
/* wangEditor v5 类名兼容 */
.admin-page .wangeditor-container .w-e-toolbar {
  background: #fff !important;
}
.admin-page .wangeditor-container .w-e-text {
  background: #fff !important;
}
