/* ===== 全局变量 ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bg-color: #0b0e1a;
    --card-bg: rgba(20, 22, 40, 0.72);
    --text-primary: #e8eaf6;
    --text-secondary: #a6adc4;
    --text-light: #7c85a3;
    --border-color: rgba(255, 255, 255, 0.10);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* ---- 语义色 / 组合渐变（Token 收敛补充） ---- */
    --color-white: #ffffff;
    --white-rgb: 255, 255, 255;
    --danger-color: #f56c6c;
    --warning-color: #e6a23c;
    --primary-hover: #5a6fd6;
    --primary-rgb: 102, 126, 234;
    --bg-muted: #161a2e;
    --code-text: #e0e0e0;
    --primary-gradient-strong: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4a5fc1 100%);
    --code-bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-subtle-gradient: linear-gradient(135deg, #14162a 0%, #1a1d36 100%);
    --bg-muted-gradient: linear-gradient(135deg, #161a2e 0%, #1b1f38 100%);
    --disabled-gradient: linear-gradient(135deg, #c0c4cc 0%, #909399 100%);
}


/* 弹窗最大宽度，防止小屏被截断 */
.el-dialog { max-width: 95vw; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(102, 126, 234, 0.20), transparent 42%),
        radial-gradient(circle at 88% 14%, rgba(118, 75, 162, 0.22), transparent 45%),
        radial-gradient(circle at 78% 88%, rgba(56, 189, 248, 0.12), transparent 50%),
        radial-gradient(circle at 25% 95%, rgba(129, 140, 248, 0.14), transparent 48%),
        var(--bg-color);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
}

/* ===== 布局容器 ===== */
.layout-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 顶部导航 ===== */
.header {
    background: rgba(13, 14, 26, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-menu {
    border-bottom: none !important;
    background: transparent !important;
}

.nav-menu .el-menu-item {
    font-size: 14px;
    font-weight: 500;
    height: 68px;
    line-height: 68px;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.nav-menu .el-menu-item:hover {
    color: var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.05) !important;
}

.nav-menu .el-menu-item.is-active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    font-weight: 600;
}

.menu-icon {
    margin-right: 6px;
}

/* 汉堡按钮：桌面隐藏，移动端显示 */
.hamburger-btn {
    display: none;
    margin-right: 8px;
}
.mobile-nav-menu {
    border-right: none !important;
}

/* ===== 用户信息 ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(var(--primary-rgb), 0.12);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
}

.logout-btn, .login-btn {
    color: var(--text-secondary) !important;
    font-size: 14px;
}

.register-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
    padding: 8px 20px !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.3s ease !important;
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4) !important;
}

/* ===== 主内容区 ===== */
.main-content {
    padding: 28px 32px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* ===== 欢迎横幅 ===== */
.welcome-banner {
    background: var(--primary-gradient-strong);
    border-radius: var(--radius-xl);
    padding: 30px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.3);
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(var(--white-rgb),0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(var(--white-rgb),0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* 横幅遮罩层，增强文字对比度 */
.welcome-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, transparent 60%);
    z-index: 0;
}

.banner-content {
    width: 100%;
    position: relative;
    z-index: 1;
}

.banner-text {
    color: var(--color-white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    max-width: 940px;
}

.banner-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.banner-desc {
    font-size: 14px;
    opacity: 0.92;
    margin: 0 0 14px;
    line-height: 1.5;
    max-width: 640px;
    font-weight: 400;
    text-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

/* 搜索框 + 数据统计 横向排列（搜索框占左侧，统计占右侧） */
.banner-row {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* 首页 banner 全局搜索框（2026-08-30） */
.banner-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 420px;
    max-width: 520px;
}
.banner-search-input {
    flex: 1;
}
.banner-search-input :deep(.el-input__wrapper),
.banner-search-input .el-input__wrapper {
    border-radius: var(--radius-lg, 10px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    padding-left: 8px;
}
.banner-search-input .el-input__prefix { color: var(--text-light); }
.banner-search-btn {
    padding: 0 28px;
}

.banner-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 0 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.stat-label {
    font-size: 13px;
    color: var(--color-white);
    opacity: 1;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(var(--white-rgb),0.35);
}

/* ===== 区块标题 ===== */
.section-header {
    margin-bottom: 24px;
}

/* ===== 浏览全部资源：板块切换 Tab ===== */
.browse-tabs {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.browse-tabs .el-radio-group {
    flex-wrap: wrap;
}
.browse-tabs .el-radio-button__inner {
    font-weight: 600;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== 模块管理（管理员后台） ===== */
.module-toolbar {
    flex-wrap: wrap;
    row-gap: 8px;
}
.module-toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.module-toolbar .admin-hint {
    display: block;
    width: 100%;
    margin-top: 4px;
    line-height: 1.5;
}
.admin-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-top: 12px;
    box-shadow: var(--shadow-sm, 0 4px 16px rgba(0, 0, 0, .18));
}
.module-sort-btns {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
}
.module-sort-btns .el-button {
    padding: 5px 8px;
}
.module-sort-tip {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 筛选栏 ===== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--card-bg);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.filter-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select .el-input__wrapper,
.filter-input .el-input__wrapper {
    border-radius: var(--radius-sm) !important;
}

.search-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
    padding: 10px 24px !important;
    border-radius: var(--radius-sm) !important;
}

/* ===== 模板卡片 ===== */
.template-grid-wrap {
    min-height: 200px;
}

.template-grid {
    margin-bottom: 24px;
}

.template-card {
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    overflow: hidden;
}

.template-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.15) !important;
    border-color: var(--primary-color) !important;
}

.template-card :deep(.el-card__body) {
    padding: 0 !important;
}

.template-card-inner {
    padding: 20px;
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.template-cat {
    font-weight: 600;
    padding: 4px 12px !important;
}

.usage-badge {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.template-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
}

.template-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.template-tag {
    font-size: 11px !important;
}

.template-card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.view-detail {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.template-card:hover .view-detail {
    letter-spacing: 1px;
}

/* ===== 分页 ===== */
.pagination {
    text-align: center;
    margin-top: 24px;
}

.pagination .el-pager li.is-active {
    background: var(--primary-gradient) !important;
}

/* ===== AI生成页面 ===== */
.ai-generate-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 24px;
}

.ai-form {
    padding: 8px 0;
}

.lang-radio .el-radio {
    margin-right: 16px;
}

.lang-radio .el-radio__input.is-checked + .el-radio__label {
    color: var(--primary-color) !important;
}

.lang-radio .el-radio.is-bordered.is-checked {
    border-color: var(--primary-color) !important;
}

.lang-icon {
    margin-right: 6px;
}

.req-textarea .el-textarea__inner {
    border-radius: var(--radius-md) !important;
    font-size: 14px;
    line-height: 1.8;
}

.generate-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
    padding: 12px 32px !important;
    border-radius: var(--radius-md) !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4) !important;
}

.download-btn {
    border-radius: var(--radius-md) !important;
    padding: 12px 24px !important;
    font-weight: 600;
}

/* ===== 结果卡片 ===== */
.result-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
}

.card-header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
}

.risk-tag {
    font-weight: 600;
}

.export-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
}

