/* Route-specific Firefly styles: article */


.article-content {
    margin-top: 30px;
}


.article-content h2,
.article-content h3 {
    line-height: 1.35;
    margin-top: 2em;
}


.article-content p {
    margin: 1em 0;
}


.article-content blockquote {
    margin: 1.5em 0;
    padding: 1px 18px;
    border-left: 4px solid var(--primary);
    background: color-mix(in oklch, var(--primary) 9%, transparent);
    border-radius: 0 12px 12px 0;
}


.article-content :not(pre) > code {
    padding: 0.12em 0.38em;
    border: 1px solid color-mix(in oklch, var(--primary) 18%, transparent);
    border-radius: 6px;
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    color: color-mix(in oklch, var(--primary) 78%, var(--text));
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}


.article-content pre {
    position: relative;
    margin: 1.6em 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #151922;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(15, 23, 42, 0.16);
    color: #d7dde8;
    line-height: 1.72;
}


.article-content pre::before { display: none; }


.article-content pre .code-toolbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 38px;
    padding: 0 12px 0 58px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);
}


.article-content pre .code-toolbar::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 18px 0 #ffbd2e, 36px 0 #28c840;
}


.article-content pre .code-language,
.article-content pre .code-copy-button {
    color: rgba(226, 232, 240, 0.44) !important;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}


.article-content pre .code-language { margin-right: 12px; }


.article-content pre .code-copy-button {
    width: 54px;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}


.article-content pre .code-copy-button:hover,
.article-content pre .code-copy-button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(226, 232, 240, 0.44) !important;
}


.article-content pre .code-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 18px 20px;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
    scrollbar-width: thin;
}


.article-content pre code {
    display: block;
    min-width: max-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92rem;
    line-height: inherit;
    white-space: pre;
}


.article-content pre .str,
.article-content pre .atv,
.article-content pre .token.string,
.article-content pre .token.attr-value {
    color: #9be28f;
}


.article-content pre .kwd,
.article-content pre .tag,
.article-content pre .token.keyword,
.article-content pre .token.tag {
    color: #ff7ab6;
}


.article-content pre .com,
.article-content pre .token.comment,
.article-content pre .token.prolog,
.article-content pre .token.doctype {
    color: #7f8da6;
    font-style: italic;
}


.article-content pre .typ,
.article-content pre .atn,
.article-content pre .token.class-name,
.article-content pre .token.attr-name,
.article-content pre .token.selector {
    color: #7dd3fc;
}


.article-content pre .lit,
.article-content pre .dec,
.article-content pre .token.number,
.article-content pre .token.boolean,
.article-content pre .token.constant {
    color: #ffd166;
}


.article-content pre .pun,
.article-content pre .opn,
.article-content pre .clo,
.article-content pre .token.punctuation,
.article-content pre .token.operator {
    color: #c8d3e5;
}


.article-content pre .pln,
.article-content pre .token.function,
.article-content pre .token.property {
    color: #d7dde8;
}


.article-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}


.article-content th,
.article-content td {
    border: 1px solid var(--line);
    padding: 9px 11px;
}


/* Prompt cards for image-generation references. */
.article-content .prompt-card {
    --prompt-card-bg: #fff;
    --prompt-card-text: #171717;
    --prompt-card-muted: #666;
    --prompt-card-tag: #f2f2f2;
    display: block;
    max-width: 780px;
    margin: 36px auto;
    overflow: hidden;
    border: 1px solid rgba(30, 30, 30, 0.06);
    border-radius: 28px;
    background: var(--prompt-card-bg);
    box-shadow: 0 12px 28px rgba(30, 30, 30, 0.10), 0 2px 7px rgba(30, 30, 30, 0.05);
}


.article-content .prompt-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 0;
    border: 0;
    border-radius: 0;
}


.article-content .prompt-card-body {
    padding: 28px 32px 30px;
}


.article-content .prompt-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    margin: 0;
}


.article-content .prompt-card-title {
    min-width: 0;
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--prompt-card-text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}


.article-content .prompt-card-date {
    flex: 0 0 auto;
    color: #666;
    font-size: .92rem;
    line-height: 1.8;
    white-space: nowrap;
}


.article-content .prompt-card-description,
.article-content .prompt-card-prompt {
    margin: 18px 0 20px;
    color: var(--prompt-card-muted);
    font-size: 1rem;
    line-height: 1.75;
}


.article-content .prompt-card-prompt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}


.article-content .prompt-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}


.article-content .prompt-card-tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--prompt-card-tag);
    color: #333;
    font-size: .8rem;
    line-height: 1;
}


.article-content .prompt-card-actions {
    display: flex;
    align-items: center;
    margin-top: 22px;
}


.article-content .prompt-card-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d9d9df;
    border-radius: 9px;
    background: #fff;
    color: var(--prompt-card-text);
    font: inherit;
    font-size: .92rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(30, 30, 30, .05);
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}


.article-content .prompt-card-copy:hover,
.article-content .prompt-card-copy:focus-visible,
.article-content .prompt-card-copy[data-copied="true"] {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 7%, #fff);
    color: var(--primary);
}




/* Responsive prompt-card gallery. */
.article-content .prompt-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    box-sizing: border-box;
    margin: 36px auto;
}


.article-content .prompt-card-grid .prompt-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    border-radius: 22px;
}


.article-content .prompt-card-grid .prompt-card-image {
    max-width: 100%;
}


.article-content .prompt-card-grid .prompt-card-body {
    min-width: 0;
    padding: 20px 22px 22px;
}


.article-content .prompt-card-grid .prompt-card-title {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}


.article-content .prompt-card-grid .prompt-card-date {
    font-size: .78rem;
}


.article-content .prompt-card-grid .prompt-card-description,
.article-content .prompt-card-grid .prompt-card-prompt {
    margin: 13px 0 15px;
    font-size: .9rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
}


.article-content .prompt-card-grid .prompt-card-tags {
    margin-top: 14px;
}


.article-content .prompt-card-grid .prompt-card-actions {
    margin-top: 16px;
}


/* 文章内媒体自适应，避免视频超出正文中间列。 */
.article-content video,
.article-content iframe,
.article-content embed,
.article-content object {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(78vh, 720px);
    margin: 1.5em auto;
    box-sizing: border-box;
}


.article-content video {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}


.article-content iframe {
    aspect-ratio: 16 / 9;
    min-height: 240px;
    border: 0;
    border-radius: 12px;
}


.article-content embed,
.article-content object {
    min-height: 240px;
}




/* 提示词卡片多列：网格容器自带底色并内缩，卡片透明 —— 卡片与缝隙处于同一层背景，颜色完全一致 */
.article-content .prompt-card-grid {
    background: var(--card-bg, rgba(255, 255, 255, 0.76));
    padding: 16px;
    border-radius: 24px;
    gap: 16px;
}

.article-content .prompt-card-grid .prompt-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--line, rgba(32, 38, 48, 0.09));
    box-shadow: 0 6px 18px rgba(30, 30, 30, 0.05);
    margin: 0;
}

/* 小屏：去掉卡片格的容器内边距，让提示词卡片占满正文宽度 */
@media (max-width: 680px) {
    .article-content .prompt-card-grid {
        padding: 0;
        gap: 12px;
        border-radius: 0;
        background: transparent;
    }

    .article-content .prompt-card-grid .prompt-card {
        border-radius: 18px;
    }
}
