/* ============================================================
   在线工具站 深夜蓝玻璃一体化主题（tools-theme.css）v3
   配色体系：Slate Professional（SaaS 深色主题标杆）
   - 背景  #0F172A 深夜蓝渐变（slate-900 → slate-800）
   - 面板  #1E293B slate-800 半透明玻璃
   - 强调  #38BDF8 天蓝（sky-400）/ 亮文字 #7DD3FC
   - 成功  #10B981 翡翠绿    警示  #F59E0B 琥珀
   - 文字  #F1F5F9 主文字 / #94A3B8 次要文字
   设计语言：所有面板统一「半透明深蓝玻璃」材质，
   白字 + 天蓝强调，消灭框中框与拼接感。
   加载顺序：wt/style.css → main.css → 本文件（覆盖视觉层，布局骨架与 JS 钩子不动）
   ============================================================ */

/* ---------------- 主题变量（深玻璃语言） ---------------- */
:root {
    --tech-dark: #0b1220;                       /* 最深蓝黑：深色按钮/表头基底 */
    --tech-blue: #7dd3fc;                       /* 亮天蓝：链接/h3/强调文字 */
    --tech-light: #38bdf8;
    --tech-accent: #38bdf8;
    --tech-bg: transparent;
    --tech-card: rgba(30, 41, 59, 0.52);
    --tech-border: rgba(56, 189, 248, 0.24);
    --glass-line: rgba(148, 163, 184, 0.16);    /* 二级块统一细灰蓝边 */
    --glass-block: rgba(2, 6, 23, 0.32);        /* 二级块统一深玻璃底 */
    --ink-strong: #f1f5f9;                      /* 主文字 slate-100 */
    --ink-soft: rgba(203, 213, 225, 0.78);      /* 次要文字 slate-300 */
    --ink-faint: rgba(148, 163, 184, 0.70);     /* 弱提示 slate-400 */
}

/* ---------------- 全局组件：表单控件基线（全站统一，覆盖旧原生白底） ----------------
   本主题是全站最后加载的覆盖层，裸元素选择器即可统一所有页面（工具站/授权中心/工具面板）。
   特殊容器内的差异只允许微调（如表格单元格内去边框），颜色/字号/内边距不得另起炉灶。 */
select,
input[type="text"],
input[type="number"],
textarea {
    padding: 7px 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.45);
    color: #f1f5f9;
    font-size: 13px;
    outline: none;
    box-shadow: none;
}
select option {
    background: #1e293b;
    color: #f1f5f9;
}
select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: rgba(56, 189, 248, 0.55);
}
/* 浏览器自动填充(autofill)会强制黄底，用内阴影覆盖回深玻璃 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(2, 6, 23, 0.85) inset;
    -webkit-text-fill-color: #f1f5f9;
    caret-color: #f1f5f9;
    transition: background-color 99999s ease-out;
}

/* ---------------- 深夜蓝渐变背景 + 光晕 ---------------- */
html, body {
    height: 100%;
}
body {
    background: linear-gradient(145deg, #0f172a 0%, #14213a 45%, #1b2a44 100%);
    background-attachment: fixed;
    color: var(--ink-strong);
    min-height: 100vh;
    position: relative;
}
body::before {
    content: "";
    position: fixed;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.13) 0%, transparent 72%);
    top: -150px;
    left: -170px;
    z-index: 0;
    pointer-events: none;
    animation: glowDrift1 16s ease-in-out infinite alternate;
}
body::after {
    content: "";
    position: fixed;
    width: 640px;
    height: 640px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    bottom: -220px;
    right: -200px;
    z-index: 0;
    pointer-events: none;
    animation: glowDrift2 20s ease-in-out infinite alternate;
}
@keyframes glowDrift1 {
    from { transform: translate(0, 0); }
    to   { transform: translate(60px, 40px); }
}
@keyframes glowDrift2 {
    from { transform: translate(0, 0); }
    to   { transform: translate(-70px, -50px); }
}
.content-container,
.site-footer {
    position: relative;
    z-index: 1;
}

