/* ==========================================================
   zuojianli.cn - 全站样式
   桌面端优先 · 现代设计 · CSS变量主题
   ========================================================== */

/* ----- CSS Variables ----- */
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --bg-hover: #f1f5f9;
    --bg-code: #f1f5f9;

    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    --border-focus: var(--primary);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

    --header-h: 64px;
    --max-w: 1200px;
    --transition: 0.2s ease;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ----- Header ----- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
    flex-shrink: 0;
}
.logo:hover { color: var(--primary); }
.logo-icon { width: 28px; height: 28px; }

.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-link.active { color: var(--primary); background: rgba(79,70,229,0.08); }

.header-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: var(--text-inverse); }
.btn-primary:hover { background: var(--primary-dark); color: var(--text-inverse); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(79,70,229,0.04); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-success { background: var(--success); color: var(--text-inverse); }
.btn-danger { background: var(--danger); color: var(--text-inverse); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-icon {
    width: 36px; height: 36px; padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
}

/* ----- Main Content ----- */
.site-main {
    flex: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

/* ----- Hero Section (首页) ----- */
.hero {
    text-align: center;
    padding: 48px 0 40px;
}
.hero h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
}

/* ----- Search Bar ----- */
.search-bar {
    max-width: 500px;
    margin: 0 auto 16px;
    position: relative;
}
.search-bar input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 15px;
    background: var(--bg-card);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar .search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

/* ----- Filter Tabs ----- */
.filter-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.filter-tab {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}

/* ----- Template Grid ----- */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.tpl-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}
.tpl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.tpl-thumb {
    aspect-ratio: 3/4;
    background: var(--bg-input);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.tpl-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    transition: transform 0.4s ease;
    transform-origin: top center;
}
.tpl-card:hover .tpl-thumb img { transform: scale(1.03); }

.tpl-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}
.tpl-badge-free { background: var(--success); color: #fff; }
.tpl-badge-vip { background: var(--warning); color: #fff; }

.tpl-info { padding: 16px; }
.tpl-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.tpl-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* ----- Editor (模板编辑页) ----- */
.editor-layout {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-h) - 64px);
}

.editor-form {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 32px;
}

.editor-form > h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.editor-form > p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 基本信息头部：照片 + 字段 */
.basic-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.basic-header .photo-upload-area {
    flex-shrink: 0;
}
.basic-fields {
    flex: 1;
    min-width: 0;
}

/* 双列输入行 */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ----- Form Controls ----- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
    font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 条目卡片（教育/工作经历） */
.entry-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 16px;
    position: relative;
}
.entry-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.entry-block-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}
.entry-block-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.entry-block-remove:hover {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

/* 动态添加的删除按钮（app.js 生成） */
.btn-remove-entry {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    z-index: 1;
}
.btn-remove-entry:hover {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

.btn-add-entry {
    display: block;
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    margin-top: 4px;
}
.btn-add-entry:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99,102,241,0.04);
}

/* 日期范围行 */
.date-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.date-range-row .date-input { flex: 1; min-width: 0; }
.date-range-row .date-separator {
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}
.date-range-row .date-present-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

/* Step wizard */
.step-nav {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.step-nav::-webkit-scrollbar { display: none; }
.step-item {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.step-item:hover { color: var(--text-secondary); }
.step-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.step-panel { display: none; }
.step-panel.active { display: block; }

/* 分区标题 */
.section-title-editor {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ----- Editor Toolbar ----- */
.editor-toolbar {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 16px;
    padding: 12px 0;
    position: sticky;
    top: var(--header-h);
    z-index: 20;
}
.editor-toolbar-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}
.editor-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.export-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ----- AI Modal ----- */
.ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.ai-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.25s ease;
}
.ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.ai-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.ai-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.ai-modal-close:hover {
    color: var(--text-primary);
}
.ai-modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.ai-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.ai-tab:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}
.ai-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.ai-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.ai-tab-content {
    display: none;
}
.ai-tab-content.active {
    display: block;
}
.ai-result-area {
    display: none;
    margin-top: 16px;
    padding: 14px;
    background: var(--bg-input);
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ----- Flatpickr 自定义样式 ----- */
.flatpickr-calendar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}
.flatpickr-months .flatpickr-month {
    background: var(--bg-card);
    color: var(--text-primary);
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--bg-card);
    color: var(--text-primary);
}
.flatpickr-current-month input.cur-year {
    color: var(--text-primary);
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--text-secondary);
    fill: var(--text-secondary);
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--primary);
    fill: var(--primary);
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--primary);
}
.flatpickr-weekdays {
    background: var(--bg-input);
}
.flatpickr-weekday {
    color: var(--text-secondary);
    font-weight: 500;
}
.flatpickr-day {
    color: var(--text-primary);
    border-radius: 4px;
}
.flatpickr-day:hover {
    background: var(--bg-hover);
    border-color: var(--bg-hover);
}
.flatpickr-day.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.flatpickr-day.today {
    border-color: var(--primary);
}
.flatpickr-day.today:hover {
    background: var(--primary);
    color: #fff;
}
.flatpickr-day.flatpickr-disabled {
    color: var(--text-muted);
}
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
.flatpickr-days {
    background: var(--bg-card);
}
.flatpickr-day {
    color: var(--text-primary);
}

/* ----- Editor Layout ----- */

/* ----- Cards ----- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
}

/* ----- Stat Cards (仪表盘) ----- */
.stat-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.stat-card {
    flex: 1;
    min-width: 150px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ----- Footer ----- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 48px;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}
.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 12px;
}
.footer-links a { color: var(--text-secondary); font-size: 13px; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 12px; color: var(--text-muted); }
.footer-copy a { color: var(--text-muted); }

/* ----- Ad Slots ----- */
.ad-slot { text-align: center; margin: 24px 0; min-height: 1px; }
.ad-slot:empty { display: none; }

.ad-sidebar {
    position: fixed;
    top: calc(var(--header-h) + 20px);
    width: 160px;
    z-index: 50;
    text-align: center;
}
.ad-sidebar-left { left: calc(50% - 770px); }
.ad-sidebar-right { right: calc(50% - 770px); }

@media (max-width: 1560px) {
    .ad-sidebar-left { display: none; }
    .ad-sidebar-right { display: none; }
}

/* ----- Modal ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-overlay.show .modal { transform: scale(1); }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.modal h3 { font-size: 18px; margin-bottom: 16px; }

/* ----- Auth Modal ----- */
.auth-modal { max-width: 440px; padding: 36px 32px 28px; position: relative; }
.auth-modal h3 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.modal-close-btn {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 22px; color: var(--text-muted);
    cursor: pointer; width: 32px; height: 32px; display: flex;
    align-items: center; justify-content: center; border-radius: 50%;
    transition: all 0.2s;
}
.modal-close-btn:hover { background: var(--bg-hover, rgba(0,0,0,0.05)); color: var(--text); }
.auth-tabs {
    display: flex; gap: 0; margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}
