/*
 * ChopSkills Front Page CSS
 * Theme: Dark Mode / Neon UI
 */

.cs-front-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #0d0d12;
    color: #e0e0e0;
    line-height: 1.6;
}

.cs-front-page * {
    box-sizing: border-box;
}

.cs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.cs-front-page h1, 
.cs-front-page h2, 
.cs-front-page h3 {
    color: #ffffff;
    margin-top: 0;
}

.cs-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
    text-align: center;
}

.cs-accent {
    background: linear-gradient(90deg, #ffca28, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.cs-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.cs-btn-primary {
    background-color: #ffca28;
    color: #111 !important;
    box-shadow: 0 4px 15px rgba(255, 202, 40, 0.3);
    display: inline-block !important;
    width: auto !important;
    max-width: 400px;
}

.cs-btn-primary:hover {
    background-color: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 202, 40, 0.4);
}

.cs-btn-premium {
    background: linear-gradient(135deg, #ffca28, #ff9800);
    color: #000 !important;
}

.cs-btn-premium:hover {
    background: linear-gradient(135deg, #ffb300, #f57c00);
    transform: translateY(-2px);
}

.cs-btn-text {
    color: #ffca28;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.cs-btn-text:hover {
    color: #fff;
}

/* Specific override for the Browse Gallery link on the homepage */
.cs-winner-gallery-footer .cs-btn-text {
    color: #ffffff;
}

.cs-winner-gallery-footer .cs-btn-text:hover {
    color: #ffca28;
}

/* Sections */
.cs-section {
    padding: 80px 0;
}

.cs-section-header-flex {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    text-align: center;
    gap: 10px;
}

.cs-section-header-flex .cs-section-title {
    margin-bottom: 0;
}

/* Hero */
.cs-hero {
    padding: 120px 20px;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a24 0%, #0d0d12 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cs-hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.cs-hero-subtitle {
    font-size: 1.25rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Compact logged-in hero — smaller vertical footprint */
.cs-hero--compact {
    padding: 56px 20px !important;
}

.cs-hero--compact .cs-hero-title {
    font-size: 2.8rem;
}

.cs-hero--compact .cs-hero-subtitle {
    font-size: 1rem;
    margin-bottom: 28px;
}

/* Social proof stats strip */
.cs-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 24px;
}

.cs-hero-stat {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.cs-hero-stat-divider {
    color: #334155;
    font-size: 0.75rem;
}

/* Guest join banner (replaces hero for non-logged-in visitors) */
.cs-guest-banner {
    background: rgba(255, 202, 40, 0.06);
    border-bottom: 1px solid rgba(255, 202, 40, 0.15);
    padding: 18px 20px;
}

.cs-guest-banner .cs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cs-guest-banner-text {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

.cs-guest-banner-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.cs-guest-banner-login {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.cs-guest-banner-login:hover {
    color: #f8fafc;
}

/* Community Pulse */
.cs-community-pulse {
    background-color: rgba(255, 202, 40, 0.1);
    border-top: 1px solid rgba(255, 202, 40, 0.2);
    border-bottom: 1px solid rgba(255, 202, 40, 0.2);
    padding: 15px 0;
}

.cs-community-pulse .cs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cs-pulse-icon {
    font-size: 1.2rem;
    animation: cs-pulse 2s infinite;
}

.cs-pulse-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffca28;
}

@keyframes cs-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Pro Card */
.cs-pro-card {
    background: linear-gradient(145deg, #16161e, #111116);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px 48px;
    display: block;
    position: relative;
    overflow: hidden;
}

.cs-pro-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 202, 40, 0.15) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.cs-pro-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.cs-pro-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    columns: 2;
    column-gap: 2rem;
}

.cs-pro-features li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.cs-pro-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffca28;
    font-weight: bold;
}

.cs-pro-features li strong {
    color: #fff;
}

/* --------------------------------------------------------------------------
   How It Works Steps
   -------------------------------------------------------------------------- */
.cs-hiw-section {
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.cs-hiw-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.cs-hiw-step {
    flex: 1;
    max-width: 200px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem 1rem 1rem;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cs-hiw-step:hover {
    transform: translateY(-4px);
    border-color: var(--cs-comp-glow-med, rgba(99, 102, 241, 0.3));
}

.cs-hiw-step-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--cs-comp-grad-start, #6366f1), var(--cs-comp-grad-end, #a855f7));
    color: var(--cs-comp-btn-text, #fff);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--cs-comp-glow-strong, rgba(99, 102, 241, 0.4));
}

.cs-hiw-step-icon {
    font-size: 2.25rem;
    display: block;
    margin-bottom: 0.75rem;
}

.cs-hiw-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: #f0f0f5 !important;
}

.cs-hiw-step-text {
    font-size: 0.78rem;
    color: #8888a0;
    margin: 0;
    line-height: 1.45;
}

.cs-hiw-arrow {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    padding-top: 1.5rem;
}

.cs-hiw-arrow svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   This Week's Challenge Spotlight
   -------------------------------------------------------------------------- */
.cs-spotlight-section {
    padding-top: 2rem;
    padding-bottom: 0 !important;
}

.cs-spotlight-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cs-spotlight-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.cs-spotlight-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

/* Featured image column — mirrors .cs-completed-thumb */
.cs-spotlight-thumb {
    width: auto;
    aspect-ratio: 1 / 1;
    min-width: 260px;
    flex-shrink: 0;
    align-self: stretch;
    background-size: cover;
    background-position: center;
    filter: brightness(0.85);
    border-radius: 0;
}

.cs-spotlight-thumb--empty {
    background: linear-gradient(135deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.08);
    font-size: 3rem;
}

.cs-spotlight-thumb--empty::after {
    content: '🎯';
    opacity: 0.25;
}

/* Inner content needs its own padding now that the card has no padding */
.cs-spotlight-body {
    flex: 1;
    padding: 2rem 2rem 2rem 2rem;
}

.cs-spotlight-actions {
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-spotlight-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0.75rem !important;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 0.725rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
}

/* Phase specific badge gradients */
.cs-spotlight-badge--submission_open {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}
.cs-spotlight-badge--voting_live {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
}
.cs-spotlight-badge--upcoming {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}
.cs-spotlight-badge--closed {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
}


.cs-spotlight-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: #f0f0f5 !important;
}

/* Sponsor branding on spotlight card */
.cs-spotlight-sponsor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #c8c8d8;
}
.cs-spotlight-sponsor-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.cs-spotlight-sponsor a {
    color: #a855f7;
    text-decoration: none;
    font-weight: 600;
}
.cs-spotlight-sponsor a:hover {
    text-decoration: underline;
}
.cs-spotlight-sponsor strong {
    color: #a855f7;
    font-weight: 600;
}

.cs-spotlight-desc {
    font-size: 0.95rem;
    color: #a0a0b8;
    margin: 0 0 1rem;
    line-height: 1.6;
    max-width: 600px;
}

.cs-spotlight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs-spotlight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
}

