/*
 * 插件中心前台样式（plugins/index.blade.php、plugins/show.blade.php，布局 layouts/site.blade.php）。
 * 企业级极简：浅色白底、扁平、0–4px 圆角、极轻阴影或 1px 边框、单一品牌蓝 + 中性灰阶；
 * 不使用渐变、毛玻璃、发光与深色主题。设计令牌复用 resources/css/app.css 的 :root 变量。类名统一以 pc- 为前缀。
 * 断点：>=1200 桌面（4 列）/ 1024–1199 窄桌面（3 列）/ 768–1023 iPad（2 列）/ <=767 手机（1 列）。
 */

/* ==================== 通用 ==================== */

.pc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--subtle);
    font-size: 13px;
}

.pc-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.pc-breadcrumb a:hover {
    color: var(--brand-strong);
}

.pc-breadcrumb [aria-current] {
    color: var(--text);
    overflow-wrap: anywhere;
}

.pc-alert {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: 2px;
    background: var(--card);
    font-size: 13px;
    line-height: 1.6;
}

.pc-alert-success {
    border-left-color: var(--success);
    background: var(--success-soft);
    color: var(--success);
}

.pc-alert-danger {
    border-left-color: var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
}

.pc-tag {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--page);
    color: var(--muted);
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

.pc-tag-brand {
    border-color: #bfdbfe;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.pc-tag-success {
    border-color: #bbf7d0;
    background: var(--success-soft);
    color: var(--success);
}

