.shimmer {
    position: relative;
    overflow: hidden;
    background-color: #e0e0e0;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

.image-container {
    position: relative;
}

.image-container .loading-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.image-container img.loaded {
    opacity: 1;
}

.selected-button {
    background-color: #000;
    color: #fff;
    border-color: #000;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@keyframes pulse {
    0%, 80%, 100% { 
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% { 
        opacity: 1;
        transform: scale(1.2);
    }
}


@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Skeleton card for image placeholders */
.skeleton-card {
    border-radius: 1rem;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}


@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}


@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); }
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}


.spinner-dark {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid black;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}


.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    margin: 0 2px;
    animation: pulse 1.4s infinite ease-in-out both;
}

.pulse-dot:nth-child(1) { animation-delay: -0.32s; }
.pulse-dot:nth-child(2) { animation-delay: -0.16s; }


.image-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    pointer-events: none;
}


.progress-bar {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: white;
    border-radius: 2px;
    animation: progress 3s ease-in-out infinite;
}

.progress-bar-dark {
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar-fill-dark {
    background-color: black;
}


.float {
    animation: float 3s ease-in-out infinite;
}


.glow {
    animation: glow 2s ease-in-out infinite;
}


.gradient-bg {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}


.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}


.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== Creative additions ===== */
/* Animated hero gradient */
.hero-creative {
    background: radial-gradient(1200px 600px at 10% 10%, rgba(255,255,255,0.6), rgba(255,255,255,0)) ,
                radial-gradient(900px 500px at 90% 30%, rgba(255,255,255,0.4), rgba(255,255,255,0)),
                linear-gradient(135deg, #f8fafc 0%, #eef2f7 30%, #e7ecf4 60%, #f5f7fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 12s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating blur blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.6;
    pointer-events: none;
    animation: blobFloat 18s ease-in-out infinite;
}

.blob-1 { width: 240px; height: 240px; left: -60px; top: -40px; background: #c7d2fe; animation-delay: 0s; }
.blob-2 { width: 280px; height: 280px; right: -80px; top: 20px; background: #fecaca; animation-delay: 3s; }
.blob-3 { width: 220px; height: 220px; left: 20%; bottom: -80px; background: #bbf7d0; animation-delay: 6s; }

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* Hero enhancements */
.hero-creative::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(17,24,39,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(17,24,39,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.hero-ring {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(80vw, 900px);
    height: min(80vw, 900px);
    border-radius: 9999px;
    background: conic-gradient(from 0deg, rgba(99,102,241,0.15), rgba(236,72,153,0.15), rgba(34,211,238,0.15), rgba(99,102,241,0.15));
    filter: blur(40px);
    opacity: 0.6;
    animation: spin-slow 40s linear infinite;
    z-index: 0;
    pointer-events: none;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 9999px;
    background: white;
    box-shadow: 0 0 12px rgba(255,255,255,0.8), 0 0 24px rgba(99,102,241,0.4);
    opacity: 0;
    animation: twinkle 3.2s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    20% { opacity: 1; transform: scale(1); }
    60% { opacity: 0.4; }
}

/* Position variants for sparkles */
.sparkle.s1 { top: 18%; left: 14%; animation-delay: .2s; }
.sparkle.s2 { top: 26%; right: 18%; animation-delay: .9s; }
.sparkle.s3 { top: 54%; left: 8%; animation-delay: 1.4s; }
.sparkle.s4 { top: 68%; right: 10%; animation-delay: 2.1s; }
.sparkle.s5 { top: 36%; left: 50%; animation-delay: 2.6s; }
.sparkle.s6 { top: 72%; left: 42%; animation-delay: 3.1s; }

/* Prompt bar */
.prompt-bar { 
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(229,231,235,0.8);
}
.prompt-bar .caret {
    animation: blink 1s steps(1,end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* CTA subtle pulse */
.btn-pulse { animation: glowPulse 3.2s ease-in-out infinite; }
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(99,102,241,0); }
    50% { box-shadow: 0 10px 30px rgba(99,102,241,0.25); }
}

/* Animated gradient headline */
.text-gradient-animate {
    background: linear-gradient(90deg, #6366f1, #ec4899, #22d3ee, #6366f1);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: textShine 6s ease-in-out infinite;
}
@keyframes textShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating image cards */
.floaty { will-change: transform; animation: floatY 6s ease-in-out infinite; }
.floaty-2 { animation-delay: 0.6s; }
.floaty-3 { animation-delay: 1.2s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Scroll cue */
.scroll-cue { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9999px; background: rgba(255,255,255,0.85); border: 1px solid rgba(229,231,235,0.8); box-shadow: 0 6px 16px rgba(0,0,0,0.08); animation: cueBounce 2.4s ease-in-out infinite; }
@keyframes cueBounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

/* Marquee chips */
.marquee { overflow: hidden; position: relative; }
.marquee-track {
    display: flex; gap: 12px; width: max-content;
    animation: marqueeScroll 20s linear infinite;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-chip {
    padding: 8px 14px; border-radius: 9999px;
    background: #fff; border: 1px solid #e5e7eb; color: #111827; font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Tilt cards */
.tilt { perspective: 1000px; }
.tilt-card {
    transform-style: preserve-3d; transition: transform 300ms ease, box-shadow 300ms ease;
    position: relative; overflow: hidden;
}
.tilt-card:hover { transform: rotateX(6deg) rotateY(-6deg) translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,0.12); }
.tilt-card::before {
    content: ""; position: absolute; inset: -40%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(255,255,255,0));
    transform: translateZ(20px);
}

/* Neon buttons */
.neon-btn { box-shadow: 0 0 0 0 rgba(0,0,0,0); transition: box-shadow 200ms ease, transform 200ms ease; }
.neon-btn:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.15), 0 0 0 3px rgba(0,0,0,0.8) inset; transform: translateY(-1px); }
.neon-btn-ghost { position: relative; overflow: hidden; }
.neon-btn-ghost::after { content:""; position:absolute; inset:0; border:1px solid #e5e7eb; border-radius: 0.5rem; }

/* Subtle grid background */
.grid-bg {
    background-image: linear-gradient(rgba(17,24,39,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(17,24,39,0.03) 1px, transparent 1px);
    background-size: 24px 24px; background-position: -1px -1px;
}

/* Mosaic helpers */
.mosaic img { filter: saturate(1.05); }

/* ---- Modern section bands ---- */
.section-band {
    background: linear-gradient(90deg, rgba(99,102,241,0.08), rgba(236,72,153,0.08), rgba(34,211,238,0.08));
}
.section-alt {
    background: linear-gradient(180deg, rgba(17,24,39,0.03), rgba(17,24,39,0));
}

/* ---- Scroll reveal animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 700ms ease, transform 700ms ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.reveal-up { transform: translateY(24px); }
.reveal-up.is-visible { transform: translateY(0); }
.reveal-zoom { transform: scale(0.96); }
.reveal-zoom.is-visible { transform: scale(1); }

/* ---- Fancy heading underline ---- */
.shine-underline { position: relative; display: inline-block; }
.shine-underline::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #22d3ee);
    filter: blur(0.5px);
}

/* Profile name underline (animated sweep) */
.name-underline { position: relative; display: inline-block; }
.name-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #22d3ee);
    opacity: 0.9;
}
.name-underline::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    background: radial-gradient(circle, #ffffff 0%, #a5b4fc 40%, rgba(99,102,241,0) 70%);
    box-shadow: 0 0 14px rgba(99,102,241,0.6), 0 0 26px rgba(236,72,153,0.35);
    animation: underlineSweep 3.6s ease-in-out infinite;
}
@keyframes underlineSweep {
    0% { transform: translateX(0); opacity: 0.9; }
    50% { opacity: 1; }
    100% { transform: translateX(calc(100% - 14px)); opacity: 0.9; }
}

/* ---- Mosaic hover lift ---- */
.mosaic > div {
    transition: transform 300ms ease, box-shadow 300ms ease;
}
.mosaic > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* ---- CTA glow frame ---- */
.cta-card { position: relative; }
.cta-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    background: linear-gradient(120deg, rgba(99,102,241,0.35), rgba(236,72,153,0.35), rgba(34,211,238,0.35));
    filter: blur(12px);
    opacity: 0.4;
    z-index: -1;
}

/* ===== Feature cards (Generate / Upscale / Style) ===== */
.feature-card {
    position: relative;
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,0.10); border-color: #d1d5db; }
.feature-icon {
    width: 44px; height: 44px; border-radius: 0.75rem; color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.icon-generate { background: linear-gradient(135deg, #6366f1, #22d3ee); }
.icon-upscale { background: linear-gradient(135deg, #111827, #4b5563); }
.icon-style { background: linear-gradient(135deg, #ec4899, #f59e0b); }
.feature-title { font-weight: 800; font-size: 1.125rem; margin-bottom: 0.25rem; }
.feature-desc { color: #4b5563; font-size: 0.9rem; }
.feature-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 700; color: #111827; }
.feature-arrow { transition: transform 200ms ease; }
.feature-card:hover .feature-arrow { transform: translateX(3px); }

/* ===== New redesign backgrounds ===== */
.bg-aurora {
    position: relative;
    background: radial-gradient(800px 400px at 10% 10%, rgba(99,102,241,0.18), rgba(99,102,241,0)),
                radial-gradient(700px 380px at 90% 20%, rgba(236,72,153,0.18), rgba(236,72,153,0)),
                radial-gradient(600px 360px at 40% 90%, rgba(34,211,238,0.16), rgba(34,211,238,0)),
                linear-gradient(180deg, #fafafb 0%, #f3f5f9 100%);
    overflow: hidden;
}
.bg-aurora::after {
    content: ""; position: absolute; inset: -20%;
    background: conic-gradient(from 0deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
    filter: blur(30px); pointer-events: none;
}

.bg-dots {
    background-image: radial-gradient(rgba(17,24,39,0.08) 1px, transparent 1px);
    background-size: 18px 18px;
    background-position: -1px -1px;
}

/* ===== Popular styles pills ===== */
.style-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 9999px;
    background: linear-gradient(#ffffffcc, #ffffffcc) padding-box,
                linear-gradient(120deg, rgba(99,102,241,0.45), rgba(236,72,153,0.45), rgba(34,211,238,0.45)) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
    font-weight: 700;
    color: #111827;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.style-pill:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.style-pill:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.35); }
.style-pill .icon-wrap {
    width: 22px; height: 22px; border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.icon-photoreal { background: linear-gradient(135deg, #111827, #4b5563); }
.icon-anime { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.icon-cinema { background: linear-gradient(135deg, #6366f1, #22d3ee); }
.icon-pixel { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.icon-oil { background: linear-gradient(135deg, #10b981, #22d3ee); }

/* ===== Showcase cards ===== */
.card-zoom { position: relative; overflow: hidden; border-radius: 0.75rem; }
.card-zoom img { transition: transform 600ms cubic-bezier(.2,.6,.2,1); width: 100%; display: block; }
.card-zoom:hover img { transform: scale(1.03); }
.card-zoom::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0));
    opacity: 0; transition: opacity 300ms ease;
}
.card-zoom:hover::after { opacity: 1; }

/* Masonry (Pinterest) layout */
.masonry { column-gap: 8px; }
.masonry-item { break-inside: avoid; margin-bottom: 8px; display: block; }

/* ===== ImageGen page custom CSS ===== */
.ig-page { background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%); }
.ig-panel { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border: 1px solid #e5e7eb; box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.ig-title-underline { position: relative; }
.ig-title-underline::after { content:""; position:absolute; left:0; bottom:-6px; width:120px; height:4px; border-radius:9999px; background: linear-gradient(90deg,#6366f1,#ec4899,#22d3ee); }

.ig-select, .ig-textarea { border: 1px solid #e5e7eb; border-radius: 0.75rem; }
.ig-select:focus, .ig-textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.25); border-color: #c7d2fe; }
.ig-textarea { font-size: 0.95rem; line-height: 1.5; }

.btn-primary-gradient { background: linear-gradient(135deg,#111827,#1f2937); color:#fff; }
.btn-primary-gradient:hover { background: linear-gradient(135deg,#0b0f17,#111827); }

/* checkerboard for transparency */
.checkerboard { background-image: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f3f4f6 75%), linear-gradient(-45deg, transparent 75%, #f3f4f6 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0px; }

/* recent grid hover */
.recent-card { transition: transform 200ms ease, box-shadow 200ms ease; border-radius: 0.75rem; overflow: hidden; }
.recent-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,0.12); }

/* ===== Profile page custom CSS ===== */
.pr-page { background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%); }
.pr-panel { background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border: 1px solid #e5e7eb; box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.avatar-ring { position: relative; }
.avatar-ring::before { content:""; position:absolute; inset:-4px; border-radius:9999px; padding:4px; background: conic-gradient(from 0deg, #6366f1, #ec4899, #22d3ee, #6366f1); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.stat-chip { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:9999px; background:#fff; border:1px solid #e5e7eb; font-weight:700; box-shadow:0 6px 18px rgba(0,0,0,0.06); }
.badge-plan { background: linear-gradient(#ffffffcc,#ffffffcc) padding-box, linear-gradient(120deg, rgba(99,102,241,0.45), rgba(236,72,153,0.45), rgba(34,211,238,0.45)) border-box; border:1px solid transparent; }
.gallery-card { transition: transform 180ms ease, box-shadow 180ms ease; border-radius: 0.75rem; overflow: hidden; }
.gallery-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,0.12); }
.btn-ghost { background:#fff; border:1px solid #e5e7eb; }
.btn-ghost:hover { border-color:#d1d5db; box-shadow: 0 8px 22px rgba(0,0,0,0.08); }

/* ===== FAQ cards ===== */
.faq-card {
    background: linear-gradient(#ffffffcc, #ffffffcc) padding-box,
                linear-gradient(120deg, rgba(99,102,241,0.35), rgba(236,72,153,0.35), rgba(34,211,238,0.35)) border-box;
    border: 1px solid transparent;
    border-radius: 0.75rem;
}
.faq-card summary { list-style: none; }
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary { position: relative; padding-right: 28px; cursor: pointer; }
.faq-card summary::after {
    content: "expand_more";
    font-family: 'Material Icons';
    position: absolute; right: 0; top: 0; line-height: 1; transform: rotate(0deg);
    transition: transform 200ms ease;
}
.faq-card[open] summary::after { transform: rotate(180deg); }
