/* public/style.css - Dark Theme UI Style */

/* --- 1. 基础设定与变量 --- */
:root {
    /* 核心色彩 - 黑色暗黑主题 */
    --bg-desktop: #0a0a0a;
    /* 桌面底色 */
    --bg-mica: rgba(18, 18, 18, 0.9);
    /* Mica 材质底色 */
    --bg-acrylic: rgba(30, 30, 30, 0.85);
    /* Acrylic 材质底色 */
    --bg-element: rgba(40, 40, 40, 0.6);
    /* 内部元素底色 */
    --bg-element-hover: rgba(55, 55, 55, 0.8);

    /* 文字颜色 */
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --text-placeholder: #707070;

    /* 核心强调色 - 蓝色蓝点缀（默认） */
    --accent-color: #4cc2ff;
    --accent-hover: #62cdff;
    --accent-active: #3ab5f0;
    /* Accent color RGB for rgba-based usage in themes */
    --accent-color-rgb: 76, 194, 255;

    /* 边框与阴影 */
    --border-light: rgba(255, 255, 255, 0.08);
    /* 质感边框 */
    --border-highlight: rgba(255, 255, 255, 0.12);
    /* 顶部高光边框 */
    --shadow-window: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    /* 窗口阴影 */
    --shadow-element: 0 2px 8px rgba(0, 0, 0, 0.3);

    /* 圆角 (Win11 标准通常是 4px/8px) */
    --radius-window: 12px;
    --radius-card: 8px;
    --radius-btn: 6px;

    /* 动画过渡 (Fluent 曲线) */
    --transition-fast: 0.15s cubic-bezier(0, 0, 0, 1);
    --transition-smooth: 0.3s cubic-bezier(0.85, 0, 0.15, 1);
    /* 取消自定义启动动画文本定位变量，回退到原始定位 */
}

/* 新增前端主题 - 绿主题（#2adb5c） */
.theme-green {
    --accent-color: #2adb5c;
    --accent-hover: #2bd274;
    --accent-active: #1f8f46;
    --accent-color-rgb: 42, 219, 92;
}

/* 浅色主题已删除 - 仅保留绿与蓝两种主题 */
/* Theme dropdown controls (compact visual) */
.theme-dropdown { position: relative; display: inline-block; }
.theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.theme-dropdown .chevron { transition: transform 0.25s ease; }
.theme-dropdown.open .chevron { transform: rotate(180deg); }
.theme-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 120px;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-element);
    padding: 6px 0;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
    z-index: 60;
    display: block;
}
.theme-dropdown.open #themeMenu {
    display: block !important;
    transform: scaleY(1);
    opacity: 1;
}
.theme-dropdown.open .theme-toggle .chevron {
    transform: rotate(180deg);
}
.theme-dropdown.open .theme-toggle .chevron {
    transform: rotate(180deg);
}
.theme-menu .theme-option {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.theme-menu .theme-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

body {
    /* 纯黑背景 */
    background: #000000;
    color: var(--text-main);
    /* 优先使用系统 UI 字体以贴近原生 */
    font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 隐藏滚动条但保留功能 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-clip: padding-box;
    border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Win11 Acrylic (亚克力) 材质基础类 */
.glass-panel {
    background: var(--bg-acrylic);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border: 1px solid var(--border-light);
    border-top: 1px solid var(--border-highlight);
    border-radius: var(--radius-window);
    box-shadow: var(--shadow-window);
}

/* 稍深的控制面板侧边栏材质 (Mica) */
.glass-panel-dark {
    background: var(--bg-mica);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border-right: 1px solid var(--border-light);
}

/* 屏幕层级与显隐控制 */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--transition-smooth);
    z-index: 10;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

.hidden {
    display: none !important;
    pointer-events: none !important;
}

/* 文本渐变特效 (暗色主题亮色渐变) */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-color) 0%, #a78bfa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-textA1 {
    background: linear-gradient(200deg, var(--accent-color) 0%, #a78bfa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* --- 2. 验证页面与启动动画 --- */
.verify-page {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

/* 极其微弱的弥散光模拟暗色壁纸光泽 */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
}

.glow-1 {
    width: 50vw;
    height: 50vw;
    background: rgba(var(--accent-color-rgb), 0.12);
    top: -10%;
    left: -10%;
}

.glow-2 {
    width: 40vw;
    height: 40vw;
    background: rgba(167, 139, 250, 0.1);
    bottom: -10%;
    right: -10%;
}

.verify-container {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
}

.logo-large {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.verify-container h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.verify-container .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.code-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 4px;
    padding: 12px 16px;
    border-radius: var(--radius-btn) var(--radius-btn) 0 0;
    outline: none;
    font-family: monospace;
    transition: var(--transition-fast);
}

.code-input::placeholder {
    color: var(--text-placeholder);
    letter-spacing: 1px;
    font-family: "Segoe UI", sans-serif;
    font-size: 0.95rem;
}

.code-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-bottom-color: var(--accent-color);
}