/* ===== 代码块 ===== */
.code-block {
    background: var(--code-bg-gradient);
    color: var(--code-text);
    padding: 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    max-height: 500px;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid rgba(var(--white-rgb),0.1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

/* ===== 日志解析页面 ===== */
.log-tabs-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 24px;
}

.log-tabs .el-tabs__item {
    font-size: 15px;
    font-weight: 600;
    padding: 0 24px !important;
    height: 50px;
    line-height: 50px;
}

.log-tabs .el-tabs__item.is-active {
    color: var(--primary-color) !important;
}

.log-tabs .el-tabs__active-bar {
    background: var(--primary-gradient) !important;
    height: 3px !important;
}

.tab-label {
    font-size: 15px;
}

.upload-area, .paste-area {
    padding: 20px 0;
}

.log-upload {
    margin-bottom: 20px;
}

.upload-icon {
    font-size: 48px !important;
    color: var(--primary-color) !important;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 15px;
    color: var(--text-secondary);
}

.upload-text em {
    color: var(--primary-color);
    font-style: normal;
    font-weight: 600;
}

.upload-tip {
    color: var(--text-light);
    font-size: 13px;
}

.log-type-select {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.select-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.paste-textarea .el-textarea__inner {
    border-radius: var(--radius-md) !important;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.paste-actions {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

/* 日志结果 */
.log-result-card {
    margin-top: 0;
}

.result-summary {
    margin-bottom: 24px;
}

.result-summary .el-descriptions__label {
    font-weight: 600;
    background: rgba(var(--primary-rgb), 0.05) !important;
}

.error-count {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 18px;
}

.warn-count {
    color: var(--warning-color);
    font-weight: 700;
    font-size: 18px;
}

.remain-count {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
}

.result-section {
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.error-item {
    margin-bottom: 8px;
    border-radius: var(--radius-sm) !important;
}

.error-table {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.suggestion-timeline {
    padding-left: 8px;
}

/* ===== 工作流页面 ===== */
.workflow-list-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    height: calc(100vh - 220px);
    overflow-y: auto;
}

.list-title {
    font-size: 15px;
    font-weight: 600;
}

.new-wf-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
}

.empty-tip {
    padding: 40px 0;
}

.workflow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.workflow-item:hover {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.workflow-item.active {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.wf-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wf-info {
    flex: 1;
    min-width: 0;
}

.wf-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-time {
    font-size: 11px;
    color: var(--text-light);
}

/* 工作流编辑器 */
.workflow-editor-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
}

.editor-title {
    font-size: 15px;
    font-weight: 600;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.save-btn {
    border-radius: var(--radius-sm) !important;
}

.gen-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
    border-radius: var(--radius-sm) !important;
}

.wf-form {
    padding: 8px 0;
}

.wf-input .el-input__wrapper,
.wf-textarea .el-textarea__inner,
.cron-input .el-input__wrapper,
.step-input .el-input__wrapper,
.step-textarea .el-textarea__inner,
.step-select .el-input__wrapper {
    border-radius: var(--radius-sm) !important;
}

.wf-divider {
    font-weight: 600;
    color: var(--text-primary);
}

.trigger-radio .el-radio {
    margin-right: 16px;
}

.trigger-radio .el-radio__input.is-checked + .el-radio__label {
    color: var(--primary-color) !important;
}

.trigger-radio .el-radio.is-bordered.is-checked {
    border-color: var(--primary-color) !important;
}

/* 工作流步骤 */
.workflow-step {
    background: var(--bg-subtle-gradient);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    position: relative;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.step-badge {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.step-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.remove-step-btn {
    color: var(--danger-color) !important;
}

.add-step-btn {
    width: 100%;
    border-radius: var(--radius-md) !important;
    padding: 14px !important;
    font-weight: 600;
    border: 2px dashed var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.03) !important;
    color: var(--primary-color) !important;
    transition: all 0.3s ease !important;
}

.add-step-btn:hover {
    background: rgba(var(--primary-rgb), 0.08) !important;
    border-color: var(--primary-color) !important;
}

/* 告警配置 */
.alert-switch {
    margin-right: 12px;
}

.alert-tip {
    font-size: 13px;
    color: var(--text-secondary);
}

.channel-group .el-checkbox {
    margin-right: 16px;
}

.channel-group .el-checkbox__input.is-checked + .el-checkbox__label {
    color: var(--primary-color) !important;
}

.channel-group .el-checkbox.is-bordered.is-checked {
    border-color: var(--primary-color) !important;
}

.empty-editor-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 历史记录页面 ===== */
.history-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
}

.history-table {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.detail-col {
    color: var(--text-secondary);
}

/* ===== 底部 ===== */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 20px 32px;
    color: var(--text-light);
    font-size: 13px;
}

.footer p {
    margin: 0;
}

/* ===== 登录注册弹窗 ===== */
.auth-dialog .el-dialog {
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
}

.auth-dialog .el-dialog__header {
    display: none;
}

/* ===== 筛选栏增强 ===== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-left, .filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.contribute-btn {
    background: var(--success-gradient) !important;
    border: none !important;
}

/* ===== 模板卡片增强 ===== */
.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-right .el-button {
    padding: 4px 8px;
}

.usage-icon {
    font-size: 18px;
}

.usage-icon-large {
    font-size: 24px;
}

.template-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.footer-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 模板详情增强 ===== */
.template-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.meta-left, .meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--bg-muted-gradient);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-usage-cat {
    margin-left: 4px;
}

.divider-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== 代码预览截断与遮罩 ===== */
.code-preview-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-preview {
    max-height: 500px;
    overflow: hidden;
    position: relative;
}

.code-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(26, 26, 46, 0.95));
    pointer-events: none;
}

.code-preview-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, transparent, rgba(26, 26, 46, 0.98));
    z-index: 10;
}