/* ---------------- 顶栏：深蓝玻璃 ---------------- */
.top-bar {
    background: rgba(13, 20, 36, 0.78);
    border-bottom: 1px solid rgba(56, 189, 248, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.site-name {
    background: linear-gradient(90deg, #e0f2fe, #7dd3fc 55%, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.30);
}
.top-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.28);
}
.top-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.4);
}
.login-btn {
    background: transparent;
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.55);
}
.login-btn:hover {
    background: rgba(56, 189, 248, 0.10);
}
.register-btn {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    border: none;
}
.register-btn:hover {
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}
.logout-btn {
    background: rgba(2, 6, 23, 0.35);
    color: var(--ink-soft);
    border: 1px solid rgba(148, 163, 184, 0.20);
}
.user-name {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.user-name:hover {
    background: rgba(56, 189, 248, 0.20);
}

/* ---------------- 导航：更深的蓝玻璃 ---------------- */
.nav-bar {
    background: rgba(9, 14, 27, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 3px 14px rgba(2, 6, 23, 0.45);
    /* 导航不再居中：与内容区同宽、左对齐 */
    justify-content: flex-start;
    padding: 0 20px;
}
.nav-menu {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
}
.nav-link {
    color: rgba(203, 213, 225, 0.85);
}
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
    border-bottom: 2px solid #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

/* ---------------- 内容面板：深蓝玻璃 ---------------- */
.content-section {
    display: none;
    background: rgba(30, 41, 59, 0.52);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.45);
    color: var(--ink-strong);
}
.content-section.active {
    display: block;
}

/* ---------------- 标题 ---------------- */
.main-header {
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}
.main-header h1 {
    background: linear-gradient(90deg, #f1f5f9, #7dd3fc 60%, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}
.main-header p {
    color: var(--ink-soft);
}

/* ---------------- 按钮 ---------------- */
.btn-compact {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.30);
}
.btn-compact:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
}
.btn-primary-compact {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    border: none;
}
.btn-primary-compact:hover {
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}
.btn-secondary-compact {
    background: rgba(11, 18, 32, 0.75);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.22);
}
.btn-secondary-compact:hover {
    background: rgba(15, 23, 42, 0.9);
}
.btn-warning-compact {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    border: none;
}
.btn-warning-compact:hover {
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

/* ---------------- 输入控件：深玻璃 ---------------- */
.config-item input,
.config-item select,
.form-group input,
.column-title,
.column-type {
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: #f1f5f9;
    border-radius: 8px;
}
.config-item input::placeholder,
.form-group input::placeholder {
    color: var(--ink-faint);
}
.config-item input:focus,
.config-item select:focus,
.form-group input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}
.config-item select option,
.column-type option {
    background: #1e293b;
    color: #f1f5f9;
}
.length-value {
    color: #7dd3fc;
}

/* ---------------- 数据生成器区块（统一深玻璃块） ---------------- */
.template-selector {
    background: var(--glass-block);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
}
.template-selector label {
    color: var(--ink-soft);
}
.template-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: rgba(226, 232, 240, 0.9);
    border-radius: 8px;
}
.template-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
}
.template-btn.active {
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    border-color: transparent;
    color: #fff;
}
.basic-config {
    background: var(--glass-block);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
}
.config-item label {
    color: var(--ink-soft);
}
.columns-config {
    background: rgba(2, 6, 23, 0.20);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
}
.columns-container {
    background: rgba(2, 6, 23, 0.26);
    border: 1px dashed rgba(56, 189, 248, 0.28);
    border-radius: 10px;
}
.column-block {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
}
.column-block:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 3px 10px rgba(2, 6, 23, 0.35);
}
.column-block label {
    color: #7dd3fc;
}
.progress-container {
    background: var(--glass-block);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
}
.progress-bar {
    background: rgba(2, 6, 23, 0.4);
}
.progress-fill {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}
.progress-time {
    color: #7dd3fc;
}
.performance-info,
.strength-text {
    color: var(--ink-faint);
}

