@import url('./parts/image-cropper.css');

/* Specific Styles for Showcase Page */
.showcase-hero {
    padding: 112px 0 44px;
    text-align: center;
    max-width: 940px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase-hero-title {
    font-size: clamp(2.9rem, 4.8vw, 4.4rem);
    margin-bottom: 18px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
    max-width: 24ch;
}

.showcase-hero-accent {
    color: var(--accent-color);
}

.showcase-hero-copy {
    font-size: clamp(1.08rem, 1.45vw, 1.38rem);
    line-height: 1.5;
    margin: 0 auto 30px;
    max-width: 50ch;
    text-wrap: balance;
    color: var(--text-secondary);
}

.showcase-hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.showcase-search-trigger {
    width: 52px;
    min-width: 52px;
    height: 52px;
    padding: 0;
    margin-left: -6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
    box-shadow: none;
}

.showcase-search-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.showcase-search-trigger svg {
    width: 20px;
    height: 20px;
}

.showcase-hero-actions--limited {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.showcase-hero-actions--pending {
    min-height: 48px;
}

.showcase-share-limit-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
}

.showcase-hero-limit-note {
    margin: 0;
    max-width: 44ch;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.55;
    text-align: center;
}

.showcase-grid-section {
    padding: 12px 0 80px;
}

.showcase-feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 8px;
}

.showcase-feed-main {
    min-width: 0;
}

.showcase-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: none;
    margin: 0;
    padding: 0;
}

.showcase-trending {
    min-width: 0;
}

.showcase-trending__title {
    margin: 0 0 18px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.showcase-trending__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showcase-trending__empty {
    margin: 0;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.45;
}

.showcase-trending__item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    padding: 12px 8px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: background-color 160ms ease;
}

.showcase-trending__item:hover,
.showcase-trending__item:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.showcase-trending__logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.showcase-trending__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.showcase-trending__name {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.25;
}

.showcase-trending__desc {
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-trending__meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 550;
}

.showcase-trending__meta svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    fill: currentColor;
    opacity: 0.9;
}

.showcase-trending__meta-count {
    opacity: 0.85;
}

.showcase-list-empty {
    padding: 60px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.showcase-list-empty p:first-child {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.showcase-list-empty p:last-child {
    margin: 0;
    font-size: 0.92rem;
}

.showcase-list-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.showcase-list-row:hover,
.showcase-list-row:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.showcase-list-row__logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    align-self: center;
}

.showcase-list-row__body {
    min-width: 0;
    padding-top: 0;
}

.showcase-list-row__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.25;
}

.showcase-list-row__rank {
    color: var(--text-secondary);
    font-weight: 600;
}