.auth-tab {
    flex: 1; padding: 10px 0; border: none; background: none;
    cursor: pointer; font-size: 14px; color: var(--text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.2s;
}
.auth-tab:hover { color: var(--text-secondary); }
.auth-tab.active {
    color: var(--primary); font-weight: 600;
    border-bottom-color: var(--primary);
}
.code-input-row {
    display: flex; gap: 10px;
}
.code-input-row .form-input { flex: 1; }
.btn-send-code {
    white-space: nowrap; min-width: 110px; font-size: 13px;
    flex-shrink: 0;
}
.auth-modal-footer {
    text-align: center; margin-top: 16px;
    font-size: 14px; color: var(--text-secondary);
}
.auth-modal-footer a { color: var(--primary); font-weight: 500; }

/* ----- Confirm Dialog ----- */
.confirm-dialog { max-width: 400px; padding: 28px 28px 24px; text-align: center; }
.confirm-dialog h3 { font-size: 18px; margin-bottom: 12px; }
.confirm-msg { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-actions .btn { min-width: 100px; }
.btn-confirm-ok { background: var(--primary); color: #fff; }
.btn-confirm-ok:hover { opacity: 0.9; }
.btn-confirm-ok.btn-danger { background: var(--danger, #dc2626); }
.btn-confirm-cancel { background: var(--bg); color: var(--text); }

/* ----- Resume Cards (A4 mini paper) ----- */
.resume-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.resume-card {
    width: 160px;
    cursor: default;
}
.resume-card-thumb {
    position: relative;
    width: 160px;
    height: 226px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}
.resume-card:hover .resume-card-thumb {
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.resume-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    display: block;
    transition: filter 0.25s;
}
.resume-card:hover .resume-card-thumb img {
    filter: blur(3px) brightness(0.6);
}
.resume-card-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: center;
    gap: 6px;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.resume-card:hover .resume-card-overlay {
    opacity: 1;
    pointer-events: auto;
}
.overlay-row {
    display: flex;
    gap: 6px;
    width: 100%;
}
.resume-card-overlay .btn {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
    flex: 1;
    background: rgba(255,255,255,0.95);
    color: #333;
    border: 1px solid #ddd;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.resume-card-overlay .btn:hover {
    background: #fff;
}
.resume-card-overlay .btn-delete {
    background: rgba(220,38,38,0.9);
    color: #fff;
    border: none;
}
.resume-card-overlay .btn-delete:hover {
    background: rgba(220,38,38,1);
}
.resume-card-overlay .btn-share {
    background: rgba(59,130,246,0.9);
    color: #fff;
    border: none;
}
.resume-card-overlay .btn-share:hover {
    background: rgba(59,130,246,1);
}
/* [新增] 分享独立按钮样式 */
.resume-card-overlay .btn-share-only {
    background: rgba(59,130,246,0.9);
    color: #fff;
    border: none;
}
.resume-card-overlay .btn-share-only:hover {
    background: rgba(59,130,246,1);
}
/* [新增] 查看次数badge（非按钮，仅展示） */
.view-count-badge {
    grid-column: 1 / -1;
    justify-self: center;
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.3px;
    user-select: none;
}
.resume-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary, #1a1a1a);
}

/* ----- Order Cards (长卡片 + 悬浮感) ----- */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    gap: 20px;
}
.order-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.order-card-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.order-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.order-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
}
.order-status-dot.pending { background: var(--warning, #f59e0b); }
.order-status-dot.paid { background: var(--success, #16a34a); }
.order-status-dot.cancelled { background: var(--text-muted); }
.order-status-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.order-status-text.pending { color: var(--warning, #f59e0b); }
.order-status-text.paid { color: var(--success, #16a34a); }
.order-status-text.cancelled { color: var(--text-muted); }
.order-card-type {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.order-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.order-card-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.order-card-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.order-card-actions {
    display: flex;
    gap: 8px;
}

/* ----- Toast ----- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    animation: slideIn 0.3s ease;
    max-width: 360px;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--accent); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ----- Category Page ----- */
.cat-header {
    text-align: center;
    padding: 40px 0 32px;
}
.cat-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.cat-header p { color: var(--text-secondary); font-size: 16px; }

/* ----- Article Page ----- */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}
.article-content h1 { font-size: 28px; margin-bottom: 16px; }
.article-content h2 { font-size: 22px; margin: 32px 0 16px; }
.article-content h3 { font-size: 18px; margin: 24px 0 12px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 0 0 16px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content code {
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}
.article-content pre {
    background: var(--bg-code);
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 16px;
}
.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: rgba(79,70,229,0.04);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ----- Login/Register Page ----- */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 64px 24px;
}
.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
}
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 32px; }

/* ----- User Center ----- */
.uc-layout {
    align-items: stretch;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}
.uc-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
.uc-menu-item {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}
.uc-menu-item:hover { background: var(--bg-hover); color: var(--text); }
.uc-menu-item.active { background: rgba(79,70,229,0.08); color: var(--primary); font-weight: 500; }

.uc-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    min-width: 0;
    overflow-x: hidden;
}

/* ----- Admin ----- */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: calc(100vh - var(--header-h));
}
.admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
}
.admin-content {
    padding: 24px 32px;
    overflow-y: auto;
}

.admin-nav-section {
    padding: 0 16px;
    margin-bottom: 20px;
}
.admin-nav-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}
.admin-nav-item:hover { background: var(--bg-hover); color: var(--text); }
.admin-nav-item.active { background: rgba(79,70,229,0.08); color: var(--primary); font-weight: 500; }

/* Admin table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-hover); }

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle input { display: none; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: 0.3s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ----- Responsive ----- */
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    .header-inner { padding: 0 16px; gap: 16px; }
    .main-nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .main-nav::-webkit-scrollbar { display: none; }
    .nav-link { white-space: nowrap; flex-shrink: 0; }
    .site-footer { padding: 20px 0; margin-top: 32px; }
    .footer-inner { padding: 0 16px; }
    .footer-links { overflow-x: auto; flex-wrap: nowrap; justify-content: center; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 20px; padding-bottom: 4px; }
    .footer-links::-webkit-scrollbar { display: none; }
    .footer-links a { white-space: nowrap; flex-shrink: 0; }
    .site-main { padding: 20px 16px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
    .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
    .editor-layout { overflow-x: hidden; }
    .editor-form { padding: 20px 16px; overflow-x: hidden; }
    .form-row-2 { grid-template-columns: 1fr; gap: 0; }
    .basic-header { flex-direction: column; align-items: center; }
    .basic-fields { width: 100%; min-width: 0; }
    .editor-toolbar-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 0 16px; }
    .editor-toolbar-right { justify-content: center; flex-wrap: wrap; }
    .uc-layout {
        align-items: start;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .uc-sidebar {
        padding: 16px;
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .uc-menu-item {
        padding: 12px 14px;
        font-size: 15px;
        margin-bottom: 2px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .uc-content {
        padding: 16px;
    }
    .uc-avatar-wrap {
        width: 56px;
        height: 56px;
    }
    .uc-nickname-row {
        font-size: 14px;
    }
    .resume-card {
        width: 130px;
    }
    .resume-card-thumb {
        width: 130px;
        height: 183px;
    }
    .profile-info-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    .profile-info-label {
        min-width: 50px;
        font-size: 12px;
    }
    .profile-info-value {
        font-size: 13px;
        flex-basis: 100%;
    }
    .profile-change-btn {
        font-size: 12px;
    }
    .profile-cards {
        gap: 12px;
    }
    .profile-card-title {
        padding: 12px 16px;
        font-size: 13px;
    }
    .profile-card-body {
        padding: 4px 16px;
    }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ----- Skeleton Loading ----- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----- Pagination ----- */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 36px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.page-btn:hover:not(.active):not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}
.page-btn.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
    font-weight: 600;
    cursor: default;
}
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 2px;
    user-select: none;
}
.page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}
.page-jump input {
    width: 44px;
    height: 36px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition);
}
.page-jump input:focus {
    border-color: var(--primary);
}
.page-jump-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}
.page-jump-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ----- Empty State ----- */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* ----- Photo Upload Area ----- */
.photo-upload-area {
    position: relative;
    display: inline-block;
}
.photo-upload-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 130px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--transition);
    background: var(--bg-input);
}
.photo-upload-trigger:hover {
    border-color: var(--primary);
}
.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.photo-thumb {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: var(--radius);
}
.photo-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}
.photo-remove-btn:hover {
    background: #dc2626;
}

/* ----- Preview Photo ----- */
.pv-photo {
    width: 80px;
    height: 105px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* ----- Date Range Picker ----- */
.date-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.date-input {
    flex: 1;
    min-width: 0;
    max-width: 150px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    font-size: 13px;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.date-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.date-input::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    cursor: pointer;
}
.date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.date-separator {
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
    padding: 0 2px;
}
.date-present-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}
.date-present-label:hover {
    background: var(--bg-hover);
}
.date-present-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}
.date-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--bg-hover);
}