/* ---------------- 表格 ---------------- */
#dataTable {
    box-shadow: 0 3px 14px rgba(2, 6, 23, 0.35);
    border-radius: 10px;
}
#dataTable th {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.88));
    border-right: 1px solid rgba(56, 189, 248, 0.22);
    color: #7dd3fc;
}
#dataTable td {
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--ink-strong);
    background: rgba(2, 6, 23, 0.20);
}
#dataTable tr:nth-child(even) td {
    background: rgba(2, 6, 23, 0.30);
}
#dataTable tr:hover td {
    background: rgba(56, 189, 248, 0.07);
}
.grid-table {
    background: rgba(2, 6, 23, 0.24);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
}
.grid-table th {
    background: rgba(56, 189, 248, 0.10);
    color: #7dd3fc;
}
.grid-table td {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--ink-strong);
}

/* ---------------- 密码生成页（复用 dg-split 分栏骨架） ---------------- */
/* 左栏单卡片：组块去掉各自的圆角矩形背景 */
.dg-params .password-controls-compact {
    display: block;
    margin: 0;
}
.dg-params .control-group-compact {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}
.dg-params .control-group-compact h3 {
    font-size: 0.95em;
    margin: 12px 0 8px;
}
.dg-params .password-controls-compact .control-group-compact:first-child h3 {
    margin-top: 0;
}
.dg-params .checkbox-item-compact span {
    color: var(--ink-soft);
    font-size: 0.9em;
}
.dg-params .length-value {
    color: #7dd3fc;
    font-weight: 600;
}
/* 滑块与复选框用天蓝 accent，与主题一致 */
.dg-params input[type="range"] {
    accent-color: #38bdf8;
    flex: 1;
}
.dg-params input[type="checkbox"] {
    accent-color: #38bdf8;
}
/* 右栏间距由 gap 统一 */
.dg-result .password-display-container {
    margin-bottom: 0;
}
.password-display {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(8, 47, 73, 0.72));
    border: 1px solid rgba(56, 189, 248, 0.30);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.password-strength {
    background: rgba(2, 6, 23, 0.40);
}
.control-group-compact {
    background: var(--glass-block);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
}
.control-group-compact h3 {
    color: #7dd3fc;
}

/* ---------------- 工具卡片（VBA 产品） ---------------- */
.home-h3 {
    color: #7dd3fc;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}
.tool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
}
.tool-card:hover {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.4);
}
.tool-card.locked {
    background: rgba(2, 6, 23, 0.26);
}
.tool-card.owned {
    border-left: 3px solid #38bdf8;
}
.tool-title {
    color: #e2e8f0;
}
.tool-desc {
    color: var(--ink-soft);
}
.tag-ok {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
}
.tag-buy {
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
}
.tag-buy:hover {
    background: rgba(56, 189, 248, 0.26);
}

/* 免费工具卡片（更多工具）：整卡为链接 */
.tool-card.free {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tool-card.free:hover {
    transform: translateY(-3px);
}
.tool-card.free .tool-icon { opacity: 1; }
.tool-card.free .tag-free {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    font-size: 12px;
}
.tool-card.free .tag-open {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    font-size: 12px;
}
.tool-card.free:hover .tag-open {
    background: rgba(56, 189, 248, 0.26);
}

/* ---------------- 提示框 ---------------- */
.notice-box {
    background: rgba(56, 189, 248, 0.07);
    border: 1px solid rgba(56, 189, 248, 0.20);
    border-radius: 12px;
    color: rgba(226, 232, 240, 0.88);
}
.notice-box a {
    color: #7dd3fc;
}
.notice-box b {
    color: #e2e8f0;
}

/* ---------------- 右键菜单（main.js 内联样式的接管） ---------------- */
.context-menu {
    background: rgba(13, 20, 36, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.6);
    overflow: hidden;
    min-width: 140px;
}
.context-menu .menu-item {
    padding: 10px 16px;
    color: var(--ink-strong);
    cursor: pointer;
    font-size: 0.9em;
    transition: background .15s;
}
.context-menu .menu-item:hover {
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
}

/* ============================================================
   个人中心（登录态主视图）：横幅 + 左右玻璃栏 一体结构
   ============================================================ */
/* 覆盖 wt/style.css 的旧浅色补丁：
   `#user-info.user-panel-section{background:white}` 是 ID 选择器，优先级高于
   本主题的 `.content-section`，不覆盖会导致个人中心整块变白底（白茫茫） */
#user-info.user-panel-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
#user-info.user-panel-section.active {
    display: block;
}