.mask-content {
    text-align: center;
    color: var(--color-white);
}

.mask-content .el-icon {
    font-size: 36px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.mask-content p {
    margin: 4px 0;
    font-size: 14px;
}

.mask-hint {
    color: var(--text-light) !important;
    font-size: 12px !important;
    margin-bottom: 12px !important;
}

.preview-tip {
    margin-top: 16px;
}

/* ===== 贡献模板弹窗 ===== */
.contribute-code .el-textarea__inner {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* ===== 评分弹窗 ===== */
.rating-dialog .el-rate {
    font-size: 28px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-left, .filter-right {
        width: 100%;
    }
    .template-detail-meta {
        flex-direction: column;
    }
    .meta-right {
        width: 100%;
    }
    .meta-right .el-button {
        flex: 1;
    }
}

.auth-dialog .el-dialog__body {
    padding: 0 !important;
}

.auth-header {
    background: var(--primary-gradient);
    padding: 32px;
    text-align: center;
    color: white;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    opacity: 0.9;
}

.auth-form {
    padding: 28px 32px 32px;
}

.auth-input .el-input__wrapper {
    border-radius: var(--radius-md) !important;
    padding: 6px 16px !important;
}

.auth-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
    font-size: 16px !important;
    border-radius: var(--radius-md) !important;
    height: 48px !important;
    transition: all 0.3s ease !important;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4) !important;
}