/* ----- Multi-Entry Blocks (教育/工作经历多条) ----- */
.entry-block {
    position: relative;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.entry-block .form-group:last-child {
    margin-bottom: 0;
}
.btn-remove-entry {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: #fff;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    transition: opacity var(--transition);
}
.btn-remove-entry:hover {
    opacity: 1;
}
.btn-add-entry {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-add-entry:hover {
    border-color: var(--primary);
    background: rgba(79,70,229,0.04);
}

/* ===== Template Preview Styles ===== */
/* Base styles shared by all templates, then unique styles per template slug */

/* ----- Base: all templates ----- */
.tpl-preview {
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.tpl-preview .tpl-header { margin-bottom: 16px; }
.tpl-preview .tpl-name { margin: 0 0 4px; }
.tpl-preview .tpl-intent { margin: 0 0 6px; font-size: 14px; color: #6b7280; }
.tpl-preview .tpl-contact { font-size: 12px; color: #9ca3af; }
.tpl-preview .tpl-section { margin-bottom: 14px; }
.tpl-preview .tpl-section-title { font-size: 14px; margin: 0 0 8px; }
.tpl-preview .tpl-content { font-size: 13px; line-height: 1.7; color: #374151; margin: 0 0 6px; }
.tpl-preview .tpl-content p { margin: 0 0 6px; }
.tpl-preview .tpl-skills-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tpl-preview .tpl-skill-item { font-size: 12px; }
.tpl-preview .tpl-photo { object-fit: cover; flex-shrink: 0; }
.tpl-preview .tpl-skill-bar { width: 100%; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.tpl-preview .tpl-skill-fill { height: 100%; border-radius: 3px; }

/* Ensure JS-hidden sections stay hidden regardless of template styles */
.tpl-preview [style*="display: none"],
.tpl-preview [style*="display:none"] { display: none !important; }


/* ================================================================
   1. classic-blue (经典蓝) - Single column, clean professional
   ================================================================ */
.tpl-preview-classic-blue .tpl-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 3px solid #3b82f6;
}
.tpl-preview-classic-blue .tpl-photo {
    width: 80px;
    height: 105px;
    border-radius: 4px;
}
.tpl-preview-classic-blue .tpl-name {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
}
.tpl-preview-classic-blue .tpl-intent {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}
.tpl-preview-classic-blue .tpl-contact {
    font-size: 12px;
    color: #9ca3af;
}
.tpl-preview-classic-blue .tpl-contact span + span::before {
    content: " | ";
    color: #d1d5db;
}
.tpl-preview-classic-blue .tpl-section-title {
    font-size: 14px;
    color: #3b82f6;
    font-weight: 700;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 4px;
    margin-bottom: 10px;
}
.tpl-preview-classic-blue .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
.tpl-preview-classic-blue .tpl-skill-item {
    background: #eff6ff;
    color: #1e40af;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}


/* ================================================================
   2. sidebar-dark (侧栏商务) - Two-column, dark sidebar
   ================================================================ */
.tpl-preview-sidebar-dark {
    display: flex;
    min-height: 100%;
}
.tpl-preview-sidebar-dark .tpl-sidebar {
    width: 30%;
    flex-shrink: 0;
    background: #0f172a;
    color: #e2e8f0;
    padding: 30mm 8mm 30mm 10mm;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tpl-preview-sidebar-dark .tpl-main {
    flex: 1;
    background: #ffffff;
    padding: 30mm 12mm 30mm 10mm;
}
/* Sidebar header: photo centered */
.tpl-preview-sidebar-dark .tpl-header {
    margin-bottom: 0;
}
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid rgba(255,255,255,0.15);
}
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-intent {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 0;
    font-weight: 400;
}
/* Sidebar section titles */
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-section-title {
    color: #64748b;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 700;
    border: none;
    margin: 20px 0 10px;
    padding: 0;
}
/* Sidebar contact */
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-contact {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 2;
}
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-contact span {
    display: block;
    margin-bottom: 4px;
}
/* Sidebar skills as tags - each skill on its own row, left-aligned */
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-skills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.tpl-preview-sidebar-dark .tpl-sidebar .tpl-skill-item {
    display: block;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.6;
    text-align: left;
    box-sizing: border-box;
}
/* Main content area */
.tpl-preview-sidebar-dark .tpl-main .tpl-name {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-intent {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 28px;
    font-weight: 400;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
    margin-top: 24px;
    padding-left: 14px;
    border-left: 4px solid #3b82f6;
    line-height: 1;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-section-title:first-child {
    margin-top: 0;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-content {
    font-size: 15px;
    line-height: 1.9;
    color: #334155;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-content p {
    margin-bottom: 10px;
}
/* Entry items (edu/work) */
.tpl-preview-sidebar-dark .tpl-main .tpl-entry {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* Entry header: date | company | position */
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 12px;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-date {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}
/* Entry detail with bullet points */
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-detail {
    font-size: 14px;
    line-height: 1.9;
    color: #475569;
    padding-left: 4px;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-detail p {
    margin-bottom: 6px;
    position: relative;
    padding-left: 16px;
}
.tpl-preview-sidebar-dark .tpl-main .tpl-entry-detail p::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #64748b;
    font-weight: 700;
}
/* Hide header in main when sidebar is present (header lives in sidebar) */
.tpl-preview-sidebar-dark .tpl-main > .tpl-header {
    display: none;
}


/* ================================================================
   3. modern-card (现代卡片) - Single column, clean sections
   ================================================================ */
.tpl-preview-modern-card .tpl-header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}
.tpl-preview-modern-card .tpl-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
}
.tpl-preview-modern-card .tpl-name {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 1px;
}
.tpl-preview-modern-card .tpl-intent {
    font-size: 15px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 400;
}
.tpl-preview-modern-card .tpl-contact {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 8px;
}
.tpl-preview-modern-card .tpl-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 20px;
    border-left: none;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 16px;
}
.tpl-preview-modern-card .tpl-section:last-child {
    border-bottom: none;
}
.tpl-preview-modern-card .tpl-section-title {
    font-size: 12px;
    color: #6366f1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    border: none;
    padding: 0;
}
.tpl-preview-modern-card .tpl-content {
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
}
.tpl-preview-modern-card .tpl-content p {
    margin-bottom: 6px;
}
.tpl-preview-modern-card .tpl-skill-item {
    background: #f5f3ff;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #ede9fe;
}


/* ================================================================
   4. elegant-rose (优雅玫瑰) - Feminine elegant, rose accents
   ================================================================ */
.tpl-preview-elegant-rose .tpl-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f9a8d4;
    margin-bottom: 20px;
}
.tpl-preview-elegant-rose .tpl-photo {
    width: 75px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 2px solid #fbcfe8;
}
.tpl-preview-elegant-rose .tpl-name {
    font-size: 28px;
    font-weight: 300;
    color: #be185d;
    letter-spacing: 3px;
}
.tpl-preview-elegant-rose .tpl-intent {
    font-size: 14px;
    color: #ec4899;
    font-weight: 300;
    font-style: italic;
    margin-top: 4px;
}
.tpl-preview-elegant-rose .tpl-contact {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}
.tpl-preview-elegant-rose .tpl-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #fce7f3;
}
.tpl-preview-elegant-rose .tpl-section:last-child {
    border-bottom: none;
}
.tpl-preview-elegant-rose .tpl-section-title {
    font-size: 14px;
    color: #be185d;
    font-weight: 400;
    font-style: italic;
    border: none;
    padding: 0;
    margin-bottom: 8px;
}
.tpl-preview-elegant-rose .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
.tpl-preview-elegant-rose .tpl-skill-item {
    color: #be185d;
    font-size: 12px;
    padding: 2px 0;
}
.tpl-preview-elegant-rose .tpl-skill-item + .tpl-skill-item::before {
    content: "\00B7";
    color: #f9a8d4;
    margin: 0 8px;
}


/* ================================================================
   5. timeline-green (时间线) - Timeline visual, green accents
   ================================================================ */
.tpl-preview-timeline-green .tpl-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #ecfdf5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.tpl-preview-timeline-green .tpl-photo {
    width: 80px;
    height: 105px;
    border-radius: 6px;
    object-fit: cover;
}
.tpl-preview-timeline-green .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #065f46;
}
.tpl-preview-timeline-green .tpl-intent {
    font-size: 14px;
    color: #059669;
    margin: 2px 0 6px;
}
.tpl-preview-timeline-green .tpl-contact {
    font-size: 12px;
    color: #6b7280;
}
/* Timeline spine */
.tpl-preview-timeline-green .tpl-body {
    position: relative;
    padding-left: 24px;
}
.tpl-preview-timeline-green .tpl-body::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #10b981;
}
/* Each section is a timeline node */
.tpl-preview-timeline-green .tpl-section {
    position: relative;
    padding-left: 20px;
    border-left: none;
    margin-bottom: 18px;
}
.tpl-preview-timeline-green .tpl-section::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
    z-index: 1;
}
.tpl-preview-timeline-green .tpl-section-title {
    font-size: 14px;
    color: #059669;
    font-weight: 700;
    margin-bottom: 6px;
    border: none;
    padding: 0;
}
.tpl-preview-timeline-green .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
.tpl-preview-timeline-green .tpl-skill-item {
    background: #ecfdf5;
    color: #065f46;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}


/* ================================================================
   6. minimal-mono (极简黑白) - Strictly monochrome, ultra-minimal
   ================================================================ */
.tpl-preview-minimal-mono .tpl-header {
    padding-bottom: 16px;
    border-bottom: 1px solid #171717;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}
.tpl-preview-minimal-mono .tpl-photo {
    width: 70px;
    height: 90px;
    object-fit: cover;
    filter: grayscale(100%);
    border-radius: 0;
}
.tpl-preview-minimal-mono .tpl-name {
    font-size: 32px;
    font-weight: 300;
    color: #000000;
    letter-spacing: 4px;
}
.tpl-preview-minimal-mono .tpl-intent {
    font-size: 13px;
    color: #737373;
    font-weight: 300;
    letter-spacing: 1px;
    margin-top: 4px;
}
.tpl-preview-minimal-mono .tpl-contact {
    font-size: 11px;
    color: #a3a3a3;
    letter-spacing: 0.5px;
    margin-top: 6px;
}
.tpl-preview-minimal-mono .tpl-section {
    margin-bottom: 24px;
}
.tpl-preview-minimal-mono .tpl-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #171717;
    font-weight: 600;
    border: none;
    padding: 0;
    margin-bottom: 10px;
}
.tpl-preview-minimal-mono .tpl-content {
    font-size: 13px;
    color: #404040;
    line-height: 1.7;
}
.tpl-preview-minimal-mono .tpl-skill-item {
    color: #404040;
    font-size: 12px;
    padding: 2px 0;
    border-bottom: 1px solid #e5e5e5;
}
.tpl-preview-minimal-mono .tpl-skill-bar {
    background: #e5e5e5;
    height: 4px;
}
.tpl-preview-minimal-mono .tpl-skill-fill {
    background: #171717;
}


/* ================================================================
   7. fresh-orange (活力橙) - Energetic, youthful
   ================================================================ */
.tpl-preview-fresh-orange .tpl-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff7ed;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 18px;
}
.tpl-preview-fresh-orange .tpl-photo {
    width: 80px;
    height: 105px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #fdba74;
}
.tpl-preview-fresh-orange .tpl-name {
    font-size: 26px;
    font-weight: 800;
    color: #c2410c;
}
.tpl-preview-fresh-orange .tpl-intent {
    font-size: 14px;
    color: #ea580c;
    font-weight: 500;
    margin: 2px 0 6px;
}
.tpl-preview-fresh-orange .tpl-contact {
    font-size: 12px;
    color: #9a3412;
}
.tpl-preview-fresh-orange .tpl-section-title {
    font-size: 14px;
    color: #ea580c;
    font-weight: 700;
    border: none;
    border-left: 4px solid #ea580c;
    padding-left: 10px;
    margin-bottom: 8px;
}
.tpl-preview-fresh-orange .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
.tpl-preview-fresh-orange .tpl-skill-item {
    background: #fff7ed;
    color: #c2410c;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}


/* ================================================================
   8. tech-dark (科技暗色) - Dark bg, cyan accents
   ================================================================ */
.tpl-preview-tech-dark {
    background: #1e293b;
    color: #e2e8f0;
}
.tpl-preview-tech-dark .tpl-header {
    background: #0f172a;
    color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.tpl-preview-tech-dark .tpl-photo {
    width: 80px;
    height: 105px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #22d3ee;
}
.tpl-preview-tech-dark .tpl-name {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}
.tpl-preview-tech-dark .tpl-intent {
    font-size: 14px;
    color: #22d3ee;
    margin: 2px 0 6px;
}
.tpl-preview-tech-dark .tpl-contact {
    font-size: 12px;
    color: #94a3b8;
}
.tpl-preview-tech-dark .tpl-section {
    padding: 14px 16px;
    margin-bottom: 12px;
    background: rgba(15,23,42,0.5);
    border-radius: 6px;
}
.tpl-preview-tech-dark .tpl-section-title {
    font-size: 13px;
    color: #22d3ee;
    font-weight: 600;
    border: none;
    border-bottom: 1px solid rgba(34,211,238,0.3);
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.tpl-preview-tech-dark .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #cbd5e1;
}
/* Skills as terminal-style tags */
.tpl-preview-tech-dark .tpl-skill-item {
    background: rgba(34,211,238,0.1);
    color: #22d3ee;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.tpl-preview-tech-dark .tpl-skill-bar {
    background: rgba(34,211,238,0.15);
    height: 6px;
}
.tpl-preview-tech-dark .tpl-skill-fill {
    background: #22d3ee;
}


/* ================================================================
   9. gradient-purple (渐变紫) - Modern gradient header
   ================================================================ */
.tpl-preview-gradient-purple .tpl-header {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #ffffff;
    padding: 24px;
    border-radius: 10px 10px 0 0;
    text-align: center;
    margin-bottom: 0;
}
.tpl-preview-gradient-purple .tpl-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    margin: 0 auto 10px;
    display: block;
}
.tpl-preview-gradient-purple .tpl-name {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}
.tpl-preview-gradient-purple .tpl-intent {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin: 4px 0 8px;
}
.tpl-preview-gradient-purple .tpl-contact {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}
/* Body wraps below the header */
.tpl-preview-gradient-purple .tpl-body {
    background: #ffffff;
    padding: 24px;
    border: 1px solid #e9d5ff;
    border-top: none;
    border-radius: 0 0 10px 10px;
}
.tpl-preview-gradient-purple .tpl-section {
    margin-bottom: 16px;
}
.tpl-preview-gradient-purple .tpl-section-title {
    font-size: 14px;
    color: #7c3aed;
    font-weight: 700;
    border: none;
    padding: 0;
    margin-bottom: 8px;
}
.tpl-preview-gradient-purple .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
.tpl-preview-gradient-purple .tpl-skill-item {
    background: #f5f3ff;
    color: #6d28d9;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}
.tpl-preview-gradient-purple .tpl-skill-bar {
    background: #ede9fe;
    height: 6px;
}
.tpl-preview-gradient-purple .tpl-skill-fill {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}


/* ================================================================
   10. clean-grid (清新网格) - Clean grid, teal accents
   ================================================================ */
.tpl-preview-clean-grid .tpl-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 2px solid #0d9488;
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.tpl-preview-clean-grid .tpl-photo {
    width: 85px;
    height: 110px;
    border-radius: 6px;
    object-fit: cover;
}
.tpl-preview-clean-grid .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #134e4a;
}
.tpl-preview-clean-grid .tpl-intent {
    font-size: 14px;
    color: #0d9488;
    font-weight: 500;
    margin: 2px 0 6px;
}
.tpl-preview-clean-grid .tpl-contact {
    font-size: 12px;
    color: #6b7280;
}
.tpl-preview-clean-grid .tpl-section-title {
    font-size: 13px;
    color: #0d9488;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    padding: 0;
    margin-bottom: 12px;
    position: relative;
}
/* Decorative bar below section title */
.tpl-preview-clean-grid .tpl-section-title::after {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    background: #0d9488;
    margin-top: 4px;
    border-radius: 2px;
}
.tpl-preview-clean-grid .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
/* Skills in 2-column grid */
.tpl-preview-clean-grid .tpl-skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}
.tpl-preview-clean-grid .tpl-skill-item {
    font-size: 12px;
    color: #374151;
    padding: 4px 0;
    border-bottom: 1px solid #f0fdfa;
    position: relative;
    padding-left: 12px;
}
.tpl-preview-clean-grid .tpl-skill-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0d9488;
}
.tpl-preview-clean-grid .tpl-skill-bar {
    background: #ccfbf1;
    height: 5px;
}
.tpl-preview-clean-grid .tpl-skill-fill {
    background: #0d9488;
}


/* ================================================================
   11. intl-english (国际范) - English CV format, serif fonts
   ================================================================ */
.tpl-preview-intl-english .tpl-header {
    text-align: center;
    border-bottom: 3px double #1e40af;
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.tpl-preview-intl-english .tpl-photo {
    width: 75px;
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
}
.tpl-preview-intl-english .tpl-name {
    font-size: 30px;
    font-weight: 700;
    color: #1e3a5f;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}
.tpl-preview-intl-english .tpl-intent {
    font-size: 14px;
    color: #3b82f6;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-style: italic;
    margin: 4px 0 6px;
}
.tpl-preview-intl-english .tpl-contact {
    font-size: 12px;
    color: #6b7280;
}
.tpl-preview-intl-english .tpl-contact span + span::before {
    content: "  \00B7  ";
    color: #93c5fd;
}
.tpl-preview-intl-english .tpl-section {
    margin-bottom: 16px;
}
.tpl-preview-intl-english .tpl-section-title {
    font-size: 13px;
    color: #1e40af;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-bottom: 1px solid #93c5fd;
    padding-bottom: 4px;
    margin-bottom: 10px;
}
.tpl-preview-intl-english .tpl-content {
    font-size: 13px;
    line-height: 1.8;
    color: #374151;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}
.tpl-preview-intl-english .tpl-skill-item {
    font-size: 12px;
    color: #374151;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    padding: 2px 0;
}
.tpl-preview-intl-english .tpl-skill-item + .tpl-skill-item::before {
    content: "\00B7";
    color: #93c5fd;
    margin: 0 8px;
}


/* ================================================================
   12. warm-gold (温暖金) - Premium feel, gold accents
   ================================================================ */
.tpl-preview-warm-gold .tpl-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 2px solid #d97706;
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.tpl-preview-warm-gold .tpl-photo {
    width: 80px;
    height: 105px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #fbbf24;
}
.tpl-preview-warm-gold .tpl-name {
    font-size: 26px;
    font-weight: 600;
    color: #92400e;
    letter-spacing: 1px;
}
.tpl-preview-warm-gold .tpl-intent {
    font-size: 14px;
    color: #b45309;
    margin: 2px 0 6px;
}
.tpl-preview-warm-gold .tpl-contact {
    font-size: 12px;
    color: #78716c;
}
.tpl-preview-warm-gold .tpl-section {
    margin-bottom: 16px;
}
.tpl-preview-warm-gold .tpl-section-title {
    font-size: 14px;
    color: #b45309;
    font-weight: 600;
    border: none;
    padding: 0;
    margin-bottom: 10px;
    position: relative;
}
/* Decorative gold line below section title */
.tpl-preview-warm-gold .tpl-section-title::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: #fbbf24;
    margin-top: 5px;
}
.tpl-preview-warm-gold .tpl-content {
    font-size: 13px;
    line-height: 1.7;
    color: #44403c;
}
/* Skills with gold dot bullets */
.tpl-preview-warm-gold .tpl-skill-item {
    font-size: 12px;
    color: #44403c;
    padding: 3px 0;
    padding-left: 14px;
    position: relative;
}
.tpl-preview-warm-gold .tpl-skill-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
}
.tpl-preview-warm-gold .tpl-skill-bar {
    background: #fef3c7;
    height: 6px;
}
.tpl-preview-warm-gold .tpl-skill-fill {
    background: #d97706;
}


/* ================================================================
   13. elegant-dual (雅致双栏) - Dark sidebar + skill bars + white main
   ================================================================ */
.tpl-preview-elegant-dual {
    display: flex;
    min-height: 100%;
    font-size: 13px;
}
.tpl-preview-elegant-dual .tpl-sidebar {
    width: 220px;
    min-width: 220px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 28px 20px;
    flex-shrink: 0;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid rgba(255,255,255,0.1);
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-intent {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-section-title {
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin: 20px 0 10px;
    padding-bottom: 0;
    border-bottom: none;
    display: block;
}
.tpl-preview-elegant-dual .tpl-sidebar-text {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-skill-bars { margin-top: 8px; }
.tpl-preview-elegant-dual .tpl-sidebar .tpl-skill-bar-item {
    margin-bottom: 12px;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-skill-bar-item span {
    font-size: 12px;
    color: #cbd5e1;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-skill-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-skill-fill {
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 2px;
}
.tpl-preview-elegant-dual .tpl-sidebar .tpl-contact-list p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 6px;
    line-height: 1.8;
}
.tpl-preview-elegant-dual .tpl-main {
    flex: 1;
    padding: 32px 36px;
    background: #fff;
}
.tpl-preview-elegant-dual .tpl-main > .tpl-header { display: none; }
.tpl-preview-elegant-dual .tpl-main .tpl-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #6366f1;
    line-height: 1;
}
.tpl-preview-elegant-dual .tpl-main .tpl-content {
    font-size: 13px;
    line-height: 1.8;
    color: #334155;
}
.tpl-preview-elegant-dual .tpl-main .tpl-content p { margin-bottom: 6px; }


/* ================================================================
   14. arrow-banner (箭头横幅) - Gray banner headers with arrow accent
   ================================================================ */
.tpl-preview-arrow-banner {
    font-size: 13px;
    color: #333;
    overflow: hidden;
}
.tpl-preview-arrow-banner .tpl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #404040;
    color: #fff;
    padding: 18px 22px;
    margin-bottom: 18px;
}
.tpl-preview-arrow-banner .tpl-header-left { flex: 1; }
.tpl-preview-arrow-banner .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.tpl-preview-arrow-banner .tpl-contact-row {
    font-size: 12px;
    color: #ccc;
}
.tpl-preview-arrow-banner .tpl-contact-row span + span { margin-left: 16px; }
.tpl-preview-arrow-banner .tpl-photo {
    width: 80px;
    height: 105px;
    border-radius: 4px;
    margin-left: 20px;
}
.tpl-preview-arrow-banner .tpl-section {
    margin-bottom: 16px;
}
.tpl-preview-arrow-banner .tpl-section-title {
    background: #404040;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    margin: 0 0 10px;
    position: relative;
    letter-spacing: 1px;
}
.tpl-preview-arrow-banner .tpl-section-title::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 0;
    border-style: solid;
    border-width: 16px 0 16px 12px;
    border-color: transparent transparent transparent #404040;
}
.tpl-preview-arrow-banner .tpl-content {
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.7;
    color: #444;
}
.tpl-preview-arrow-banner .tpl-content p { margin-bottom: 8px; }


/* ================================================================
   15. fresh-blue (清新蓝) - Blue accent + icon section titles
   ================================================================ */
.tpl-preview-fresh-blue {
    font-size: 13px;
    color: #374151;
}
.tpl-preview-fresh-blue .tpl-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 3px solid #2563eb;
}
.tpl-preview-fresh-blue .tpl-photo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 3px solid #2563eb;
}
.tpl-preview-fresh-blue .tpl-header-info { flex: 1; }
.tpl-preview-fresh-blue .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.tpl-preview-fresh-blue .tpl-intent {
    font-size: 14px;
    color: #2563eb;
    margin-bottom: 6px;
}
.tpl-preview-fresh-blue .tpl-contact-row {
    font-size: 12px;
    color: #6b7280;
}
.tpl-preview-fresh-blue .tpl-contact-row span + span { margin-left: 14px; }
.tpl-preview-fresh-blue .tpl-section {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}
.tpl-preview-fresh-blue .tpl-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}
.tpl-preview-fresh-blue .tpl-content {
    font-size: 12px;
    line-height: 1.7;
    color: #374151;
}
.tpl-preview-fresh-blue .tpl-content p { margin-bottom: 6px; }
.tpl-preview-fresh-blue .tpl-skill-item {
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
}