/* 顶部用户横幅 */
.uc-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 26px 30px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.72), rgba(2, 132, 199, 0.50) 55%, rgba(15, 23, 42, 0.85));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(56, 189, 248, 0.30);
    box-shadow: 0 12px 34px rgba(2, 6, 23, 0.5);
    color: #fff;
}
.uc-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(125, 211, 252, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9em;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
    flex-shrink: 0;
}
.uc-hero-info {
    min-width: 0;
}
.uc-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}
.uc-sub {
    margin-top: 5px;
    font-size: 0.86em;
    color: rgba(224, 242, 254, 0.82);
}
.uc-hero-btn {
    margin-left: auto;
    padding: 10px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
    transition: transform .2s, box-shadow .2s;
}
.uc-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.45);
}

/* 左右布局 */
.uc-layout {
    display: flex;
    gap: 18px;
    align-items: stretch;
}
.uc-side {
    width: 195px;
    flex-shrink: 0;
    background: rgba(2, 6, 23, 0.30);
    border: 1px solid var(--glass-line);
    border-radius: 14px;
    padding: 12px 0;
    height: fit-content;
}
.uc-side .user-menu {
    list-style: none;
}
.uc-side .user-menu-item {
    padding: 12px 20px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all .25s;
    font-weight: 500;
    color: rgba(203, 213, 225, 0.82);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}
.uc-side .user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #7dd3fc;
}
.uc-side .user-menu-item.active {
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.30), rgba(56, 189, 248, 0.10));
    border-left-color: #38bdf8;
    color: #7dd3fc;
    font-weight: 700;
}
.uc-side .user-menu-item + .user-menu-item {
    margin-top: 2px;
}

/* 右侧内容面板 */
.uc-body {
    flex: 1;
    min-width: 0;
    background: rgba(2, 6, 23, 0.24);
    border: 1px solid var(--glass-line);
    border-radius: 14px;
    padding: 26px 28px;
}
.uc-body .user-content-section h2 {
    color: #7dd3fc;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.16);
    font-size: 1.3em;
}
.uc-body .form-group label {
    color: var(--ink-soft);
}
.uc-body .pwd-box {
    background: rgba(2, 6, 23, 0.28);
    border: 1px solid var(--glass-line);
    border-radius: 10px;
}
.uc-empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--ink-faint);
}
.uc-empty .uc-empty-icon {
    font-size: 3em;
    margin-bottom: 14px;
    opacity: 0.35;
}

/* 已保存密码/配置卡片 */
.uc-body .password-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
}
.uc-body .password-item:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.35);
}
.uc-body .password-name {
    color: #7dd3fc;
}
.uc-body .password-value {
    background: rgba(2, 6, 23, 0.40);
    color: #f1f5f9;
    border-radius: 6px;
}
.uc-body .password-meta,
.uc-body .action-btn-small {
    color: var(--ink-faint);
}
.uc-body .action-btn-small:hover {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
}