.showcase-list-row__desc {
    margin: 4px 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-list-row__meta {
    display: inline-block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.showcase-list-row__actions {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 0;
}

.showcase-list-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    width: 64px;
    min-width: 64px;
    height: 64px;
    min-height: 64px;
    padding: 10px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
        color 160ms cubic-bezier(0.23, 1, 0.32, 1),
        transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.showcase-list-stat:hover {
    background: rgba(255, 255, 255, 0.12);
}

.showcase-list-stat:active {
    transform: scale(0.97);
}

.showcase-list-stat svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.showcase-list-stat--vote {
    color: var(--text-primary);
}

.showcase-list-stat--vote:hover {
    background: rgba(255, 255, 255, 0.12);
}

.showcase-list-stat--vote svg {
    color: inherit;
}

.showcase-list-stat--vote path {
    fill: none;
    stroke: currentColor;
}

.showcase-list-stat--vote.is-active {
    background: #1b813e;
    color: #fff;
}

.showcase-list-stat--vote.is-active svg {
    color: #fff;
}

.showcase-list-stat--vote.is-active path {
    fill: currentColor;
    stroke: currentColor;
}

.showcase-list-stat--vote:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}

.showcase-list-stat--vote [data-upvote-count] {
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: inherit;
}

.showcase-logo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.showcase-logo-preview img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.showcase-logo-remove {
    font-size: 0.8rem;
    padding: 6px 12px;
}

@media (max-width: 768px) {
    .showcase-feed-layout {
        padding: 0 4px;
        max-width: 100%;
    }

    .showcase-list-row {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        padding: 14px 4px;
        border-radius: 0;
    }

    .showcase-list-row__logo {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .showcase-list-row__title {
        font-size: 0.98rem;
    }

    .showcase-list-row__desc {
        font-size: 0.84rem;
        -webkit-line-clamp: 2;
        margin-top: 3px;
    }

    .showcase-list-row__meta {
        margin-top: 5px;
        font-size: 0.72rem;
    }

    .showcase-list-row__actions {
        grid-column: auto;
        justify-content: flex-end;
        margin-top: 0;
        padding-top: 0;
    }

    .showcase-list-stat:not(.showcase-list-stat--vote) {
        display: none;
    }

    .showcase-list-stat,
    .showcase-list-stat--vote {
        width: 60px;
        min-width: 60px;
        height: 60px;
        min-height: 60px;
        padding: 9px;
        border-radius: 18px;
        gap: 4px;
    }

    .showcase-list-stat svg,
    .showcase-list-stat--vote svg {
        width: 18px;
        height: 18px;
    }
}

.showcase-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 32px;
    overflow-y: auto;
}

.showcase-search-overlay[hidden] {
    display: none;
}

.showcase-search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 14, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.showcase-search-close {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(18, 22, 32, 0.88);
    color: rgba(245, 245, 247, 0.92);
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.showcase-search-close svg {
    width: 18px;
    height: 18px;
}

.showcase-search-close:hover {
    background: rgba(28, 34, 48, 0.96);
    border-color: rgba(255, 255, 255, 0.24);
}

.showcase-search-close:active {
    transform: scale(0.97);
}

.showcase-search-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    margin: 0 auto;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(16, 20, 30, 0.96);
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.showcase-search-row {
    margin: 0;
    padding: 16px 16px 0;
}

.showcase-search-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 10px 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.showcase-search-input-shell:focus-within {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.showcase-search-input-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    color: var(--text-secondary);
    pointer-events: none;
    flex-shrink: 0;
}

.showcase-search-input {
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: var(--font-sans);
    outline: none;
}

.showcase-search-input::placeholder {
    color: rgba(154, 168, 188, 0.78);
}

.showcase-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.showcase-search-submit svg {
    width: 18px;
    height: 18px;
}

.showcase-search-submit:hover {
    background: rgba(56, 189, 248, 0.26);
    color: #e0f2fe;
}

.showcase-search-submit:active {
    transform: scale(0.96);
}

.showcase-search-body {
    max-height: min(68vh, 560px);
    overflow-y: auto;
    padding: 18px 16px 20px;
}

.showcase-search-body::-webkit-scrollbar {
    width: 8px;
}

.showcase-search-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.showcase-search-browse {
    display: grid;
    gap: 22px;
}

.showcase-search-section-label {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(154, 168, 188, 0.9);
}

.showcase-search-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.showcase-search-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.86rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.showcase-search-pill:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.28);
}

.showcase-search-link {
    display: inline-flex;
    margin-top: 10px;
    color: #38bdf8;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.showcase-search-link:hover {
    color: #7dd3fc;
}

.showcase-search-category {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.showcase-search-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.showcase-search-category__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: var(--text-primary);
}

.showcase-search-category__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
}

.showcase-search-category__item {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.showcase-search-category__item:hover {
    color: #7dd3fc;
}

.showcase-search-results {
    display: grid;
    gap: 2px;
}

.showcase-search-results[hidden],
.showcase-search-browse[hidden] {
    display: none;
}

.showcase-search-result {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: background-color 160ms ease;
}

.showcase-search-result:hover {
    background: rgba(255, 255, 255, 0.05);
}

.showcase-search-result-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.showcase-search-result-title {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 650;
    color: var(--text-primary);
}

.showcase-search-result-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.45;
}

.showcase-search-empty {
    padding: 28px 8px;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.5;
    text-align: center;
}

.showcase-grid-loader {
    grid-column: 1 / -1;
    min-height: 228px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 34px 0;
    text-align: center;
}

