/* ══════════════════════════════════════════════════════════════
   showcase.css — AI Showcase section styles
   ══════════════════════════════════════════════════════════════ */

/* ── Page hero ─────────────────────────────────────────────── */
.sc-hero {
    padding: var(--space-12) 0 var(--space-8);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-8);
}

.sc-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.sc-hero-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-2);
}

.sc-hero-sub {
    color: var(--text-muted);
    font-size: var(--text-lg);
    max-width: 520px;
}

/* ── Toolbar (sort tabs + filters) ─────────────────────────── */
.sc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.sc-sort-tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3px;
}

.sc-sort-tab {
    padding: 6px 14px;
    border-radius: calc(var(--radius-md) - 3px);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-base);
    white-space: nowrap;
}

.sc-sort-tab:hover {
    color: var(--text);
}

.sc-sort-tab.active {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sc-filter-pills {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}

.sc-filter-pill {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: var(--transition-base);
    white-space: nowrap;
}

.sc-filter-pill:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.sc-filter-pill.active {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
}

/* ── Gallery grid ───────────────────────────────────────────── */
.sc-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    padding-bottom: var(--space-16);
}

/* ── Card ───────────────────────────────────────────────────── */
.sc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sc-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.sc-card--featured {
    grid-column: span 2;
}

.sc-card-img-wrap {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-2);
    position: relative;
}

.sc-card--featured .sc-card-img-wrap {
    aspect-ratio: 8 / 3;
}

.sc-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.sc-card:hover .sc-card-img-wrap img {
    transform: scale(1.05);
}

.sc-card-body {
    padding: var(--space-3) var(--space-4) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
}

.sc-card-title {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-card-title:hover {
    color: var(--accent-green);
}

.sc-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-faint);
    flex-wrap: wrap;
}

.sc-card-author {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.sc-card-author:hover {
    color: var(--text);
}

.sc-card-tool-badge {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: #a855f7;
    border-radius: var(--radius-full);
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.sc-card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}

.sc-card-comments {
    font-size: var(--text-xs);
    color: var(--text-faint);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.sc-card-comments:hover {
    color: var(--text-muted);
}

/* ── Spark button ───────────────────────────────────────────── */
.spark-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
    user-select: none;
    line-height: 1;
}

.spark-btn:hover:not(.sparked):not(.loading) {
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
    background: rgba(168, 85, 247, 0.06);
}

.spark-btn.sparked {
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
    cursor: default;
}

.spark-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

@keyframes spark-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.spark-btn.just-sparked {
    animation: spark-pop 0.35s ease forwards;
}

/* Detail page large spark button */
.spark-btn--lg {
    padding: 10px 22px;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
}

/* ── Empty state ────────────────────────────────────────────── */
.sc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-20) var(--space-8);
    color: var(--text-faint);
}

.sc-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

.sc-empty-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

/* ── Detail page ────────────────────────────────────────────── */
.sc-detail-hero {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: var(--surface);
    display: block;
    margin-bottom: var(--space-6);
}

.sc-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-8);
    align-items: start;
}

.sc-detail-sidebar {
    position: sticky;
    top: 90px;
}

.sc-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}

.sc-detail-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

/* Prompt reveal block */
.sc-prompt-reveal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
}

.sc-prompt-reveal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.sc-prompt-reveal-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sc-prompt-text {
    font-family: monospace;
    font-size: var(--text-sm);
    color: var(--text);
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Generation params collapsible */
.sc-gen-params {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    overflow: hidden;
}

.sc-gen-params summary {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
    list-style: none;
}

.sc-gen-params summary::-webkit-details-marker { display: none; }

.sc-gen-params[open] summary {
    border-bottom: 1px solid var(--border);
}

.sc-gen-params-body {
    padding: var(--space-4);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-3);
}

.sc-gen-param {
    font-size: var(--text-xs);
}

.sc-gen-param-key {
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
    margin-bottom: 2px;
}

.sc-gen-param-val {
    color: var(--text);
    font-family: monospace;
    word-break: break-all;
}

/* Report form */
.sc-report-form {
    margin-top: var(--space-3);
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.sc-report-trigger {
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: var(--text-xs);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sc-report-trigger:hover {
    color: var(--text-muted);
}

/* ── Submit page ────────────────────────────────────────────── */
.sc-submit-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-10) 0 var(--space-16);
}

.sc-submit-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sc-upload-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-upload-zone:hover,
.sc-upload-zone.drag-over {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.04);
}

.sc-upload-zone.has-image {
    border-style: solid;
    border-color: var(--border);
}

.sc-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.sc-upload-placeholder {
    text-align: center;
    padding: var(--space-8);
    pointer-events: none;
    color: var(--text-muted);
}

.sc-upload-preview {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-md);
}

.sc-params-details summary {
    list-style: none;
}

.sc-params-details summary::-webkit-details-marker { display: none; }

.sc-submit-success {
    text-align: center;
    padding: var(--space-16) var(--space-8);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .sc-gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .sc-gallery { grid-template-columns: repeat(2, 1fr); }
    .sc-detail-layout { grid-template-columns: 1fr; }
    .sc-detail-sidebar { position: static; }
    .sc-hero-title { font-size: var(--text-3xl); }
}

@media (max-width: 600px) {
    .sc-card--featured { grid-column: span 1; }
    .sc-card--featured .sc-card-img-wrap { aspect-ratio: 4 / 3; }
    .sc-toolbar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 440px) {
    .sc-gallery { grid-template-columns: 1fr; }
}