/* ---------------- 模态框：深玻璃 ---------------- */
.modal {
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal-content {
    background: rgba(13, 20, 36, 0.95);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    color: var(--ink-strong);
}
.modal-title {
    color: #7dd3fc;
}
.close-btn {
    color: rgba(148, 163, 184, 0.6);
}
.close-btn:hover {
    color: #7dd3fc;
}

/* ---------------- 页脚：深蓝玻璃 ---------------- */
.site-footer {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(13, 20, 36, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(203, 213, 225, 0.78);
    border-top: 1px solid rgba(56, 189, 248, 0.12);
}
.footer-title {
    color: #7dd3fc;
}
.footer-col a {
    color: rgba(203, 213, 225, 0.72);
}
.footer-col a:hover {
    color: #7dd3fc;
}
.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: rgba(148, 163, 184, 0.55);
}

/* ---------------- 首页 Hero（兼容覆盖） ---------------- */
.home-hero {
    background: rgba(2, 6, 23, 0.26);
    border: 1px solid var(--glass-line);
    border-radius: 14px;
}
.hero-welcome .hello {
    color: #e2e8f0;
}
.hero-welcome .hello-sub {
    color: var(--ink-soft);
}
.hero-btn {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
}

/* ============================================================
   授权中心骨架样式（user.php 功能搬进 index.php 个人中心）
   ============================================================ */
.uc-side-brand {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--glass-line);
    margin-bottom: 8px;
}
.uc-side-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}
.uc-side-title {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
}
.uc-side-sub {
    font-size: 12px;
    color: var(--ink-faint);
    margin-top: 2px;
}
.user-menu-logout {
    color: #f87171;
}
.user-menu-logout:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

.uc-placeholder {
    color: var(--ink-soft);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.95em;
}

/* 购买面板骨架 */
.card {
    background: rgba(30, 41, 59, 0.52);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.4);
}
.page-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 18px;
}
.step {
    font-size: 13px;
    color: var(--ink-faint);
    margin-bottom: 14px;
}
.plans {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 6px 0 4px;
}
.plan {
    flex: 1 1 96px;
    max-width: 110px;
    background: rgba(2, 6, 23, 0.32);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.plan:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}
.plan.sel {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}
.plan .name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}
.plan .price {
    font-size: 15px;
    font-weight: 700;
    color: #7dd3fc;
    margin-top: 6px;
}
.plan .days {
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 3px;
}
.qr-frame {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border: 2px solid #38bdf8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.amount {
    text-align: center;
    font-size: 14px;
    color: #e2e8f0;
    margin-top: 10px;
}
.amount b {
    color: #7dd3fc;
    font-size: 20px;
}
.countdown {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin-top: 8px;
}
.countdown b {
    color: #f87171;
    font-size: 16px;
}
.msgbox {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    display: none;
}
.msgbox.ok {
    display: block;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}
.msgbox.err {
    display: block;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

/* ---------------- 个人中心响应式 ---------------- */
@media (max-width: 900px) {
    .uc-layout {
        flex-direction: column;
    }
    .uc-side {
        width: 100%;
    }
    .uc-side .user-menu {
        display: flex;
        overflow-x: auto;
        gap: 4px;
    }
    .uc-side .user-menu-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px;
    }
    .uc-side .user-menu-item.active {
        border-left: none;
        border-bottom-color: #38bdf8;
    }
    .uc-hero-btn {
        margin-left: 0;
    }
}

/* ---------------- 数据生成 左右分栏：左侧参数 / 右侧内容（全站统一布局模式） ---------------- */
.dg-split {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 18px;
}
.dg-params {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--glass-block);
    border: 1px solid var(--glass-line);
    border-radius: 12px;
    padding: 14px;
}
/* 左栏是一个整体：内部分块去掉各自的圆角矩形背景 */
.dg-params .template-selector,
.dg-params .basic-config,
.dg-params .columns-config {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}
.dg-result {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
/* 分栏内去掉原纵向堆叠的 margin，由 gap 统一控制 */
.dg-params .template-selector,
.dg-params .basic-config,
.dg-params .columns-config,
.dg-result .progress-container,
.dg-result .preview-section {
    margin-bottom: 0;
}
/* 窄左栏：列配置 = Excel 风格网格表（序号 / 表头 / 字段） */
.dg-params .columns-container {
    display: block;
    padding: 0 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    max-height: 340px;
    overflow-y: auto;
}
.col-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed; /* 序号固定宽，表头/字段均分剩余空间 */
}
.col-table th,
.col-table td {
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0;
}
.col-table thead th {
    background: rgba(56, 189, 248, 0.10);
    color: #7dd3fc;
    font-weight: 600;
    text-align: left;
    padding: 7px 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}