/* ================================================================
   16. card-shadow (阴影卡片) - White cards on gray background
   ================================================================ */
.tpl-preview-card-shadow {
    font-size: 13px;
    color: #374151;
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
}
.tpl-preview-card-shadow .tpl-header {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tpl-preview-card-shadow .tpl-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}
.tpl-preview-card-shadow .tpl-header-info { flex: 1; }
.tpl-preview-card-shadow .tpl-name {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.tpl-preview-card-shadow .tpl-intent {
    font-size: 13px;
    color: #6366f1;
    margin-bottom: 6px;
}
.tpl-preview-card-shadow .tpl-contact-row {
    font-size: 12px;
    color: #6b7280;
}
.tpl-preview-card-shadow .tpl-contact-row span + span { margin-left: 14px; }
.tpl-preview-card-shadow .tpl-section {
    background: #fff;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tpl-preview-card-shadow .tpl-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}
.tpl-preview-card-shadow .tpl-content {
    font-size: 12px;
    line-height: 1.7;
    color: #4b5563;
}
.tpl-preview-card-shadow .tpl-content p { margin-bottom: 6px; }
.tpl-preview-card-shadow .tpl-skill-item {
    background: #f1f5f9;
    color: #334155;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
}


/* ================================================================
   17. blue-timeline (蓝线时间轴) - Blue vertical line + dots
   ================================================================ */
.tpl-preview-blue-timeline {
    font-size: 13px;
    color: #374151;
}
.tpl-preview-blue-timeline .tpl-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.tpl-preview-blue-timeline .tpl-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #3b82f6;
}
.tpl-preview-blue-timeline .tpl-header-info { flex: 1; }
.tpl-preview-blue-timeline .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.tpl-preview-blue-timeline .tpl-intent {
    font-size: 13px;
    color: #3b82f6;
    margin-bottom: 6px;
}
.tpl-preview-blue-timeline .tpl-contact-row {
    font-size: 12px;
    color: #6b7280;
}
.tpl-preview-blue-timeline .tpl-contact-row span + span { margin-left: 14px; }
.tpl-preview-blue-timeline .tpl-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 14px;
    padding-left: 16px;
    position: relative;
}
.tpl-preview-blue-timeline .tpl-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}
/* Timeline items */
.tpl-preview-blue-timeline .tpl-timeline {
    padding-left: 24px;
    border-left: 2px solid #bfdbfe;
    margin-left: 4px;
    margin-bottom: 18px;
}
.tpl-preview-blue-timeline .tpl-tl-item {
    position: relative;
    padding: 0 0 16px 16px;
}
.tpl-preview-blue-timeline .tpl-tl-item::before {
    content: "";
    position: absolute;
    left: -29px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #bfdbfe;
}
.tpl-preview-blue-timeline .tpl-tl-date {
    font-size: 11px;
    color: #6b7280;
    display: block;
    margin-bottom: 2px;
}
.tpl-preview-blue-timeline .tpl-tl-body {
    font-size: 12px;
    line-height: 1.6;
    color: #374151;
}
.tpl-preview-blue-timeline .tpl-tl-body strong {
    color: #1e293b;
}
.tpl-preview-blue-timeline .tpl-tl-body p {
    margin: 4px 0 0;
    color: #4b5563;
}
.tpl-preview-blue-timeline .tpl-section:not(.tpl-timeline) {
    margin-bottom: 14px;
}
.tpl-preview-blue-timeline .tpl-skill-item {
    background: #eff6ff;
    color: #1e40af;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}


/* ================================================================
   18. dark-header (深色顶部) - Dark top section + clean white body
   ================================================================ */
.tpl-preview-dark-header {
    font-size: 13px;
    color: #374151;
}
.tpl-preview-dark-header .tpl-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #1e293b;
    color: #fff;
    padding: 24px 28px;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}