.pc-price {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pc-price.is-paid {
    color: var(--warning);
}

.pc-price.is-free {
    color: var(--success);
}

.pc-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.pc-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-icon-kyc {
    background: var(--success-soft);
    color: var(--success);
}

.pc-icon-other {
    background: var(--page);
    color: var(--muted);
}

.pc-icon-lg {
    width: 80px;
    height: 80px;
}

/* ==================== 列表页首屏 ==================== */

.pc-hero {
    border-bottom: 1px solid var(--border);
    background: #f5f8ff;
}

.pc-hero-inner {
    padding-top: 28px;
    padding-bottom: 28px;
}

.pc-hero-title {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.pc-hero-desc {
    max-width: 720px;
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.pc-search {
    display: flex;
    max-width: 640px;
    gap: 8px;
}

.pc-search-field {
    position: relative;
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    color: var(--subtle);
}

.pc-search-field svg {
    position: absolute;
    left: 12px;
    pointer-events: none;
}

.pc-search-field input {
    width: 100%;
    min-height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    outline: 0;
    background: var(--card);
    color: var(--text);
    font-size: 14px;
}

.pc-search-field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-soft);
}

.pc-search-button {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 20px;
}

.pc-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.pc-hero-stats li {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: var(--subtle);
    font-size: 13px;
}

.pc-hero-stats strong {
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ==================== 列表工具条 ==================== */

.pc-body {
    padding: 24px 0 48px;
    background: var(--card);
}

.pc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.pc-tabs {
    display: flex;
    min-width: 0;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pc-tabs::-webkit-scrollbar {
    display: none;
}

.pc-tab {
    position: relative;
    display: inline-flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.pc-tab:hover {
    color: var(--brand-strong);
}

.pc-tab[aria-current='page'] {
    color: var(--brand-strong);
    font-weight: 600;
}

.pc-tab[aria-current='page']::after {
    position: absolute;
    right: 14px;
    bottom: -1px;
    left: 14px;
    height: 2px;
    background: var(--brand);
    content: '';
}

.pc-tab-count {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.pc-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
}

.pc-segment {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
}

.pc-segment-item {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 14px;
    background: var(--card);
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.pc-segment-item + .pc-segment-item {
    border-left: 1px solid var(--border-strong);
}

.pc-segment-item:hover {
    color: var(--brand-strong);
}

.pc-segment-item.is-active {
    background: var(--brand);
    color: #fff;
}

.pc-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.pc-sort select {
    min-height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background-color: var(--card);
    color: var(--text);
    font-size: 13px;
}

.pc-sort select:focus {
    border-color: var(--brand);
    outline: 0;
}

.pc-sort-submit {
    min-height: 32px;
    padding: 0 12px;
}

/* 启用脚本后改为选择即生效，隐藏「应用」按钮 */
.pc-js .pc-sort-submit {
    display: none;
}

.pc-result-note {
    margin: -8px 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.pc-result-note a {
    margin-left: 8px;
    color: var(--brand-strong);
}

/* ==================== 插件卡片 ==================== */

.pc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pc-card {
    min-width: 0;
}

.pc-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.pc-card-link:hover {
    border-color: var(--brand);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.pc-card-link:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.pc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pc-card-title {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.pc-card-title strong {
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pc-card-summary {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.pc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--subtle);
    font-size: 12px;
}

.pc-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.pc-card-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--brand-strong);
    font-size: 13px;
}

.pc-pagination {
    margin-top: 24px;
}

.pc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 56px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: 4px;
    color: var(--muted);
    text-align: center;
}

.pc-empty-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.pc-empty strong {
    color: var(--text);
    font-size: 15px;
}

.pc-empty p {
    margin: 0 0 8px;
    font-size: 13px;
}

/* ==================== 详情页 ==================== */

.pc-detail-head {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    background: #f5f8ff;
}

.pc-detail-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 300px;
    align-items: start;
    gap: 20px;
}

.pc-detail-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pc-detail-summary {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.pc-buy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.pc-buy-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.pc-buy-price > span {
    color: var(--subtle);
    font-size: 13px;
}

.pc-buy-price .pc-price {
    font-size: 24px;
}

.pc-buy-price small {
    flex-basis: 100%;
    color: var(--subtle);
    font-size: 12px;
}

.pc-buy-form {
    margin: 0;
}

.pc-buy-button {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    gap: 6px;
}

.pc-buy-button[disabled] {
    cursor: not-allowed;
    opacity: .55;
}

.pc-buy-note {
    color: var(--subtle);
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.pc-buy-note a {
    color: var(--brand-strong);
}

.pc-detail-body {
    background: var(--page);
}

.pc-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 20px;
}

.pc-detail-content,
.pc-detail-side {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.pc-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card);
}

.pc-panel-title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
}

.pc-meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.pc-meta-list > div {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px;
    font-size: 13px;
}

.pc-meta-list dt {
    color: var(--subtle);
}

.pc-meta-list dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.pc-meta-hash code {
    color: var(--muted);
    font-size: 11px;
    word-break: break-all;
}

.pc-help-links {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pc-help-links a {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border-radius: 2px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.pc-help-links a:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.pc-related {
    margin-top: 32px;
}

.pc-section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
}

/* 插件介绍 / 更新日志正文（Markdown 渲染，原始 HTML 已剥离） */
.pc-prose {
    color: var(--text);
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.pc-prose > :first-child {
    margin-top: 0;
}

.pc-prose > :last-child {
    margin-bottom: 0;
}

.pc-prose h1,
.pc-prose h2,
.pc-prose h3,
.pc-prose h4 {
    margin: 20px 0 10px;
    font-weight: 600;
    line-height: 1.4;
}

.pc-prose h1 { font-size: 20px; }
.pc-prose h2 { font-size: 18px; }
.pc-prose h3 { font-size: 16px; }
.pc-prose h4 { font-size: 14px; }

.pc-prose p,
.pc-prose ul,
.pc-prose ol,
.pc-prose blockquote,
.pc-prose pre,
.pc-prose table {
    margin: 0 0 12px;
}

.pc-prose ul,
.pc-prose ol {
    padding-left: 22px;
}

.pc-prose a {
    color: var(--brand-strong);
}

.pc-prose code {
    padding: 1px 4px;
    border-radius: 2px;
    background: var(--page);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.pc-prose pre {
    overflow-x: auto;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--page);
}

.pc-prose pre code {
    padding: 0;
    background: transparent;
}

.pc-prose blockquote {
    padding: 8px 14px;
    border-left: 3px solid var(--border-strong);
    background: var(--page);
    color: var(--muted);
}

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

.pc-prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.pc-prose th,
.pc-prose td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

/* ==================== 窄桌面 ==================== */

@media (max-width: 1199px) {
    .pc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==================== iPad ==================== */

@media (max-width: 1023px) {
    .pc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pc-detail-main {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .pc-buy {
        grid-column: 1 / -1;
    }

    .pc-detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pc-detail-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .pc-toolbar-right {
        width: 100%;
        justify-content: space-between;
        padding-top: 4px;
    }
}

/* ==================== 手机 ==================== */

@media (max-width: 767px) {
    .pc-hero-inner {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .pc-hero-title {
        font-size: 22px;
    }

    .pc-hero-desc {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .pc-hero-stats {
        gap: 6px 16px;
    }

    .pc-hero-stats strong {
        font-size: 16px;
    }

    .pc-search-button {
        padding: 0 14px;
    }

    .pc-body {
        padding: 16px 0 32px;
    }

    .pc-toolbar {
        margin-bottom: 16px;
    }

    .pc-tab {
        padding: 0 10px;
    }

    .pc-tab[aria-current='page']::after {
        right: 10px;
        left: 10px;
    }

    .pc-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .pc-card-summary {
        min-height: 0;
    }

    .pc-detail-head {
        padding: 16px 0;
    }

    .pc-detail-main {
        gap: 14px;
    }

    .pc-icon-lg {
        width: 56px;
        height: 56px;
    }

    .pc-detail-title {
        font-size: 20px;
    }

    .pc-detail-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .pc-panel {
        padding: 16px;
    }

    .pc-buy-button {
        min-height: 44px;
    }
}

@media (pointer: coarse) {
    .pc-segment-item,
    .pc-sort select,
    .pc-sort-submit {
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-card-link {
        transition: none;
    }
}