.col-table thead th.col-num {
    width: 36px;
    padding: 7px 4px;
}
.col-table td.col-num {
    width: 36px;
    text-align: right;
    padding: 4px 8px 4px 4px;
    color: var(--ink-faint);
    background: rgba(2, 6, 23, 0.25);
}
.col-table .column-title,
.col-table .column-type {
    width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 7px 10px;
    color: #f1f5f9;
    font-size: 13px;
    outline: none;
    box-shadow: none;
}
.col-table select.column-type {
    cursor: pointer;
    border: none;       /* 单元格边框已提供分隔，避免双线 */
    border-radius: 0;
}
.col-table select.column-type option {
    background: #1e293b;
    color: #f1f5f9;
}
/* 模板下拉框（原按钮组改下拉） */
.dg-params .template-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}
.dg-params .template-selector label {
    white-space: nowrap;
}
/* 左栏所有下拉框沿用全局 select 组件样式，无需局部定义 */
/* 基础设置：一行一个参数（标签 + 输入框） */
.dg-params .config-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.dg-params .config-line:last-child {
    margin-bottom: 0;
}
.dg-params .config-line label {
    white-space: nowrap;
    margin-bottom: 0;
}
.dg-params .config-line input,
.dg-params .config-line select {
    flex: 1;
    min-width: 0;
    width: auto;
}
.dg-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dg-actions-row {
    display: flex;
    gap: 10px;
}
.dg-actions-row .btn-compact {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
}
/* 窄屏回退：上下堆叠 */
@media (max-width: 1100px) {
    .dg-split { flex-direction: column; }
    .dg-params { width: 100%; }
}