.tpl-preview-dark-header .tpl-photo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
}
.tpl-preview-dark-header .tpl-header-info { flex: 1; }
.tpl-preview-dark-header .tpl-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.tpl-preview-dark-header .tpl-intent {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.tpl-preview-dark-header .tpl-contact-row {
    font-size: 12px;
    color: #94a3b8;
}
.tpl-preview-dark-header .tpl-contact-row span + span { margin-left: 16px; }
.tpl-preview-dark-header .tpl-body {
    padding: 20px 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.tpl-preview-dark-header .tpl-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.tpl-preview-dark-header .tpl-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.tpl-preview-dark-header .tpl-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    padding-left: 12px;
    border-left: 3px solid #3b82f6;
}
.tpl-preview-dark-header .tpl-content {
    font-size: 12px;
    line-height: 1.7;
    color: #4b5563;
}
.tpl-preview-dark-header .tpl-content p { margin-bottom: 6px; }
.tpl-preview-dark-header .tpl-skill-item {
    background: #f1f5f9;
    color: #334155;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}


/* ========== Bean Badge (User Center Sidebar) ========== */
.uc-bean-badge { display:inline-flex; align-items:center; gap:4px; margin-top:6px; padding:2px 10px 2px 6px; background:rgba(245,158,11,0.08); border:1px solid rgba(245,158,11,0.2); border-radius:20px; font-size:12px; font-weight:600; color:#b45309; text-decoration:none; transition:background .15s; }
.uc-bean-badge:hover { background:rgba(245,158,11,0.15); text-decoration:none; color:#92400e; }
.uc-bean-badge-icon { width:16px; height:16px; flex-shrink:0; }

/* ========== Chat UI ========== */
.chat-container { display:flex; flex-direction:column; height:70vh; max-height:620px; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:#fff; }
.chat-messages { flex:1; overflow-y:auto; padding:16px; }
.chat-welcome { text-align:center; padding:60px 20px; }
.chat-welcome-icon { font-size:48px; margin-bottom:12px; display:flex; justify-content:center; }
.chat-welcome-text { font-size:18px; font-weight:600; color:var(--text); }
.chat-welcome-sub { font-size:13px; color:var(--text-muted); margin-top:6px; }
.chat-msg { display:flex; margin-bottom:14px; gap:8px; }
.chat-msg.user { flex-direction:row-reverse; }
.chat-msg-avatar { width:32px; height:32px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:16px; overflow:hidden; }.chat-msg-avatar img { width:100%; height:100%; object-fit:cover; }
.chat-msg.user .chat-msg-avatar { background:transparent; }
.chat-msg.assistant .chat-msg-avatar { background:transparent; }
.chat-msg-bubble { max-width:75%; padding:10px 14px; border-radius:14px; font-size:14px; line-height:1.6; word-break:break-word; white-space:pre-wrap; }
.chat-msg.user .chat-msg-bubble { background:#3b82f6; color:#fff; border-bottom-right-radius:4px; }
.chat-msg.assistant .chat-msg-bubble { background:#f3f4f6; color:var(--text); border-bottom-left-radius:4px; }
.chat-msg-bubble.typing::after { content:"▍"; animation:blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.chat-input-area { display:flex; gap:8px; padding:12px; border-top:1px solid var(--border); background:#fafafa; align-items:flex-end; }
.chat-input { flex:1; border:1px solid var(--border); border-radius:10px; padding:10px 14px; font-size:14px; resize:none; outline:none; font-family:inherit; }
.chat-input:focus { border-color:#3b82f6; }
.chat-send-btn { width:40px; height:40px; border:none; background:#3b82f6; color:#fff; border-radius:10px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .15s; }
.chat-send-btn:hover { background:#2563eb; }
.chat-send-btn:disabled { background:#94a3b8; cursor:not-allowed; }
.chat-vip-gate, .chat-disabled { text-align:center; padding:80px 20px; }
.chat-vip-icon, .chat-disabled-icon { font-size:48px; margin-bottom:12px; }
.chat-vip-title, .chat-disabled-title { font-size:18px; font-weight:600; margin-bottom:6px; }
.chat-vip-desc, .chat-disabled-desc { font-size:14px; color:var(--text-muted); margin-bottom:16px; }

/* ========== Bean Transactions ========== */
.bean-summary-cards { display:flex; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.bean-summary-card { flex:1; min-width:120px; background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:16px; text-align:center; }
.bean-summary-label { font-size:13px; color:var(--text-muted); margin-bottom:6px; }
.bean-summary-value { font-size:24px; font-weight:700; color:var(--text); }
.bean-summary-value.bean-earn { color:#16a34a; }
.bean-summary-value.bean-spend { color:#dc2626; }
.bean-tx-item { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.bean-tx-item:last-child { border-bottom:none; }
.bean-tx-info { flex:1; min-width:0; }
.bean-tx-desc { font-size:14px; font-weight:500; }
.bean-tx-time { font-size:12px; color:var(--text-muted); margin-top:2px; }
.bean-tx-amount { font-size:15px; font-weight:600; white-space:nowrap; margin-left:12px; }
.bean-tx-amount.earn { color:#16a34a; }
.bean-tx-amount.spend { color:#dc2626; }

/* Avatar & Nickname (User Center) */
.uc-avatar-wrap { position:relative; width:64px; height:64px; margin:0 auto; cursor:pointer; border-radius:50%; overflow:hidden; }
.uc-avatar-img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.uc-avatar-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:var(--bg); font-size:28px; border-radius:50%; }
.uc-avatar-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.5); color:#fff; font-size:12px; opacity:0; transition:opacity .2s; border-radius:50%; }
.uc-avatar-wrap:hover .uc-avatar-overlay { opacity:1; }

/* Sidebar nickname button */
.uc-nickname-row { display:inline-flex; align-items:center; gap:4px; font-size:15px; font-weight:600; margin-top:6px; cursor:pointer; padding:3px 8px; border-radius:6px; transition:background .15s; }
.uc-nickname-row:hover { background:var(--bg-hover, rgba(0,0,0,0.04)); }
.uc-nickname-row svg { opacity:0; transition:opacity .15s; color:var(--text-muted); flex-shrink:0; }
.uc-nickname-row:hover svg { opacity:1; }

/* Profile cards */
.profile-cards { display:flex; flex-direction:column; gap:16px; max-width:520px; }
.profile-card { background:var(--card-bg, #fff); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.profile-card-title { font-size:14px; font-weight:600; padding:14px 20px; border-bottom:1px solid var(--border); color:var(--text-primary, #1a1a1a); }
.profile-card-body { padding:4px 20px; }
.profile-info-row { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); gap:12px; }
.profile-info-row:last-child { border-bottom:none; }
.profile-info-label { font-size:13px; color:var(--text-secondary, #666); min-width:60px; flex-shrink:0; }
.profile-info-value { font-size:14px; color:var(--text-primary, #1a1a1a); flex:1; word-break:break-all; }
.profile-info-badge { font-size:11px; color:var(--text-muted, #999); background:var(--bg, #f5f5f5); padding:2px 8px; border-radius:4px; flex-shrink:0; }
.profile-vip-row { display:flex; align-items:center; gap:14px; padding:16px 0; }
.profile-vip-icon { font-size:28px; flex-shrink:0; }
.profile-vip-info { flex:1; min-width:0; }
.profile-vip-level { font-size:15px; font-weight:600; }
.profile-vip-exp { font-size:12px; color:var(--text-muted, #999); margin-top:2px; }

/* Nickname modal */
.nickname-modal { background:var(--card-bg, #fff); border-radius:16px; width:360px; max-width:90vw; padding:0; overflow:hidden; animation:modalIn .2s ease; }
@keyframes modalIn { from { opacity:0; transform:scale(0.95) translateY(8px); } to { opacity:1; transform:scale(1) translateY(0); } }
.nickname-modal-header { font-size:16px; font-weight:600; padding:20px 24px 0; }
.nickname-modal-body { padding:16px 24px; }
.nickname-modal-label { font-size:13px; color:var(--text-secondary, #666); display:block; margin-bottom:8px; }
.nickname-modal-input { width:100%; border:1.5px solid var(--border); border-radius:8px; padding:10px 14px; font-size:15px; outline:none; transition:border-color .15s; box-sizing:border-box; }
.nickname-modal-input:focus { border-color:var(--primary); }
.nickname-modal-counter { text-align:right; font-size:12px; color:var(--text-muted, #999); margin-top:4px; }
.nickname-modal-error { font-size:13px; color:var(--danger, #dc2626); margin-top:8px; padding:6px 10px; background:rgba(220,38,38,0.06); border-radius:6px; }
.nickname-modal-footer { display:flex; justify-content:flex-end; gap:8px; padding:0 24px 20px; }

/* Chat Intro Modal Animation */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* Chat Intro Modal Animation */

/* Payment Modal */
.pay-plan-card {
    flex: 1;
    position: relative;
    padding: 20px 14px 16px;
    border-radius: 14px;
    border: 2px solid #e8ecf0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafbfc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.pay-plan-card:hover {
    border-color: #93b4f5;
    background: #f5f8ff;
    box-shadow: 0 4px 16px rgba(59,130,246,0.12);
}
.pay-plan-selected {
    border-color: var(--primary, #3b82f6) !important;
    background: linear-gradient(180deg, #eef3ff, #f7f9ff) !important;
    box-shadow: 0 4px 20px rgba(59,130,246,0.15), inset 0 0 0 1px var(--primary, #3b82f6) !important;
}

/* ===== Payment Modal ===== */
.pay-modal-wrap {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.pay-modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}
.pay-modal-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: 92%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    overflow: hidden;
}
.pay-modal-close {
    position: absolute;
    top: 16px; right: 18px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}
.pay-modal-close:hover { background: #e5e7eb; color: #555; }
.pay-modal-header {
    text-align: center;
    padding: 32px 28px 8px;
}
.pay-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}
.pay-modal-subtitle {
    font-size: 13px;
    color: #999;
}
.pay-modal-body {
    padding: 20px 28px 8px;
}
.pay-plans {
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}
.pay-plan {
    flex: 1;
    text-align: center;
    padding: 22px 12px 18px;
    border-radius: 14px;
    border: 2px solid #e8ecf0;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pay-plan:hover {
    border-color: #93b4f5;
    background: #f5f8ff;
    box-shadow: 0 4px 16px rgba(59,130,246,0.1);
}
.pay-plan-selected {
    border-color: #3b82f6 !important;
    background: linear-gradient(180deg, #eef3ff, #f7faff) !important;
    box-shadow: 0 4px 20px rgba(59,130,246,0.15), inset 0 0 0 1px #3b82f6 !important;
}
.pay-plan-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.pay-plan-name {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    margin-bottom: 8px;
}
.pay-plan-price {
    font-size: 30px;
    font-weight: 800;
    color: #222;
    margin-bottom: 6px;
}
.pay-plan-desc {
    font-size: 11px;
    color: #bbb;
}
.pay-channel-section {
    margin-bottom: 4px;
}
.pay-channel-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    margin-bottom: 10px;
}
.pay-channels {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}
.pay-channel {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.pay-channel input { display: none; }
.pay-channel-active {
    border-color: #3b82f6;
}
.pay-channel-icon {
    width: 22px; height: 22px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.pay-icon-alipay { background: #1677ff; }
.pay-icon-wechat { background: #07c160; }
.pay-modal-footer {
    padding: 16px 28px 28px;
}
.pay-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}
.pay-submit-btn:hover { opacity: 0.9; }
.pay-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pay-modal-error {
    display: none;
    text-align: center;
    color: #dc2626;
    font-size: 13px;
    margin-top: 12px;
}

.pay-modal-v3 {
    max-width: 380px;
    border-radius: 16px;
}
.pm3-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.pm3-crown {
    font-size: 28px;
    line-height: 1;
}
.pm3-title {
    font-size: 17px;
    font-weight: 700;
    color: #92400e;
}
.pm3-sub {
    font-size: 11px;
    color: #b45309;
    margin-top: 2px;
}
.pm3-body {
    padding: 14px 24px 4px;
}
.pm3-plans {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.pm3-plan {
    flex: 1;
    text-align: center;
    padding: 14px 8px 12px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.pm3-plan:hover {
    border-color: #93b4f5;
    background: #f8faff;
}
.pm3-plan-sel {
    border-color: #3b82f6 !important;
    background: #eef4ff !important;
}
.pm3-plan-tag {
    position: absolute;
    top: -8px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 6px;
}
.pm3-plan-name {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 4px;
}
.pm3-plan-price {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}
.pm3-plan-save {
    font-size: 11px;
    color: #16a34a;
    font-weight: 600;
    margin-top: 2px;
}
.pm3-plan-bean {
    display: inline-block;
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 6px;
}
.pm3-plan-bean b {
    color: #f59e0b;
    font-weight: 700;
}
.pm3-bean-hot {
    background: #fef3c7;
    color: #92400e;
}
.pm3-bean-hot b {
    color: #dc2626;
}
.pm3-plan-perday {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}
.pm3-perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
}
.pm3-perk-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f1f5f9;
    font-size: 12px;
    color: #475569;
    line-height: 1.3;
}
.pm3-perk-card strong {
    color: #f59e0b;
    font-weight: 700;
}
.pm3-perk-ic {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pm3-perk-ic-bean { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.pm3-perk-ic-export { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
.pm3-perk-ic-tpl { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.pm3-perk-ic-ai { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #16a34a; }
.addr-act-btn {
    width: 28px; height: 28px; border: none; background: #f1f5f9; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    color: #64748b; transition: all 0.15s;
}
.addr-act-btn:hover { background: #e2e8f0; color: #334155; }
.addr-act-del:hover { background: #fef2f2; color: #dc2626; }
.pm3-pay-row {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}
.pm3-ch {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.pm3-ch input { display: none; }
.pm3-ch-active {
    border-color: #3b82f6;
    background: #f0f5ff;
}
.pm3-ch-ic {
    width: 18px; height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}
.pm3-ic-zfb { background: #1677ff; }
.pm3-ic-wx { background: #07c160; }
.pm3-ic-xh { background: #ff6600; }
.pm3-footer {
    padding: 12px 24px 20px;
}
.pm3-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s;
}
.pm3-btn:hover { opacity: 0.9; }
.pm3-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pm3-err {
    display: none;
    text-align: center;
    color: #dc2626;
    font-size: 12px;
    margin-top: 8px;
}

/* ===== VIP Template Gate ===== */
.vip-gate-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;}
.vip-gate-card{background:#fff;border-radius:20px;padding:36px 32px 28px;max-width:400px;width:92%;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,0.2);}
.vip-gate-crown{font-size:48px;margin-bottom:12px;}
.vip-gate-title{font-size:20px;font-weight:700;color:#111;margin-bottom:4px;}
.vip-gate-name{font-size:15px;color:#f59e0b;font-weight:600;margin-bottom:4px;}
.vip-gate-desc{font-size:13px;color:#999;margin-bottom:24px;}
.vip-gate-options{margin-bottom:16px;}
.vip-gate-option{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px;cursor:pointer;transition:all 0.2s;border:2px solid #e8ecf0;text-align:left;}
.vip-gate-option:hover{border-color:#93b4f5;background:#f8faff;}
.vip-gate-option-primary{border-color:#3b82f6;background:#f0f5ff;margin-bottom:0;}
.vip-gate-option-primary:hover{background:#e8efff;}
.vip-gate-option-icon{font-size:24px;flex-shrink:0;}
.vip-gate-option-info{flex:1;min-width:0;}
.vip-gate-option-title{font-size:14px;font-weight:600;color:#222;}
.vip-gate-option-sub{font-size:12px;color:#999;margin-top:2px;}
.vip-gate-option-arrow{font-size:20px;color:#ccc;flex-shrink:0;}
.vip-gate-divider{text-align:center;padding:12px 0;position:relative;}
.vip-gate-divider span{font-size:12px;color:#bbb;background:#fff;padding:0 10px;position:relative;z-index:1;}
.vip-gate-divider::before{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:#e8ecf0;}
.vip-gate-option-single{border-color:#e8ecf0;}
.vip-gate-hint{font-size:12px;color:#f59e0b;margin-bottom:12px;padding:8px 12px;background:#fffbeb;border-radius:8px;}
.vip-gate-back{display:block;margin-top:8px;font-size:13px;color:#999;text-decoration:none;}
.vip-gate-back:hover{color:#666;}
.single-pay-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;align-items:center;justify-content:center;}
.single-pay-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);}
.single-pay-card{position:relative;background:#fff;border-radius:20px;padding:32px 28px;max-width:360px;width:90%;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,0.2);}
.single-pay-close{position:absolute;top:14px;right:18px;width:28px;height:28px;border-radius:50%;background:#f3f4f6;display:flex;align-items:center;justify-content:center;font-size:18px;color:#999;cursor:pointer;}
.single-pay-title{font-size:16px;font-weight:600;color:#222;margin-bottom:12px;}
.single-pay-price{font-size:36px;font-weight:800;color:#222;margin-bottom:4px;}
.single-pay-desc{font-size:13px;color:#999;margin-bottom:20px;}
.single-pay-channels{display:flex;gap:10px;margin-bottom:20px;}
.single-ch{flex:1;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;padding:11px;border-radius:10px;border:2px solid #e5e7eb;font-size:13px;font-weight:500;transition:all 0.2s;}
.single-ch input{display:none;}
.single-ch.active{border-color:#3b82f6;}
.single-pay-btn{width:100%;padding:13px;font-size:15px;font-weight:700;border-radius:12px;border:none;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;cursor:pointer;}
.single-pay-btn:disabled{opacity:0.5;cursor:not-allowed;}
.single-pay-error{display:none;font-size:13px;color:#dc2626;margin-top:10px;}


/* ========== Bean Gate & Badge ========== */
.chat-bean-gate { text-align:center; padding:60px 20px; }
.chat-bean-icon { font-size:48px; margin-bottom:12px; }
.chat-bean-title { font-size:18px; font-weight:600; margin-bottom:6px; }
.chat-bean-desc { font-size:14px; color:var(--text-muted); margin-bottom:16px; }
.bean-badge { background:#fef3c7; padding:4px 10px; border-radius:20px; font-weight:500; }

/* ========== Resume Select Card ========== */
.resume-select-card:active { transform:scale(0.97) !important; }

/* ========== Optimize Button ========== */
.btn-optimize { font-size:12px; padding:5px 10px; border-radius:6px; cursor:pointer; }

/* Bean transaction skeleton loader */
.bean-tx-skeleton { padding: 14px 0; border-bottom: 1px solid var(--border-light, #f0f0f0); }
.skeleton-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.skeleton-row:last-child { margin-bottom: 0; }
.skeleton-line { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; border-radius: 4px; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ========== Checkin Calendar ========== */
.checkin-cal-wrap{padding:0;max-width:380px;margin:0 auto;}
.checkin-cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.checkin-cal-month{font-size:16px;font-weight:700;color:#1a1a1a;}
.checkin-cal-nav{display:flex;gap:4px;}
.checkin-cal-nav button{width:32px;height:32px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.15s;}
.checkin-cal-nav button:hover{background:#f3f4f6;border-color:#d1d5db;}
.checkin-streak-bar{display:flex;align-items:center;gap:10px;margin-bottom:16px;padding:10px 14px;background:linear-gradient(135deg,#fef9c3,#fde68a);border-radius:12px;}
.checkin-streak-num{font-size:24px;font-weight:800;color:#b45309;}
.checkin-streak-label{font-size:12px;color:#92400e;font-weight:500;}
.checkin-streak-next{font-size:11px;color:#b45309;margin-top:2px;}
.checkin-milestones{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;}
.checkin-ms{font-size:11px;padding:3px 8px;border-radius:6px;background:#f1f5f9;color:#64748b;}
.checkin-ms.done{background:#dcfce7;color:#166534;}
.checkin-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:14px;}
.checkin-cal-dow{text-align:center;font-size:11px;color:#9ca3af;font-weight:600;padding:4px 0;}
.checkin-cal-day{position:relative;text-align:center;padding:8px 4px;border-radius:10px;font-size:13px;font-weight:500;color:#374151;cursor:default;transition:all 0.15s;min-height:38px;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.checkin-cal-day.empty{visibility:hidden;}
.checkin-cal-day.checked{background:#dcfce7;color:#166534;font-weight:700;}
.checkin-cal-day.checked::after{content:'\2713';position:absolute;top:1px;right:3px;font-size:8px;color:#16a34a;}
.checkin-cal-day.makeup{background:#dbeafe;color:#1d4ed8;font-weight:700;}
.checkin-cal-day.makeup::after{content:'\8865';position:absolute;top:1px;right:3px;font-size:8px;color:#3b82f6;}
.checkin-cal-day.today{background:linear-gradient(135deg,#3b82f6,#6366f1);color:#fff;font-weight:700;box-shadow:0 2px 8px rgba(59,130,246,0.3);}
.checkin-cal-day.today.checked{background:linear-gradient(135deg,#16a34a,#22c55e);box-shadow:0 2px 8px rgba(22,163,74,0.3);}
.checkin-cal-day.today.checked::after{color:#fff;}
.checkin-cal-day.makeup-eligible{border:1.5px dashed #3b82f6;cursor:pointer;}
.checkin-cal-day.makeup-eligible:hover{background:#eff6ff;transform:scale(1.05);}
.checkin-cal-day.future{color:#d1d5db;}
.checkin-cal-footer{display:flex;align-items:center;justify-content:space-between;padding-top:10px;border-top:1px solid #f3f4f6;}
.checkin-makeup-info{font-size:12px;color:#6b7280;}
.checkin-makeup-info strong{color:#3b82f6;}