/* Win11 风格的 Standard Button */
.neon-btn {
    background: var(--accent-color);
    border: 1px solid transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 400;
    border-radius: var(--radius-btn);
    cursor: pointer;
    width: 100%;
    transition: var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.neon-btn:hover {
    background: var(--accent-hover);
}

.neon-btn:active {
    background: var(--accent-active);
    transform: scale(0.98);
}

.neon-btn.small {
    padding: 8px 18px;
    font-size: 1rem;
    width: auto;
}

.neon-btn.outline {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    border-top: 1px solid var(--border-highlight);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.neon-btn.outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.error-text {
    color: #ff6b6b;
    /* 暗色主题错误红 */
    font-size: 0.85rem;
    margin-top: 16px;
    opacity: 0;
    transition: var(--transition-fast);
    min-height: 20px;
}

.error-text.show {
    opacity: 1;
    transform: translateY(-2px);
}

/* Fluent UI 平滑震动 (更收敛) */
.shake {
    animation: fluent-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes fluent-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}


/* --- 3. 初始登录迎送动画 --- */
.anim-overlay {
    background: #000000;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
}

.anim-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.anim-container.stack-layout {
    flex-direction: column;
    gap: 24px;
}

/* 高级毛玻璃渐显切换动画 */
.anim-step {
    position: absolute;
    opacity: 0;
    transform: translateY(24px) scale(0.95);
    filter: blur(8px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    /* 模拟极滑的物理减速 */
    text-align: center;
    pointer-events: none;
    will-change: transform, opacity, filter;
}

.anim-step.static-step {
    position: relative;
    transform: translateY(30px);
}

.anim-step.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

.anim-step.exit {
    opacity: 0;
    transform: translateY(-24px) scale(1.05);
    filter: blur(8px);
}

/* 原始文本定位样式回退 */
.anim-step.text-en {
    font-size: 7rem;
    color: var(--text-main);
    font-weight: 700;
    top: -90px;
    letter-spacing: 10px;
}

.anim-step.text-cn {
    font-size: 5.8rem;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 10px;
    top: -60px;
}

.anim-step.text-huge {
    font-size: 5.8rem;
    font-weight: 700;
    letter-spacing: 6px;
    line-height: 1.4;
    top: -50px;
}

/* --- 4. 真正主界面布局 --- */
.main-layout {
    display: flex;
    flex-direction: column;
    z-index: 50;
}

/* Top Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    height: 75px;
    position: relative;
    z-index: 60;
    background: var(--bg-mica);
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.top-nav:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-left .logo {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-main);
}

.nav-left .logo-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.nav-left .logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* 调整登录页 Logo 尺寸（便于后续微调） */
#verifyScreen .logo-large img.logo-img.login-logo {
    width: 280px;
    height: 280px;
    object-fit: contain;
}

.nav-divider {
    color: rgb(255, 255, 255);
    font-size: 1.5rem;
}

.nav-slogan {
    font-size: 1.55rem;
    font-weight: 350;
    color: rgba(255, 255, 255, 0.8);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Avatar Dropdown System */
.user-avatar-container {
    position: relative;
    cursor: pointer;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.avatar-svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.user-avatar-container:hover .avatar-circle {
    background: var(--accent-hover);
}

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    display: flex;
    flex-direction: column;
    padding: 6px;
    background: var(--bg-acrylic);
    backdrop-filter: blur(30px) saturate(125%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-window);
    transition: var(--transition-fast);
}

.user-avatar-container.open .avatar-dropdown {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 12px;
    border-radius: var(--radius-btn);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
    color: var(--text-main);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.user-info {
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    margin-bottom: 4px;
    padding-bottom: 12px;
}

.dropdown-item.user-info .value {
    font-family: monospace;
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-item.logout-btn {
    color: #ff6b6b;
    margin-top: 4px;
}

.dropdown-item.logout-btn:hover {
    background: rgba(255, 107, 107, 0.15);
}

/* 主区域 - Side & Main */
.main-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 24px;
    gap: 24px;
    background: transparent;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    border-radius: var(--radius-window);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    /* 取消独立背景，让它融入全局或者使用 Acrylic */
    background: var(--bg-acrylic);
    box-shadow: var(--shadow-element);
    border: 1px solid var(--border-light);
    border-top: 1px solid var(--border-highlight);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    padding: 14px 16px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1.5;
}

.nav-indicator {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 4px;
    transition: var(--transition-fast);
    opacity: 0;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.nav-item.active .nav-indicator {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

/* Main Content Area */
.content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-window);
    display: flex;
    flex-direction: column;
    /* 内容区背景 */
    background: rgba(20, 20, 20, 0.9);
    box-shadow: var(--shadow-window);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.content-scroll-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 32px;
}

.content-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
}

.content-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.view-panel {
    animation: fluentFadeUp 0.3s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

@keyframes fluentFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Markdown 富文本静态展示区 */
.content-box {
    line-height: 1.8;
    font-size: 1rem;
}

.markdown-body {
    padding: 8px 0;
}

/* 大标题 */
.markdown-body .page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(var(--accent-color-rgb), 0.3);
}

.markdown-body h2 {
    margin-top: 28px;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.markdown-body h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent-color), #a78bfa);
    border-radius: 2px;
}

.markdown-body p {
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 0.98rem;
}

.markdown-body .intro-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(76, 194, 255, 0.1), rgba(167, 139, 250, 0.1));
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
    margin-bottom: 24px;
}