/* ---------------- 二维码生成页（复用 dg-split 分栏骨架） ---------------- */
.dg-params .qrg-field {
    margin: 4px 0 2px;
}
.dg-params .qrg-field label {
    display: block;
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.dg-params .qrg-field textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
}
.qrg-samples {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.qrg-sample-btn {
    border: 1px dashed rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.08);
    color: #7dd3fc;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12.5px;
    cursor: pointer;
}
.qrg-sample-btn:hover {
    background: rgba(56, 189, 248, 0.16);
}
.qrg-status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
    color: var(--ink-faint);
}
.qrg-status[data-level="error"] { color: #f87171; }
.qrg-status[data-level="ok"] { color: #6ee7b7; }
/* 右侧：二维码画布（码图必须白底，保证可扫） */
.qr-stage {
    position: relative;
    width: 260px;
    height: 260px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qr-stage canvas { width: 100%; height: 100%; }
.qr-empty {
    color: rgba(148, 163, 184, 0.6);
    font-size: 14px;
    text-align: center;
    user-select: none;
}
.qr-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
    color: var(--ink-soft);
}
.qr-meta b { color: #7dd3fc; font-weight: 600; }

/* ---------------- 二维码美化编辑器（六组 Tab） ---------------- */
.qrg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding-bottom: 8px;
}
.qrg-tab {
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 14px;
    cursor: pointer;
}
.qrg-tab:hover { color: #7dd3fc; }
.qrg-tab.active {
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
    font-weight: 600;
}
.qrg-tabpanel { display: none; }
.qrg-tabpanel.active { display: block; }
.qrg-field { margin: 6px 0 2px; }
.qrg-field > label {
    display: block;
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.qrg-tip { font-size: 11.5px; color: var(--ink-faint); margin-left: 4px; }
.qrg-hint { font-size: 12px; color: var(--ink-faint); margin: 6px 0 0; line-height: 1.6; }
.qrg-radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.qrg-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
}
.qrg-check input[type="radio"],
.qrg-check input[type="checkbox"] { accent-color: #38bdf8; cursor: pointer; }
/* 推荐色板 */
.qrg-swatches {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.qrg-swatch {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid rgba(148, 163, 184, 0.25);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}
.qrg-swatch:hover { transform: scale(1.06); }
.qrg-swatch.active { border-color: #38bdf8; box-shadow: 0 0 0 1px #38bdf8; }
input.qrg-swatch-custom { cursor: pointer; border-style: dashed; }
/* 码点/码眼/外框样式网格 */
.qrg-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.qrg-style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 2px;
    background: rgba(2, 6, 23, 0.35);
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    cursor: pointer;
}
.qrg-style-btn canvas { background: #ffffff; border-radius: 4px; }
.qrg-style-btn span { font-size: 11.5px; color: var(--ink-soft); }
.qrg-style-btn:hover { border-color: rgba(56, 189, 248, 0.5); }
.qrg-style-btn.active { border-color: #38bdf8; box-shadow: 0 0 0 1px #38bdf8; }
.qrg-style-btn.active span { color: #7dd3fc; }
.qrg-link-btn {
    margin-top: 8px;
    border: none;
    background: transparent;
    color: #7dd3fc;
    font-size: 12.5px;
    cursor: pointer;
    padding: 0;
}
.qrg-link-btn:hover { text-decoration: underline; }
/* 码图舞台：自适应高度（文字标签/标题条会增加高度），码图必须白底保扫码 */
.qr-stage {
    height: auto !important;
    min-height: 260px;
    padding: 12px;
    box-sizing: border-box;
}
.qr-stage canvas { display: block; width: 100%; height: auto; }

/* ---------------- 二维码工作台：码图在左，美化编辑器在右（默认隐藏，点「美化二维码」展开） ---------------- */
.qr-workbench {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.qr-main {
    flex: 0 1 auto;
    min-width: 260px;
}
.qr-main .dg-actions { margin-top: 14px; }
.qrg-beautify {
    flex: 1 1 360px;
    min-width: 320px;
    background: rgba(30, 41, 59, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    padding: 14px 16px 16px;
}
.qrg-beautify[hidden] { display: none; }

/* ---------------- 二维码页：类型子标签 + 大输入框 + 说明 + 大居中生成按钮（参照互联二维码版式） ---------------- */
.qrg-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 10px;
}
.qrg-type-tab {
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13.5px;
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.qrg-type-tab:hover { color: #7dd3fc; }
.qrg-type-tab.active {
    color: #38bdf8;
    font-weight: 600;
    border-bottom-color: #38bdf8;
}
/* 大输入框 */
#qrgInput {
    min-height: 96px;
    font-size: 15px;
    padding: 12px 14px;
}
.qrg-desc {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ink-faint);
}
/* 大居中生成按钮 */
.qrg-generate-btn {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    padding: 10px 16px;
}

/* ---------- 更多工具内嵌视图（卡片点击后在页面中间打开） ---------- */
.embed-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 12px 18px;
    background: rgba(2, 6, 23, 0.32);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}
.embed-toolbar a { color: #7dd3fc; text-decoration: none; font-size: 14px; white-space: nowrap; }
.embed-toolbar a:hover { text-decoration: underline; }
.embed-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#embedFrame {
    display: block;
    width: 100%;
    height: calc(100vh - 250px);
    min-height: 540px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: #0f172a;
    box-sizing: border-box;
}

/* 内嵌工具加载遮罩：切换工具时立即盖住 iframe，避免残留上一个工具的旧内容 */
.embed-stage { position: relative; }
#embedFrame { height: calc(100vh - 265px); }
.embed-loading {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 12px;
    z-index: 5;
}
.embed-loading.show { display: flex; }
.embed-spin {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(56, 189, 248, 0.25);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: embed-spin 0.8s linear infinite;
}
@keyframes embed-spin { to { transform: rotate(360deg); } }
.embed-loading-text { color: #94a3b8; font-size: 14px; }