/* 登录图形验证码 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.captcha-input {
    flex: 1;
}
.captcha-img {
    width: 120px;
    height: 44px;
    border-radius: var(--radius-md);
    cursor: pointer;
    flex: none;
    border: 1px solid var(--border-color, #333);
    background: #1b1b22;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #999);
    font-size: 13px;
    user-select: none;
}
.captcha-img--empty {
    width: 120px;
}

.form-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 注册弹窗：账号类型切换 + 验证码行 */
.account-type-group {
    width: 100%;
    display: flex;
}
.account-type-group .el-radio-button {
    flex: 1;
}
.account-type-group .el-radio-button__inner {
    width: 100%;
    border-radius: var(--radius-md) !important;
}
.code-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.code-row .code-input {
    flex: 1;
}
.code-row .code-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    border-radius: var(--radius-md) !important;
    font-weight: 600;
}
.code-row .code-btn:not(:disabled) {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: var(--color-white) !important;
}

/* ===== 模板详情弹窗 ===== */
.template-dialog .el-dialog {
    border-radius: var(--radius-xl) !important;
}

.template-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-cat {
    font-weight: 600;
    padding: 6px 16px !important;
    font-size: 14px !important;
}

.detail-usage {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.template-detail-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    background: rgba(var(--primary-rgb), 0.05);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

/* ===== 工作流脚本弹窗 ===== */
.wf-script-dialog .el-dialog {
    border-radius: var(--radius-xl) !important;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--disabled-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

::-webkit-scrollbar-track {
    background: var(--bg-muted);
}

/* ===== Element Plus 组件覆盖 ===== */
.el-button--primary {
    --el-button-bg-color: var(--primary-color);
    --el-button-border-color: var(--primary-color);
    --el-button-hover-bg-color: var(--primary-hover);
    --el-button-hover-border-color: var(--primary-hover);
}

.el-input__wrapper:hover,
.el-textarea__inner:hover {
    box-shadow: 0 0 0 1px var(--primary-color) inset !important;
}

.el-input__wrapper.is-focus,
.el-textarea__inner:focus {
    box-shadow: 0 0 0 1px var(--primary-color) inset !important;
}

.el-select .el-input.is-focus .el-input__wrapper {
    box-shadow: 0 0 0 1px var(--primary-color) inset !important;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    .nav-menu {
        display: none;
    }
    .main-content {
        padding: 16px;
        max-width: none;
    }
    /* 移动端隐藏静态侧边栏，改用顶部汉堡抽屉导航（showMobileNav） */
    .side-nav {
        display: none !important;
    }
    .body-container {
        display: block;
    }
    .header-left {
        gap: 12px;
    }
    .header-right {
        gap: 8px;
    }
    .footer {
        padding: 18px 16px;
    }
    .welcome-banner {
        padding: 24px;
    }
    .banner-title {
        font-size: 24px;
    }
    .banner-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .banner-search {
        flex-direction: row;
        align-items: stretch;
        max-width: none;
        gap: 10px;
    }
    .banner-search-input :deep(.el-input__wrapper),
    .banner-search-input .el-input__wrapper {
        height: 42px;
        border-radius: 999px;
        padding: 0 16px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }
    .banner-search-input :deep(.el-input__prefix),
    .banner-search-input .el-input__prefix {
        color: var(--primary, #5b6cff);
    }
    .banner-search-input :deep(.el-input__inner),
    .banner-search-input .el-input__inner {
        height: 42px;
        font-size: 14px;
        color: #2c3140;
    }
    .banner-search-btn {
        flex: 0 0 auto;
        width: auto;
        height: 42px;
        padding: 0 22px;
        border-radius: 999px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    }
    .banner-stats {
        gap: 16px;
    }
    .stat-number {
        font-size: 22px;
    }
    .user-detail {
        display: none;
    }
    .hamburger-btn {
        display: inline-flex !important;
    }
    .filter-left {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-left .el-select,
    .filter-left .el-input {
        width: 100% !important;
    }
    .banner-search-btn {
        width: auto;
    }
}

/* ==========================================================
   图标统一适配（emoji -> Element Plus SVG 图标）
   全站散落的 emoji 已替换为 <el-icon> 组件，
   以下规则修正 SVG 图标的尺寸、对齐与间距。
   ========================================================== */

/* 1) 图标与文字基线对齐 */
.menu-icon .el-icon,
.lang-icon .el-icon,
.section-title .el-icon,
.section-subtitle .el-icon,
.result-title .el-icon,
.list-title .el-icon,
.editor-title .el-icon,
.divider-text .el-icon,
.tab-label .el-icon,
.stat-badge .el-icon,
.stat-item .el-icon {
    vertical-align: middle;
}

/* 2) 图标 + 文字容器：横向排列并垂直居中
      （.stat-item 原为 column，图标与数字会上下错开） */
.stat-item {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.stat-badge,
.divider-text,
.tab-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.section-title,
.section-subtitle,
.result-title,
.list-title,
.editor-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 3) Logo：background-clip:text 的渐变对 SVG 无效，改用纯色填充 */
.logo-icon {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: initial;
    color: var(--primary-color);
}

/* 4) 独立图标容器：确保 SVG 居中且随字号缩放 */
.fc-icon,
.wf-icon,
.auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 5) 组件内图标间距（Element Plus 不会为裸文本节点自动补间距） */
.el-button .el-icon,
.el-tag .el-icon,
.el-radio .el-icon,
.el-checkbox .el-icon,
.el-divider__text .el-icon {
    margin-right: 5px;
    vertical-align: middle;
}

/* 6) 箭头位于文字之后时，间距放在左侧 */
.view-detail {
    display: inline-flex;
    align-items: center;
}

.view-detail .el-icon {
    margin-right: 0;
    margin-left: 4px;
}

/* ===== 关于页（零栈工坊） ===== */
.about-section {
    max-width: 880px;
    margin: 0 auto;
    padding: 8px 4px 24px;
}

.about-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.about-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 4px 20px;
}

.about-avatar {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), #8b9cf5);
    box-shadow: var(--shadow-md);
}

.about-hero-text {
    min-width: 0;
}

.about-name {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.about-slogan {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.about-bio {
    color: var(--text-primary);
    line-height: 1.9;
}

.about-bio p {
    margin: 0 0 10px;
}

.about-resources {
    margin-top: 8px;
}

.res-card {
    height: 100%;
    padding: 22px 18px;
    text-align: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform .2s ease, box-shadow .2s ease;
}

.res-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.res-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.res-icon .el-icon {
    font-size: 24px;
}

.res-icon-script {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.res-icon-tool {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.res-icon-tutorial {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.res-icon-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.res-icon-warning {
    background: linear-gradient(135deg, #f6d365, #fda085);
}

.res-icon-danger {
    background: linear-gradient(135deg, #ff6a88, #ff99ac);
}

.res-icon-template {
    background: linear-gradient(135deg, #feca57, #ff9f43);
}

.res-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-primary);
}

.res-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-social {
    color: var(--text-secondary);
}

.social-tip {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

/* ===== 2026-08-29 UI 升级：图标统一 + Hero 特性胶囊 + 卡片悬浮 + 忘记密码 ===== */
.usage-icon { color: var(--primary-color); font-size: 20px; vertical-align: middle; }
.usage-icon-large { color: var(--primary-color); font-size: 28px; vertical-align: middle; margin-right: 8px; }

.banner-actions { display: flex; gap: 12px; margin-top: 0; flex-wrap: wrap; }
.banner-actions .el-button { padding: 0 22px; font-size: 14px; }
.banner-secondary { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); color: #fff; }
.banner-secondary:hover { background: rgba(255,255,255,0.28); color: #fff; }

.template-card { transition: transform .25s ease, box-shadow .25s ease; }
.template-card:hover { transform: translateY(-6px); }

.forgot-link { margin-left: 12px; }

/* ===== 2026-08-29 首页架构重构：通用资源站 ===== */
.home-section { margin-top: 30px; }
.home-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
.home-section-head .section-title { margin: 0; }
.more-link {
    color: var(--primary-color);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: opacity .2s;
}
.more-link:hover { opacity: .75; }
.home-row { margin-top: 16px; }
.tpl-mini-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 16px;
    cursor: pointer;
    height: 100%;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tpl-mini-card:hover { transform: translateY(-4px); border-color: var(--primary-color) !important; box-shadow: var(--shadow-md); }
.tpl-mini-card .el-card__body { padding: 16px; }
.tpl-mini-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tpl-mini-title {
    font-size: 15px; color: var(--text-primary); margin: 0 0 6px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tpl-mini-desc {
    font-size: 12px; color: var(--text-light); line-height: 1.5; height: 36px; margin: 0 0 10px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tpl-mini-footer { display: flex; gap: 14px; font-size: 12px; color: var(--text-secondary); }
.tpl-mini-footer span { display: inline-flex; align-items: center; gap: 3px; }

/* ===== 首页三列并排竖排（精选/热门/最新）===== */
.home-cols { display: flex; gap: 18px; margin-top: 8px; align-items: flex-start; }
.home-col {
    flex: 1 1 0; min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px 6px;
}
.home-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.home-col-head h3 { margin: 0; font-size: 16px; color: var(--text-primary); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.home-col-head h3 .el-icon { color: var(--primary-color); }
.home-items { list-style: none; margin: 0; padding: 0; }
.home-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 4px; border-bottom: 1px dashed var(--border-color);
    cursor: pointer; transition: background .15s ease; position: relative;
}
.home-item:last-child { border-bottom: none; }
.home-item:hover { background: var(--bg-muted, rgba(255,255,255,.03)); border-radius: var(--radius-sm); }
.home-rank {
    flex: 0 0 20px; height: 20px; line-height: 20px; text-align: center;
    font-size: 12px; font-weight: 700; color: var(--text-secondary);
    background: var(--bg-muted, rgba(255,255,255,.06)); border-radius: 50%;
}
.home-item:nth-child(1) .home-rank,
.home-item:nth-child(2) .home-rank,
.home-item:nth-child(3) .home-rank { color: #fff; background: var(--primary-color); }
.home-tag {
    flex: 0 0 auto; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 9px; color: #fff; font-weight: 600;
}
.home-item-main { flex: 1 1 auto; min-width: 0; }
.home-item-title {
    font-size: 13.5px; color: var(--text-primary); font-weight: 600; margin-bottom: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-item-desc {
    font-size: 12px; color: var(--text-light); line-height: 1.45; height: 17px; margin-bottom: 5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-item-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-secondary); }
.home-item-meta span { display: inline-flex; align-items: center; gap: 3px; }
.home-fav { position: absolute; top: 8px; right: 2px; color: var(--text-secondary); }
.home-fav:hover { color: #f5a623; }
.home-empty { color: var(--text-light); font-size: 13px; justify-content: center; cursor: default; }
@media (max-width: 768px) {
    .home-cols { flex-direction: column; }
    .home-col { width: 100%; }
}

/* ===== #47 资源详情页标准化：7 大模块样式 ===== */
.detail-usage-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.detail-env {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.detail-tutorial h4,
.detail-params h4,
.detail-limitations h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.detail-tutorial .tutorial-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.detail-params,
.detail-limitations,
.detail-tutorial { margin-bottom: 16px; }

.detail-limitations p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.detail-download-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.download-tip {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 16px;
}

.detail-related { margin-bottom: 8px; }

.related-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color) !important;
    box-shadow: var(--shadow-md);
}

.related-card .el-card__body { padding: 16px; }

.related-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.related-title {
    font-size: 15px;
    color: var(--text-primary);
    margin: 0 0 6px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-faq .el-collapse {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.detail-faq .el-collapse-item__header {
    padding: 0 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-faq .el-collapse-item__content {
    padding: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .detail-usage-section,
    .detail-download-section { padding: 16px; }
}

/* ===== 2026-08-29 新板块：电脑软件 / 在线工具 / 教程资源 详情弹窗 ===== */
/* 关于页 电脑软件 图标渐变（原缺失） */
.res-icon-software { background: linear-gradient(135deg, #4facfe, #00f2fe); }

/* 软件 / 工具 详情弹窗 */
.res-detail { color: var(--text-primary); }

/* ===== 独立详情页（/resource/{type}/{id}）===== */
.resource-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 8px 0 48px;
}
.resource-page-bar { margin-bottom: 16px; }
.resource-page-body { min-height: 200px; }
.resource-page .res-detail-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.resource-page .res-detail-head h1 { margin: 0; font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.res-params { margin: 0; padding-left: 20px; }
.res-params li { font-size: 14px; color: var(--text-secondary); line-height: 1.9; }
.res-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.res-detail-head h3 { margin: 0; font-size: 20px; font-weight: 700; color: var(--text-primary); }
.res-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.res-summary { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0 0 16px; }
.res-block {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 14px;
}
.res-block-label { font-size: 13px; font-weight: 600; color: var(--primary-color); margin-bottom: 6px; }
.res-block-text { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0; white-space: pre-wrap; }
.res-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.res-gallery-item { width: 100%; height: 120px; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); cursor: zoom-in; background: #f5f7fa; }
.res-gallery-item .el-image__inner { transition: transform .25s ease; }
.res-gallery-item:hover .el-image__inner { transform: scale(1.05); }
.res-meta { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; flex-wrap: wrap; }
.res-meta span { display: inline-flex; align-items: center; gap: 4px; }
.res-detail .el-button { width: 100%; }
.res-steps { margin: 0; padding-left: 20px; }
.res-steps li { font-size: 14px; color: var(--text-secondary); line-height: 1.9; }
.res-extra-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; }
.res-extra-line { font-size: 13px; color: var(--text-light); }

/* 教程 详情弹窗（图文 HTML 内容） */
.tut-detail { color: var(--text-primary); }
.tut-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; color: var(--text-secondary); }
.tut-author { font-weight: 600; color: var(--text-primary); }
.tut-views { display: inline-flex; align-items: center; gap: 4px; }
.tut-content { font-size: 15px; line-height: 1.9; color: var(--text-primary); }
.tut-content h2, .tut-content h3, .tut-content h4 { color: var(--text-primary); margin: 18px 0 10px; font-weight: 700; }
.tut-content p { margin: 0 0 12px; color: var(--text-secondary); }
.tut-content img { max-width: 100%; border-radius: var(--radius-md); margin: 8px 0; }
.tut-content pre, .tut-content code {
    background: var(--code-bg-gradient);
    color: var(--code-text);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}
.tut-content pre { padding: 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.tut-content ul, .tut-content ol { padding-left: 22px; margin: 0 0 12px; color: var(--text-secondary); }
.tut-content a { color: var(--primary-color); }
.tut-content blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 0 0 12px;
    padding: 4px 14px;
    color: var(--text-secondary);
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-sm);
}
.tut-content table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.tut-content th, .tut-content td { border: 1px solid var(--border-color); padding: 8px 10px; font-size: 13px; }
.tut-content th { background: var(--bg-muted); color: var(--text-primary); }

/* 详情弹窗在小屏下的内边距收敛 */
@media (max-width: 768px) {
    .res-detail-head { flex-direction: column; align-items: flex-start; }
    .tut-content { font-size: 14px; }
}

/* ===== 首页「资源分类」折叠面板已删除（2026-08-30）：分类入口由顶部导航承担 ===== */



/* ===== 评分 / 收藏互动引导（2026-08-30） ===== */
.interact-guide {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0 2px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.interact-guide .el-icon { color: var(--primary-color); font-size: 15px; }
.interact-guide b { color: var(--text-primary); }

/* 列表卡片：收藏按钮悬浮轻微放大，鼓励点击 */
.card-header-right .el-button { transition: transform .15s ease; }
.card-header-right .el-button:hover { transform: scale(1.08); }

/* 评分人数不足时「暂无评分」以次要色呈现，弱化冷清感 */
.stat-item .no-rating, .res-meta .no-rating { color: var(--text-light); }

/* 独立详情页：评分 / 收藏操作行（2026-08-30） */
.res-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* 评分人数不足时「暂无评分」弱化显示 */
.res-meta .no-rating { color: var(--text-light); }

/* ===================== 广告位 ===================== */
.ad-slot { margin: 14px 0; }
.ad-item { display: block; }
.ad-img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 8px; display: block; cursor: pointer; }
.ad-slot-sidebar .ad-img { max-height: 120px; }
.ad-slot-detail { margin-top: 18px; }

/* ===================== 个人中心 ===================== */
.user-center-section { max-width: 1100px; margin: 0 auto; }
.uc-card { margin-bottom: 16px; }
.uc-points { font-weight: 700; color: #409eff; margin-right: 10px; font-size: 16px; }
.uc-checkin { margin-left: 4px; }
.fav-card { margin-bottom: 14px; cursor: pointer; }
.fav-card-body { display: flex; gap: 10px; align-items: center; }
.fav-cover { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.fav-title { font-weight: 600; }
.fav-type { color: #909399; font-size: 12px; }
.fav-actions { margin-top: 10px; display: flex; gap: 8px; }
.uc-table { margin-top: 8px; }
.uc-tabs { margin-top: 8px; }

/* 首页卡片收藏按钮 */
.tpl-mini-header { display: flex; align-items: center; gap: 6px; }
.fav-mini-btn { margin-left: auto; color: #f0a020; }


/* 教程详情页配套文档下载条 */
.tut-doc-bar { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 14px; background: var(--bg-soft, #f6f8fa); border: 1px dashed #d0d7de; border-radius: 10px; }
.tut-doc-bar .el-icon { color: #409eff; }
.tut-doc-name { font-weight: 600; color: var(--text, #303133); }
.tut-doc-bar .el-button { margin-left: auto; }

/* 后台教程文档上传行 */
.doc-upload-row { display: flex; align-items: center; gap: 8px; }
.doc-url-hint { margin-top: 6px; font-size: 12px; color: #67c23a; word-break: break-all; }
.doc-url-hint a { color: #409eff; }

/* 教程正文内的提示框与表格（v-html 渲染） */
.tut-content .tut-note { margin: 14px 0; padding: 10px 14px; background: #fff7e6; border-left: 4px solid #f0a020; border-radius: 6px; color: #8a6d3b; font-size: 14px; line-height: 1.7; }
.tut-content .tut-tbl { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.tut-content .tut-tbl th, .tut-content .tut-tbl td { border: 1px solid #ebeef5; padding: 8px 10px; text-align: left; }
.tut-content .tut-tbl th { background: #f6f8fa; font-weight: 600; }
.tut-content pre { background: #1e1e2e; color: #e6e6e6; padding: 12px 14px; border-radius: 8px; overflow: auto; font-size: 13px; line-height: 1.6; }
.tut-content code { font-family: Consolas, Monaco, monospace; }
.tut-content h3 { margin: 20px 0 8px; font-size: 17px; color: var(--text, #303133); }
.tut-content p, .tut-content li { line-height: 1.8; color: #4a4a4a; }

/* 资源/教程卡片封面图（程序化 SVG 封面） */
.card-cover { width: 100%; height: 158px; object-fit: cover; border-radius: 10px 10px 0 0; display: block; background: #1e293b; margin-bottom: 12px; }
.tut-cover { width: 100%; max-width: 360px; max-height: 200px; object-fit: cover; border-radius: 12px; margin: 14px auto 4px; display: block; background: #1e293b; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.res-cover { width: 100%; max-width: 300px; max-height: 170px; object-fit: cover; border-radius: 12px; margin: 14px auto 18px; display: block; background: #1e293b; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* 游客预览提示：登录后查看完整内容 */
.preview-login-cta { margin: 16px 0 4px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.preview-login-cta .el-button { align-self: flex-start; }

/* 教程详情：阅读时长 + 目录 + 代码复制 */
.tut-meta .tut-read { display: inline-flex; align-items: center; gap: 3px; color: #94a3b8; font-size: 13px; margin-left: 4px; }
.tut-toc { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 12px 16px; margin: 14px 0 20px; }
.tut-toc-title { font-size: 13px; font-weight: 600; color: #e2e8f0; margin-bottom: 8px; letter-spacing: 1px; }
.tut-toc ul { list-style: none; margin: 0; padding: 0; }
.tut-toc li { margin: 4px 0; }
.tut-toc li.lv-3 { padding-left: 16px; }
.tut-toc a { color: #94a3b8; font-size: 13px; text-decoration: none; transition: color .15s; }
.tut-toc a:hover { color: #38bdf8; }
.tut-content pre { position: relative; background: #0b1220; border: 1px solid #1e293b; border-radius: 8px; padding: 14px 14px; overflow: auto; cursor: pointer; }
.tut-content pre::after { content: "点击复制"; position: absolute; top: 6px; right: 10px; font-size: 11px; color: #475569; opacity: 0; transition: opacity .15s; }
.tut-content pre:hover::after { opacity: 1; }
.tut-content pre code { background: transparent; padding: 0; color: #e2e8f0; font-size: 13px; line-height: 1.6; }

/* ===== 超小屏适配（≤480px） ===== */
@media (max-width: 480px) {
    .header {
        padding: 0 10px;
        height: 60px;
    }
    .header-left {
        gap: 8px;
    }
    .header-right {
        gap: 6px;
    }
    .logo-text {
        font-size: 17px;
    }
    .logo-icon {
        font-size: 24px;
    }
    .header-right .el-button {
        padding: 0 8px;
        font-size: 13px;
    }
    .main-content {
        padding: 12px 10px;
    }
    .welcome-banner {
        padding: 16px 14px;
        margin-bottom: 14px;
        border-radius: 16px;
        min-height: 0;
    }
    .banner-title {
        font-size: 17px;
        line-height: 1.3;
        margin-bottom: 4px;
        letter-spacing: 0.3px;
    }
    .banner-desc {
        font-size: 11.5px;
        margin-bottom: 10px;
        line-height: 1.45;
        opacity: 0.9;
    }
    .home-trust {
        font-size: 10.5px !important;
        margin-top: 6px !important;
        margin-bottom: 10px !important;
        gap: 4px !important;
    }
    .banner-row {
        gap: 8px;
        margin-bottom: 10px;
    }
    .banner-search {
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
    }
    .banner-search-input {
        flex: 1 1 auto;
        min-width: 0;
    }
    .banner-search-input :deep(.el-input__wrapper),
    .banner-search-input .el-input__wrapper {
        height: 38px;
        border-radius: 999px;
        padding: 0 14px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
        transition: box-shadow 0.2s ease;
    }
    .banner-search-input :deep(.el-input__wrapper.is-focus),
    .banner-search-input .el-input__wrapper.is-focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 2px 12px rgba(0, 0, 0, 0.18);
    }
    .banner-search-input :deep(.el-input__prefix),
    .banner-search-input .el-input__prefix {
        color: var(--primary, #5b6cff);
    }
    .banner-search-input :deep(.el-input__inner),
    .banner-search-input .el-input__inner {
        height: 38px;
        font-size: 13px;
        color: #2c3140;
    }
    .banner-search-btn {
        flex: 0 0 auto;
        width: auto;
        padding: 0 18px;
        height: 38px;
        font-size: 13px;
        border-radius: 999px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    }
    .banner-stats {
        gap: 10px;
    }
    .stat-number {
        font-size: 17px;
    }
    .stat-label {
        font-size: 10px;
    }
    .stat-divider {
        height: 26px;
    }
    .banner-actions {
        flex-direction: column;
        gap: 8px;
    }
    .banner-actions .el-button {
        width: 100%;
        padding: 0 12px;
        height: 36px;
        font-size: 13px;
    }
    .home-col {
        padding: 12px 12px 4px;
    }
    .home-item {
        padding: 10px 2px;
        gap: 8px;
    }
    .home-item-title {
        font-size: 13px;
    }
    .home-item-desc {
        font-size: 11.5px;
    }
    .home-rank {
        flex-basis: 18px;
        height: 18px;
        line-height: 18px;
    }
    .footer {
        padding: 16px 12px;
        font-size: 12px;
    }
    .detail-usage-section,
    .detail-download-section {
        padding: 14px;
    }
    .res-detail-head h1,
    .resource-page .res-detail-head h1 {
        font-size: 22px;
    }
    /* 弹窗在超小屏占满宽度，避免内容被挤 */
    .el-dialog {
        width: 92% !important;
    }
    .auth-form {
        padding: 22px 18px 24px;
    }
    .auth-header {
        padding: 24px 18px;
    }
}