.cs-spotlight-chip--prize {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.25);
    white-space: normal;
    line-height: 1.4;
    display: inline-block; /* Override inline-flex for proper text wrapping */
    vertical-align: middle;
}

.cs-spotlight-chip--prize strong {
    font-weight: 700;
}

.cs-spotlight-chip--prize p {
    display: inline;
    margin: 0;
    padding: 0;
}

.cs-spotlight-chip--countdown {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.cs-spotlight-chip--entries {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.cs-spotlight-countdown-value {
    font-weight: 800;
}

.cs-spotlight-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cs-spotlight-cta {
    font-size: 1rem !important;
    padding: 0.9rem 2rem !important;
    border-radius: 12px !important;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cs-spotlight-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .cs-hero-title {
        font-size: 3rem;
    }
    .cs-section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .cs-pro-card {
        flex-direction: column;
        padding: 40px 20px;
    }
    .cs-hiw-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .cs-hiw-arrow {
        display: none;
    }
    .cs-hiw-step {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: none;
    }
    .cs-spotlight-card {
        flex-direction: column;
        text-align: center;
    }
    .cs-spotlight-thumb {
        width: 100%;
        min-height: 160px;
        border-radius: 0;
    }
    .cs-spotlight-body {
        padding: 1.5rem;
    }
    .cs-spotlight-actions {
        padding: 0 1.5rem 1.5rem;
        text-align: center;
    }
    .cs-spotlight-desc {
        max-width: none;
    }
    .cs-spotlight-meta {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cs-hero { padding-top: 60px !important; padding-bottom: 60px !important; }
    .cs-hero-title { font-size: 2rem; }
    .cs-hero-subtitle { font-size: 0.9rem; padding: 0 0.5rem; }
    .cs-btn-large { font-size: 0.95rem; padding: 0.85rem 1.75rem; }
    .cs-section-title { font-size: 1.5rem; }
    .cs-section { padding: 2rem 0.75rem; }
    .cs-pro-card { padding: 1.5rem 1rem; }
    .cs-pro-title { font-size: 1.5rem; }
    .cs-pro-features li { font-size: 0.9rem; }
    .cs-pro-card-image { width: 100%; height: 200px; }
    .cs-community-pulse { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    .cs-hiw-step {
        flex: 0 0 100%;
    }
    .cs-spotlight-thumb {
        min-height: 130px;
    }
    .cs-spotlight-body {
        padding: 1.25rem 1rem;
    }
    .cs-spotlight-actions {
        padding: 0 1rem 1.25rem;
    }
    .cs-spotlight-title {
        font-size: 1.35rem;
    }
    .cs-spotlight-cta {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Section Header — shared flex row (title + view-all link)
   ========================================================================== */
.cs-spotlight-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.cs-spotlight-section-header .cs-section-title {
    margin-bottom: 0;
}

.cs-section-view-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cs-accent, #3b82f6);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.cs-section-view-all:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* ==========================================================================
   Recently Completed — Section & Stack
   ========================================================================== */
.cs-completed-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.cs-completed-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ==========================================================================
   Completed Challenge Card
   ========================================================================== */
.cs-completed-card {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 0;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
}

.cs-completed-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

/* Mock variant — dashed border signals placeholder data */
.cs-completed-card--mock {
    border-style: dashed;
    opacity: 0.7;
}

.cs-completed-card--mock:hover {
    transform: none;
}

/* Thumbnail column */
.cs-completed-thumb {
    width: 100%;
    height: 100%;
    min-height: 130px;
    background-size: cover;
    background-position: center;
    filter: grayscale(0.35) brightness(0.85);
}

.cs-completed-thumb--empty {
    background: linear-gradient(135deg, var(--cs-bg-card) 0%, var(--cs-bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.12);
    font-size: 2.5rem;
}

.cs-completed-thumb--empty::after {
    content: '🏆';
    opacity: 0.25;
}

/* Body column */
.cs-completed-body {
    padding: 1.1rem 1.4rem;
    flex: 1;
}

.cs-completed-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.45rem;
}

.cs-completed-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.cs-completed-title a {
    color: inherit;
    text-decoration: none;
}

.cs-completed-title a:hover {
    color: var(--cs-accent, #3b82f6);
}

.cs-completed-date {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 0 0.65rem;
}

/* Podium row */
.cs-completed-podium {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    align-items: center;
}

.cs-podium-place {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
}

.cs-podium-first  { color: #fbbf24; }
.cs-podium-second { color: #94a3b8; }
.cs-podium-third  { color: #cd7c3f; }

.cs-podium-tbd {
    font-size: 0.78rem;
    color: #475569;
    font-style: italic;
}

/* CTA column */
.cs-completed-cta {
    padding: 1.1rem 1.4rem 1.1rem 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Outline button variant */
.cs-btn-outline {
    display: inline-flex;
    align-items: center;
    font-family: var(--cs-font, inherit);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.cs-btn-outline:hover {
    border-color: rgba(255,255,255,0.5);
    color: #f8fafc;
}

.cs-btn-disabled {
    pointer-events: none;
    opacity: 0.45;
    cursor: default;
}

/* Responsive — completed cards */
@media (max-width: 768px) {
    .cs-completed-card {
        grid-template-columns: 120px 1fr;
        grid-template-rows: auto auto;
    }
    .cs-completed-cta {
        grid-column: 2;
        padding: 0 1rem 1rem;
    }
    .cs-spotlight-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cs-completed-card {
        grid-template-columns: 1fr;
    }
    .cs-completed-thumb {
        min-height: 140px;
        width: 100%;
    }
    .cs-completed-cta {
        grid-column: 1;
        padding: 0 1rem 1rem;
    }
}

/* Read-more link inside spotlight card description */
.cs-spotlight-more {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,202,40,0.85);
    text-decoration: none;
    white-space: nowrap;
    margin-left: 2px;
    transition: color 0.2s;
}

.cs-spotlight-more:hover {
    color: #ffca28;
    text-decoration: underline;
}

/* Fix: reduce gap between Hall of Fame and Pro CTA */
.cs-hall-of-fame-section {
    padding-bottom: 2rem;
}

.cs-pro-cta-section {
    padding-top: 1.5rem;
}

/* Pro card — responsive two-col features on wider screens */
@media (max-width: 600px) {
    .cs-pro-features {
        columns: 1;
    }
    .cs-pro-card {
        padding: 28px 20px;
    }
    .cs-guest-banner .cs-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .cs-hero--compact .cs-hero-title {
        font-size: 2rem;
    }
}

/* Pro CTA admin preview note */
.cs-pro-cta-admin-note {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 8px 20px;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ── Share Strip ─────────────────────────────────────────── */
.cs-share-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.cs-share-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6b88;
}

.cs-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #b0b0c8;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    font-family: inherit;
    padding: 0;
    line-height: 1;
}

.cs-share-btn:hover {
    background: rgba(255,202,40,0.12);
    border-color: rgba(255,202,40,0.35);
    color: #ffca28;
}

.cs-share-btn--copy.cs-copied {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.35);
    color: #4ade80;
}

/* ==========================================================================
   Winner Gallery Section
   ========================================================================== */

.cs-winner-gallery-section {
    padding: 4rem 0;
}

.cs-winner-gallery-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.cs-winner-gallery-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    margin-top: 0.3rem;
    text-align: center;
}

.cs-winner-gallery-grid {
    columns: 4;
    column-gap: 0.75rem;
}

@media (max-width: 1024px) { .cs-winner-gallery-grid { columns: 3; } }
@media (max-width: 700px)  { .cs-winner-gallery-grid { columns: 2; } }
@media (max-width: 440px)  { .cs-winner-gallery-grid { columns: 1; } }

.cs-winner-gallery-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.cs-winner-gallery-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.cs-winner-gallery-img {
    width: 100%;
    padding-bottom: 75%;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-winner-gallery-item:nth-child(3n+1) .cs-winner-gallery-img { padding-bottom: 60%;  }
.cs-winner-gallery-item:nth-child(3n+2) .cs-winner-gallery-img { padding-bottom: 82%;  }
.cs-winner-gallery-item:nth-child(3n)   .cs-winner-gallery-img { padding-bottom: 105%; }

.cs-winner-gallery-item:hover .cs-winner-gallery-img {
    transform: scale(1.04);
}

.cs-winner-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cs-winner-gallery-item:hover .cs-winner-gallery-overlay {
    opacity: 1;
}

.cs-winner-gallery-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(251,191,36,0.4);
}

.cs-winner-gallery-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cs-winner-gallery-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.cs-winner-gallery-author {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.65);
}

.cs-winner-gallery-challenge {
    font-size: 0.68rem;
    color: #fbbf24;
    font-weight: 600;
    margin-top: 0.1rem;
}

.cs-winner-gallery-item--mock .cs-winner-gallery-img {
    filter: brightness(0.65) saturate(0.35);
}

.cs-winner-gallery-item--mock .cs-winner-gallery-badge {
    background: linear-gradient(135deg, #475569, #334155);
    color: #94a3b8;
    box-shadow: none;
}

/* ==========================================================================
   Marching Ants — Hero CTA Button (Compete for free)
   Gated by body.cs-marching-ants-active (Customizer: ChopSkills Design).
   Animates at rest; pauses on hover so the click action feels clean.
   ========================================================================== */
@keyframes cs-hero-ants {
	to {
		background-position: 100% 0, 0 100%, 0 0, 100% 100%;
	}
}

body.cs-marching-ants-active .cs-hero .cs-btn-primary {
	position: relative;
}

body.cs-marching-ants-active .cs-hero .cs-btn-primary::after {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: calc(8px + 3px); /* button border-radius + inset offset */
	pointer-events: none;
	z-index: 1;
	background-image:
		linear-gradient(90deg, #fff 50%, transparent 50%),
		linear-gradient(90deg, #fff 50%, transparent 50%),
		linear-gradient(0deg,  #fff 50%, transparent 50%),
		linear-gradient(0deg,  #fff 50%, transparent 50%);
	background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
	background-size: 12px 2px, 12px 2px, 2px 12px, 2px 12px;
	background-position: 0 0, 100% 100%, 0 100%, 100% 0;
	opacity: 0.25;
	animation: cs-hero-ants 20s linear infinite;
	transition: opacity 0.25s ease;
}

body.cs-marching-ants-active .cs-hero .cs-btn-primary:hover::after {
	opacity: 0;
	animation-play-state: paused;
}