.markdown-body a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(76, 194, 255, 0.4);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

.markdown-body a:hover {
    border-bottom-color: #62cdff;
    color: #62cdff;
}

/* 服务卡片 */
.markdown-body .service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
}

.markdown-body .service-card:hover {
    background: rgba(76, 194, 255, 0.08);
    border-color: rgba(76, 194, 255, 0.25);
    transform: translateX(4px);
}

.markdown-body .service-name {
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
}

.markdown-body .service-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(var(--accent-color-rgb), 0.12);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 深度合作卡片 */
.markdown-body .custom-card {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(76, 194, 255, 0.1));
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.markdown-body .custom-card h3 {
    color: #a78bfa;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.markdown-body .custom-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

/* 重要提示 */
.markdown-body .notice {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.25);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 16px 0;
    color: #ff8a8a;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 时间线 */
.markdown-body .timeline {
    position: relative;
    padding-left: 28px;
    margin: 20px 0;
}

.markdown-body .timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), rgba(var(--accent-color-rgb), 0.2));
}

.markdown-body .timeline-item {
    position: relative;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.markdown-body .timeline-item::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 18px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(76, 194, 255, 0.6);
}

.markdown-body .timeline-date {
    font-size: 0.85rem;
    color: #a78bfa;
    font-weight: 600;
    margin-bottom: 6px;
}

.markdown-body .timeline-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.92rem;
}

/* 链接卡片 */
.markdown-body .link-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin: 10px 0;
}

.markdown-body .link-card-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.markdown-body .link-card-title::before {
    content: "🔗";
    font-size: 1rem;
}

.markdown-body .link-card a {
    display: block;
    padding: 10px 14px;
    margin: 6px 0;
    background: rgba(76, 194, 255, 0.06);
    border-radius: 6px;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    word-break: break-all;
}

.markdown-body .link-card a:hover {
    background: rgba(76, 194, 255, 0.15);
    transform: none;
}

/* 卡片网格区 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding-bottom: 20px;
}

/* Win11 Card 质感深度设计 */
.token-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* 暗色边框 */
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-card);
    transition: var(--transition-fast);
    position: relative;
    box-shadow: var(--shadow-element);
}

.token-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* 卡片顶部：Logo与标题 */
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 扁平化浅色站标徽章 */
.card-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-btn);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    flex-shrink: 0;
    overflow: hidden;
}

.card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title-group {
    flex: 1;
    overflow: hidden;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.card-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    background: rgba(76, 194, 255, 0.12);
    color: var(--accent-color);
}

/* 卡片文本说明信息 */
.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* 卡片底部：操作按钮区 */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.action-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: var(--radius-btn);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
}

/* --- 5. 模态框与弹窗系统 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.6);
    /* 半透明暗色背景 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: #1a1a1a;
    /* 深色弹窗 */
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 1001;
    border-radius: var(--radius-window);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.large-modal {
    max-width: 66vw;
    width: 66vw;
    height: 85vh;
    max-height: 85vh;
}

.popup-anim {
    transition: transform 0.3s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.3s;
}

.modal-overlay.hidden .popup-anim {
    transform: scale(0.95);
    opacity: 0;
}

.modal-overlay:not(.hidden) .popup-anim {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 20px 24px 12px;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6b6b;
    /* 暗色主题关闭按钮红 */
}

.modal-body {
    padding: 0 24px 24px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.large-modal .modal-body {
    min-height: 0;
    padding: 16px;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.center-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.qr-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    padding: 12px;
    background: #ffffff;
    border-radius: var(--radius-window);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-element);
    margin-bottom: 20px;
    overflow: hidden;
}

.qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fluent 扫描线效果 */
.scan-line {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(0, 103, 192, 0.3));
    animation: fluent-scan 3s infinite linear;
}

@keyframes fluent-scan {
    0% {
        transform: translateY(-100px);
    }

    100% {
        transform: translateY(300px);
    }
}

.qr-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.qr-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.preview-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    height: 100%;
    align-content: flex-start;
}

.gallery-img {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-card);
    transition: var(--transition-fast);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .gallery-img {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .gallery-img {
        min-height: 200px;
    }
}

/* Empty State / 离线状态 UI */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
}

.empty-icon {
    stroke: var(--text-placeholder);
    margin-bottom: 16px;
}
/*日志区预格式文本美化*/
pre {
  white-space: pre-wrap; /* 保留空白折行，同时自动换行 */
  word-break: break-word;
  font-family: ui-monospace,SFMono-Regular,Monaco,Consolas,monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 12px;
  margin: 12px 0;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  color: #e8e8e8;
}