.showcase-grid-loader .mx-loading-orbs-caption {
    font-size: 0.96rem;
    letter-spacing: -0.02em;
}

.auth-container {
    max-width: 420px;
    margin: 0 auto 60px;
    display: none;
}

.submit-container {
    max-width: 680px;
    margin: 0 auto 60px;
    display: none;
}

.showcase-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

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

.showcase-card .card-image-wrap {
    isolation: isolate;
}

.showcase-card .card-image-skeleton {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--bg-secondary);
    transition: opacity 0.22s ease;
}

.showcase-card .card-image-wrap img {
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.24s ease;
}

.showcase-card .card-image-wrap.is-ready .card-image-skeleton {
    opacity: 0;
}

.showcase-card .card-image-wrap.is-ready img {
  opacity: 1;
}

.showcase-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.showcase-card-actions .btn {
  width: 100%;
  height: 42px;
  min-height: 42px;
  justify-content: center;
  text-align: center;
  padding: 0 12px;
  line-height: 1;
  white-space: nowrap;
  font-size: 0.8rem;
}

.showcase-card-details-btn {
  background-color: #05070a;
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.showcase-card-details-btn:hover {
  background-color: #111217;
  opacity: 1;
}

.developer-badge {
    display: flex;
    align-items: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 16px;
}

.oauth-btn:hover {
    background-color: var(--bg-secondary);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 16px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: 0.25em;
}

.divider:not(:empty)::after {
    margin-left: 0.25em;
}

@media (max-width: 768px) {
    .showcase-hero {
        padding: 84px 0 28px;
    }

    .showcase-hero-title {
        font-size: clamp(2.55rem, 10.5vw, 3.25rem);
        margin-bottom: 12px;
        max-width: 18ch;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.15;
    }

    .showcase-hero-copy {
        font-size: 1.08rem;
        line-height: 1.5;
        margin-bottom: 24px;
        max-width: 42ch;
    }

    .showcase-hero-actions {
        gap: 12px;
    }

    .showcase-search-trigger {
        margin-left: 0;
        border-radius: 999px;
        border-left-color: rgba(255, 255, 255, 0.12);
        box-shadow: none;
    }

    .showcase-search-overlay {
        padding: 64px 12px 24px;
    }

    .showcase-search-close {
        top: 12px;
        left: 12px;
    }

    .showcase-search-category__grid {
        grid-template-columns: 1fr;
    }

    .showcase-hero-limit-note {
        font-size: 0.9rem;
        max-width: 34ch;
    }

    .showcase-grid-section {
        padding: 8px 0 64px;
    }

    .showcase-feed-layout {
        gap: 32px;
        padding: 0 4px;
    }

    .showcase-trending {
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .showcase-trending__title {
        margin-top: 8px;
    }
}

@media (min-width: 1024px) {
    .showcase-hero {
        padding: 124px 0 34px;
    }

    .showcase-hero-title {
        margin-bottom: 16px;
        max-width: 28ch;
    }

    .showcase-hero-copy {
        margin-bottom: 34px;
        max-width: 54ch;
    }

    .showcase-hero-actions .btn {
        min-width: 220px;
        padding: 13px 28px;
        border-radius: 999px;
    }

    .showcase-hero-actions .showcase-search-trigger {
        width: 52px;
        min-width: 52px;
        height: 52px;
        padding: 0;
        border-radius: 999px;
    }

    .showcase-grid-section {
        padding-top: 0;
    }

    .showcase-feed-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 36px;
        padding: 0 12px;
    }

    .showcase-trending {
        position: sticky;
        top: 96px;
    }
}

@media (max-width: 480px) {
    .showcase-hero {
        padding: 76px 0 24px;
    }

    .showcase-hero-title {
        font-size: clamp(2.25rem, 10vw, 2.75rem);
        max-width: 16ch;
        line-height: 1.15;
    }

    .showcase-hero-copy {
        font-size: 1rem;
        margin-bottom: 20px;
        max-width: 35ch;
        line-height: 1.5;
    }

    .showcase-grid-section {
        padding-top: 4px;
    }
}
