/* ═══════════════════════════════════════════════════════════
   技能市场（Skills Market）
   配色规范：
     - 白色/浅色背景 → 文字 #4A3A6B（紫色）
     - 紫色背景 #4A3A6B → 文字 #FFFFFF（白色）
     - 金色背景 #D4AF37 → 文字 #4A3A6B（紫色）
   ═══════════════════════════════════════════════════════════ */

.sk-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 64px;
    color: #4A3A6B;
}

/* ── Hero 区（紫色背景，白字）── */
.sk-hero {
    background: #4A3A6B;
    border-radius: 12px;
    padding: 42px 40px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(74, 58, 107, 0.25);
}
.sk-hero-inner { position: relative; z-index: 1; }
.sk-eyebrow {
    margin: 0 0 8px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #D4AF37;
    font-weight: 600;
}
.sk-hero h1 {
    margin: 0 0 10px;
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFFFFF;
}
/* 覆盖 academic_style.css 的全局标题紫色 !important 规则 */
body .site-shell .sk-hero h1 {
    color: #FFFFFF !important;
}
.sk-subtitle {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
}
.sk-hero-stats {
    margin-top: 14px;
}
.sk-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    padding: 5px 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}
.sk-stat-pill strong {
    color: #D4AF37;
    font-size: 16px;
    font-weight: 800;
}
.sk-hero-actions {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── 工具条：分类 / 搜索 / 排序 ── */
.sk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
}
.sk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-chip {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid #D8CCE8;
    background: #FFFFFF;
    color: #4A3A6B;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.sk-chip:hover {
    border-color: #D4AF37;
    color: #4A3A6B;
    background: #FAF9FC;
}
/* 选中的分类标签：金色背景 + 深紫色文字 */
.sk-chip.active {
    background: #D4AF37;
    border-color: #D4AF37;
    color: #4A3A6B;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

/* 搜索 + 排序区域 */
.sk-search-sort {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}
.sk-search-box {
    display: flex;
    align-items: center;
    border: 1.5px solid #D8CCE8;
    border-radius: 10px;
    overflow: hidden;
    background: #FFFFFF;
    transition: border-color 0.2s;
}
.sk-search-box:focus-within {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}
.sk-search-box input {
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 13px;
    color: #4A3A6B;
    background: transparent;
    width: 220px;
    font-family: inherit;
}
.sk-search-box input::placeholder { color: #4A3A6B; opacity: 0.62; }
.sk-search-btn {
    border: none;
    background: #4A3A6B;
    color: #FFFFFF;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.sk-search-btn:hover { background: #3D2E5C; }

select.sk-select {
    padding: 8px 12px;
    border: 1.5px solid #D8CCE8;
    border-radius: 10px;
    color: #4A3A6B;
    font-size: 13px;
    font-weight: 600;
    background: #FFFFFF;
    font-family: inherit;
    cursor: pointer;
}
select.sk-select:focus {
    outline: none;
    border-color: #D4AF37;
}

/* ── 技能卡片网格 ── */
.sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
@media (min-width: 1100px) {
    .sk-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .sk-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .sk-grid { grid-template-columns: 1fr; }
}

.sk-card {
    background: #FFFFFF;
    border: 2px solid #EDE7F6;
    border-radius: 8px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: #4A3A6B;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    cursor: pointer;
}
.sk-card:hover {
    transform: translateY(-4px);
    border-color: #D4AF37;
    box-shadow: 0 12px 28px rgba(74, 58, 107, 0.16);
}
.sk-card:focus-visible {
    outline: 3px solid #D4AF37;
    outline-offset: 3px;
}

/* 卡片图标 */
.sk-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #F7F4FC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
}
.sk-emoji { display: block; }

.sk-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.sk-card-name {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: #4A3A6B;
    flex: 1;
    line-height: 1.4;
}
.sk-card-name a { color: inherit; text-decoration: none; }
.sk-card-name a:hover { color: #3D2E5C; }

/* 分类标签 */
.sk-cat-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: #F0EDF5;
    color: #4A3A6B;
    border: 1px solid #E0D9EB;
}
.sk-cat-review,
.sk-cat-novelty,
.sk-cat-typesetting,
.sk-cat-research { background: #F0EDF5; color: #4A3A6B; border-color: #D8CCE8; }
.sk-cat-writing,
.sk-cat-analysis,
.sk-cat-academic,
.sk-cat-other { background: #F0EDF5; color: #4A3A6B; border-color: #D8CCE8; }

.sk-card-desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #4A3A6B;
    flex: 1;
}
.sk-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #4A3A6B;
}
.sk-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sk-card-meta strong {
    color: #4A3A6B;
    font-weight: 700;
}
.sk-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.sk-badge-platform { background: #D4AF37; color: #4A3A6B; border: 1px solid #D4AF37; }
.sk-badge-community { background: #F0EDF5; color: #4A3A6B; border: 1px solid #D8CCE8; }
.sk-badge-approved { background: #4A3A6B; color: #FFFFFF; border: 1px solid #4A3A6B; }
.sk-badge-pending { background: #D4AF37; color: #4A3A6B; border: 1px solid #D4AF37; }
.sk-badge-rejected { background: #F0EDF5; color: #4A3A6B; border: 1px solid #D8CCE8; }

.sk-scenarios {
    margin: 0;
    font-size: 0.85rem;
    color: #4A3A6B;
    line-height: 1.5;
}
.sk-scenarios strong { color: #D4AF37; font-weight: 700; }
.sk-tool-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    background: #F0EDF5;
    color: #4A3A6B;
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    width: fit-content;
}
.sk-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px dashed #EDE7F6;
    font-size: 12px;
    color: #4A3A6B;
}
.sk-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.sk-stats span { display: inline-flex; align-items: center; gap: 3px; }
.sk-stats strong { color: #4A3A6B; }
.sk-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

/* ── 按钮 ── */
.sk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s;
}
.sk-btn-primary { background: #4A3A6B; color: #FFFFFF; }
.sk-btn-primary:hover { background: #3D2E5C; transform: translateY(-1px); }
.sk-btn-gold { background: #D4AF37; color: #4A3A6B; }
.sk-btn-gold:hover { background: #E8C84E; transform: translateY(-1px); }
.sk-btn-outline {
    background: #FFFFFF;
    color: #4A3A6B;
    border: 1.5px solid #4A3A6B;
}
.sk-btn-outline:hover { background: #F0EDF5; }
.sk-btn-installed {
    cursor: default;
    opacity: 0.78;
}
.sk-btn-danger {
    background: #FFFFFF;
    color: #4A3A6B;
    border: 1.5px solid #4A3A6B;
}
.sk-btn-danger:hover { background: #F0EDF5; }
.sk-btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 8px; }

/* ── 空状态 ── */
.sk-empty {
    text-align: center;
    padding: 60px 20px;
    color: #4A3A6B;
    border: 2px dashed #D8CCE8;
    border-radius: 8px;
    background: #FBF9FE;
}
.sk-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}
.sk-empty h3 { color: #4A3A6B; margin: 0 0 8px; }
.sk-empty p { margin: 0 0 20px; font-size: 14px; }

/* ── 骨架屏加载 ── */
.sk-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
@media (min-width: 1100px) {
    .sk-skeleton-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) and (max-width: 1099px) {
    .sk-skeleton-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .sk-skeleton-grid { grid-template-columns: 1fr; }
}
.sk-skeleton-card {
    background: #FFFFFF;
    border: 2px solid #EDE7F6;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sk-skel-line {
    border-radius: 6px;
    background: linear-gradient(90deg, #F0EDF5 25%, #E8E0F4 50%, #F0EDF5 75%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.5s infinite;
}
.sk-skel-icon { width: 44px; height: 44px; border-radius: 12px; }
.sk-skel-title { width: 60%; height: 18px; }
.sk-skel-text { width: 100%; height: 14px; }
.sk-skel-text.short { width: 70%; }
.sk-skel-foot { width: 100%; height: 14px; margin-top: 6px; }
@keyframes skel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── 详情页 ── */
.sk-detail { display: grid; gap: 24px; max-width: 860px; margin: 0 auto; }
.sk-detail-card {
    background: #FFFFFF;
    border: 2px solid #EDE7F6;
    border-radius: 8px;
    padding: 28px;
}
.sk-detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.sk-detail-head h1 { margin: 8px 0 6px; font-size: 1.6rem; font-weight: 800; color: #4A3A6B; }
.sk-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: #4A3A6B; margin-bottom: 14px; }
.sk-detail-meta span { display: inline-flex; align-items: center; gap: 4px; }
.sk-detail-meta strong { color: #4A3A6B; }
.sk-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #4A3A6B;
    margin: 22px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #D4AF37;
    display: inline-block;
}
.sk-instruction {
    background: #F7F4FC;
    border: 1.5px solid #EDE7F6;
    border-radius: 8px;
    padding: 18px 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4A3A6B;
    white-space: pre-wrap;
}
.sk-detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sk-note { font-size: 13px; color: #4A3A6B; margin-top: 12px; }
.sk-review-empty {
    background: #FBF9FE;
    border: 1.5px dashed #D8CCE8;
    border-radius: 8px;
    padding: 16px 18px;
    color: #4A3A6B;
}
.sk-review-empty strong {
    display: block;
    margin-bottom: 5px;
}
.sk-review-empty p {
    margin: 0;
    color: #4A3A6B;
    font-size: 13px;
    line-height: 1.6;
}

/* ── 详情页图标 ── */
.sk-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #F7F4FC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    line-height: 1;
}

/* ── 我的技能 / 表单页 ── */
.sk-section-block { margin-top: 32px; }
.sk-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sk-section-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; color: #4A3A6B; }
.sk-form {
    background: #FFFFFF;
    border: 2px solid #EDE7F6;
    border-radius: 8px;
    padding: 28px;
    max-width: 780px;
}
.sk-form .form-group { margin-bottom: 18px; }
.sk-form label { display: block; margin-bottom: 6px; color: #4A3A6B; font-size: 14px; font-weight: 700; }
.sk-form input[type="text"],
.sk-form input[type="file"],
.sk-form textarea,
.sk-form select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #D8CCE8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #4A3A6B;
    box-sizing: border-box;
    background: #FFFFFF;
}
.sk-form input:focus,
.sk-form textarea:focus,
.sk-form select:focus { outline: none; border-color: #D4AF37; box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15); }
.sk-form textarea { min-height: 120px; resize: vertical; }
.sk-form .help { font-size: 12px; color: #4A3A6B; margin-top: 4px; }
.sk-form .checkbox-row { display: flex; align-items: center; gap: 8px; }
.sk-form .checkbox-row input { width: auto; }
.sk-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4A3A6B;
    font-weight: 600;
}
.sk-checkbox input { width: auto; }
.sk-error {
    background: #F7F4FC;
    border: 1px solid #D4AF37;
    color: #4A3A6B;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}
.sk-file-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sk-form-actions { display: flex; gap: 12px; margin-top: 20px; }

/* ── 提示条 ── */
.sk-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}
.sk-alert-success,
.sk-alert-info,
.sk-alert-error { background: #F7F4FC; border: 1px solid #D4AF37; color: #4A3A6B; }

/* ── 响应式 ── */
@media (max-width: 768px) {
    .sk-grid { grid-template-columns: 1fr; }
    .sk-skeleton-grid { grid-template-columns: 1fr; }
    .sk-hero { padding: 32px 22px; }
    .sk-hero h1 { font-size: 1.6rem; }
    .sk-toolbar { flex-direction: column; align-items: stretch; }
    .sk-search-sort { margin-left: 0; flex-direction: column; }
    .sk-search-box input { width: 100%; }
    .sk-search-box { width: 100%; }
    .sk-detail-actions { flex-direction: column; }
    .sk-btn { width: 100%; justify-content: center; }
    .sk-btn-sm { width: auto; }
}
