/**
 * Ojoo World-Class AI Image Gallery Stylesheet
 * Scoped under .ai-gallery-page with full dark/light theme support
 */

:root {
    --aig-primary: #6366f1;
    --aig-primary-hover: #4f46e5;
    --aig-accent: #ec4899;
    --aig-bg: #f8fafc;
    --aig-card-bg: #ffffff;
    --aig-card-border: rgba(226, 232, 240, 0.8);
    --aig-text-main: #0f172a;
    --aig-text-sub: #64748b;
    --aig-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --aig-shadow-hover: 0 20px 40px -15px rgba(99, 102, 241, 0.25);
    --aig-glass: rgba(255, 255, 255, 0.85);
    --aig-glass-border: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .ai-gallery-page,
body.dark-mode .ai-gallery-page {
    --aig-bg: #0b0f19;
    --aig-card-bg: #111827;
    --aig-card-border: rgba(255, 255, 255, 0.08);
    --aig-text-main: #f9fafb;
    --aig-text-sub: #9ca3af;
    --aig-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    --aig-shadow-hover: 0 20px 40px -15px rgba(99, 102, 241, 0.4);
    --aig-glass: rgba(17, 24, 39, 0.85);
    --aig-glass-border: rgba(255, 255, 255, 0.1);
}

.ai-gallery-page {
    background-color: var(--aig-bg);
    color: var(--aig-text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── HERO SECTION ───────────────────────────────────────────────────────── */
.aig-hero {
    position: relative;
    padding: 3rem 0 2rem !important;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22), rgba(236, 72, 153, 0.08) 45%, transparent 80%);
}

.aig-hero-aura-1 {
    position: absolute;
    width: 450px;
    height: 450px;
    top: -100px;
    left: 15%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    animation: aigAuraPulse 8s ease-in-out infinite alternate;
}

.aig-hero-aura-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 50px;
    right: 15%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.22) 0%, rgba(236, 72, 153, 0) 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    animation: aigAuraPulse 10s ease-in-out infinite alternate-reverse;
}

@keyframes aigAuraPulse {
    0% { transform: scale(0.9) translateY(0); opacity: 0.7; }
    100% { transform: scale(1.15) translateY(20px); opacity: 1; }
}

.aig-hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.5;
    pointer-events: none;
}

.aig-badge-sparkle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.1rem;
    border-radius: 50rem;
    background: rgba(99, 102, 241, 0.12);
    color: var(--aig-primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(10px);
}

.aig-badge-sparkle i {
    font-size: 1rem;
    animation: aigSparkleRotate 4s linear infinite;
}

@keyframes aigSparkleRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* ── HIGH-IMPACT HERO TITLE & TYPEWRITER ANIMATION ──────────────────────── */
.aig-hero-title {
    font-size: clamp(1.8rem, 3.7vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 1.1rem;
    color: var(--aig-text-main);
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-height: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.aig-typewriter-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    max-width: 100%;
}

#aigDynamicHeading {
    white-space: nowrap;
    display: inline-block;
}

.aig-typewriter-text {
    display: inline;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.aig-typewriter-cursor {
    display: inline-block;
    width: 5px;
    height: 0.85em;
    background: linear-gradient(135deg, var(--aig-primary), var(--aig-accent));
    margin-left: 6px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.85), 0 0 24px rgba(236, 72, 153, 0.7);
    animation: aigCursorBlink 0.75s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes aigCursorBlink {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.1; transform: scaleY(0.85); }
}

.aig-hero-title .aig-word {
    display: inline-block;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Gradient word colors */
.aig-grad-purple {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

.aig-grad-pink {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(236, 72, 153, 0.3));
}

.aig-grad-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.3));
}

.aig-grad-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.3));
}

.aig-hero-subtitle {
    font-size: clamp(1.0rem, 1vw, 1.0rem);
    color: var(--aig-text-sub);
    max-width: 720px;
    margin: 0 auto 1.75rem;
    line-height: 1.55;
    font-weight: 500;
}

/* ── BRAND POSITIONING PILL STRIP ─────────────────────────────────────────── */
.aig-platform-caps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.aig-cap-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.95rem;
    border-radius: 50rem;
    background: var(--aig-glass);
    border: 1px solid var(--aig-card-border);
    color: var(--aig-text-main);
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.aig-cap-chip:hover {
    transform: translateY(-2px);
    border-color: var(--aig-primary);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.18);
}

.aig-cap-chip i {
    color: var(--aig-primary);
}

/* ── INTERACTIVE HEADLINE OPTIONS SWITCHER ────────────────────────────── */
.aig-heading-selector-wrap {
    background: rgba(99, 102, 241, 0.05);
    border: 1px dashed rgba(99, 102, 241, 0.25);
    border-radius: 1.25rem;
    padding: 0.85rem 1.25rem;
    max-width: 860px;
    margin: 0 auto 2.25rem;
    backdrop-filter: blur(8px);
}

.aig-heading-selector-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--aig-primary);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.aig-heading-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.aig-heading-pill {
    background: var(--aig-card-bg);
    border: 1px solid var(--aig-card-border);
    color: var(--aig-text-sub);
    padding: 0.35rem 0.85rem;
    border-radius: 50rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.aig-heading-pill:hover {
    border-color: var(--aig-primary);
    color: var(--aig-primary);
    transform: translateY(-1px);
}

.aig-heading-pill.active {
    background: linear-gradient(135deg, var(--aig-primary), var(--aig-accent));
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transform: scale(1.03);
}

/* ── HERO SEARCH EXPERIENCE ─────────────────────────────────────────────── */
.aig-search-box {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

.aig-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--aig-card-bg);
    border: 2px solid var(--aig-card-border);
    border-radius: 50rem;
    padding: 0.45rem 0.5rem 0.45rem 1.65rem;
    box-shadow: var(--aig-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.aig-search-input-wrap:focus-within {
    border-color: var(--aig-primary);
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.2), var(--aig-shadow-hover);
    transform: translateY(-2px);
}

.aig-search-icon {
    color: var(--aig-text-sub);
    font-size: 1.25rem;
    margin-right: 0.85rem;
}

.aig-search-input {
    border: none;
    outline: none;
    background: transparent;
    color: var(--aig-text-main);
    font-size: 1.05rem;
    width: 100%;
    padding: 0.55rem 0;
}

.aig-search-input::placeholder {
    color: var(--aig-text-sub);
    opacity: 0.7;
}

.aig-search-btn {
    background: linear-gradient(135deg, var(--aig-primary), var(--aig-accent));
    color: #ffffff;
    border: none;
    border-radius: 50rem;
    padding: 0.75rem 1.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.aig-search-btn:hover {
    opacity: 0.95;
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.aig-trending-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    margin-bottom: 0 !important;
    font-size: 0.85rem;
    color: var(--aig-text-sub);
}

.aig-tag-pill {
    background: var(--aig-card-bg);
    border: 1px solid var(--aig-card-border);
    color: var(--aig-text-sub);
    padding: 0.25rem 0.75rem;
    border-radius: 50rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.aig-tag-pill:hover {
    color: var(--aig-primary);
    border-color: var(--aig-primary);
    background: rgba(99, 102, 241, 0.08);
}

/* ── CATEGORIES BAR ─────────────────────────────────────────────────────── */
.aig-categories-sec {
    padding: 0 0 0.75rem !important;
    border-bottom: 1px solid var(--aig-card-border);
}

.aig-cat-scroll {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.aig-cat-scroll::-webkit-scrollbar {
    height: 4px;
}
.aig-cat-scroll::-webkit-scrollbar-thumb {
    background: var(--aig-card-border);
    border-radius: 4px;
}

.aig-cat-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: var(--aig-card-bg);
    border: 1px solid var(--aig-card-border);
    border-radius: 50rem;
    color: var(--aig-text-main);
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25 ease;
    cursor: pointer;
}

.aig-cat-card:hover, .aig-cat-card.active {
    background: var(--aig-primary);
    color: #ffffff;
    border-color: var(--aig-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.aig-cat-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.aig-cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    color: var(--aig-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.aig-cat-card.active .aig-cat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ── MASONRY IMAGE GRID ─────────────────────────────────────────────────── */
.aig-grid-container {
    columns: 4 280px;
    column-gap: 1.25rem;
    padding: 2rem 0;
}

@media (max-width: 1200px) {
    .aig-grid-container { columns: 3 240px; }
}
@media (max-width: 768px) {
    .aig-grid-container { columns: 2 160px; column-gap: 0.75rem; }
}

.aig-card {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--aig-card-bg);
    border: 1px solid var(--aig-card-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--aig-shadow);
}

.aig-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--aig-shadow-hover);
}

.aig-card-img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    border-radius: 1rem;
}

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

.aig-card-img-wrap:hover .aig-card-img {
    transform: scale(1.04);
}

/* ── MOUSEOVER OVERLAY (Hidden on page load, appears on hover ON the image) ── */
.aig-card-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: linear-gradient(
        to bottom, 
        rgba(15, 23, 42, 0.85) 0%, 
        rgba(15, 23, 42, 0.1) 35%, 
        rgba(15, 23, 42, 0.1) 65%, 
        rgba(15, 23, 42, 0.85) 100%
    );
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem;
    z-index: 5;
}

.aig-card-img-wrap:hover .aig-card-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Top Overlay: Title and Author */
.aig-card-top-overlay {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: translateY(-8px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.aig-card-img-wrap:hover .aig-card-top-overlay {
    transform: translateY(0);
}

.aig-card-title-text {
    color: #ffffff !important;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

.aig-card-author-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.785rem;
}

.aig-creator-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Bottom Overlay: Likes and Downloads */
.aig-card-bottom-overlay {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: translateY(8px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.aig-card-img-wrap:hover .aig-card-bottom-overlay {
    transform: translateY(0);
}

.aig-card-stat-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.aig-card-stat-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.aig-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--aig-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--aig-glass-border);
    color: var(--aig-text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    text-decoration: none;
}

.aig-btn-icon:hover {
    background: var(--aig-primary);
    color: #ffffff;
    transform: scale(1.1);
}

.aig-btn-icon.liked {
    background: var(--aig-accent);
    color: #ffffff;
}

.aig-card-info {
    color: #ffffff;
}

.aig-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: default;
}

.aig-card-creator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.aig-creator-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* ── MODAL DETAIL PREVIEW ───────────────────────────────────────────────── */
.aig-modal-dialog {
    max-width: 1200px;
    width: 95vw;
}

.aig-modal-content {
    background: var(--aig-card-bg);
    border: 1px solid var(--aig-card-border);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Artwork Stage Container for View Details Popup */
.aig-detail-img-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 480px;
    max-height: 84vh;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-radius: 1.25rem;
    padding: 1.25rem;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.aig-detail-img {
    max-height: 80vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.85rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Portrait Image Scaling - Fills maximum vertical height for immersive display */
.aig-detail-img.is-portrait,
.aig-detail-img[data-orientation="portrait"] {
    max-height: 82vh !important;
    height: 82vh !important;
    width: auto !important;
    max-width: 100% !important;
}

[data-bs-theme="dark"] .aig-detail-img-stage,
body.dark-mode .aig-detail-img-stage {
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.aig-prompt-box {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 0.75rem;
    padding: 1rem;
    position: relative;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--aig-text-main);
    line-height: 1.5;
}



/* ── SKELETON LOADER ───────────────────────────────────────────────────── */
.aig-skeleton {
    background: linear-gradient(90deg, var(--aig-card-bg) 25%, var(--aig-card-border) 50%, var(--aig-card-bg) 75%);
    background-size: 200% 100%;
    animation: aigLoading 1.5s infinite;
    border-radius: 1rem;
}

@keyframes aigLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── SOCIAL SHARE POPUP BUTTONS ─────────────────────────────────────────── */
.aig-social-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    background: var(--aig-card-bg);
    border: 1px solid var(--aig-card-border);
    color: var(--aig-text-main);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.aig-social-share-btn i {
    font-size: 1.35rem;
}

.aig-social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--aig-shadow);
}

.aig-share-facebook:hover { background: #1877f2; color: #ffffff !important; border-color: #1877f2; }
.aig-share-twitter:hover  { background: #000000; color: #ffffff !important; border-color: #000000; }
.aig-share-linkedin:hover { background: #0a66c2; color: #ffffff !important; border-color: #0a66c2; }
.aig-share-whatsapp:hover { background: #25d366; color: #ffffff !important; border-color: #25d366; }
.aig-share-telegram:hover { background: #0088cc; color: #ffffff !important; border-color: #0088cc; }
.aig-share-pinterest:hover{ background: #e60023; color: #ffffff !important; border-color: #e60023; }
.aig-share-reddit:hover   { background: #ff4500; color: #ffffff !important; border-color: #ff4500; }
.aig-share-email:hover    { background: #6c757d; color: #ffffff !important; border-color: #6c757d; }

/* ── UPLOAD AI GALLERY IMAGE BUTTON ─────────────────────────────────────── */
.aig-btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    background-size: 200% auto;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50rem;
    padding: 0.55rem 1.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 20px -4px rgba(124, 58, 237, 0.45), 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    height: 40px;
    position: relative;
    overflow: hidden;
}
.aig-btn-upload:hover {
    background-position: right center;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px -4px rgba(124, 58, 237, 0.6), 0 4px 12px rgba(219, 39, 119, 0.3);
    color: #ffffff !important;
}
.aig-btn-upload:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 4px 12px -2px rgba(124, 58, 237, 0.4);
}
.aig-btn-upload i {
    font-size: 0.95rem;
    transition: transform 0.25s ease;
}
.aig-btn-upload:hover i {
    transform: translateY(-2px);
}

/* ── MY IMAGES BADGE LINK ───────────────────────────────────────────────── */
.aig-my-images-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.1rem;
    border-radius: 50rem;
    background: var(--aig-card-bg);
    color: var(--aig-text-main);
    border: 1px solid var(--aig-card-border);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.aig-my-images-btn:hover {
    color: var(--aig-primary);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-50%) translateX(-2px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
}

/* ── WORLD-CLASS AI GALLERY PAGINATION STYLES ──────────────────────────── */
.aig-pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.aig-pagination {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: var(--aig-card-bg, #ffffff);
    border: 1px solid var(--aig-card-border, #e5e7eb);
    border-radius: 50rem;
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    list-style: none;
    margin: 0;
}

.aig-page-item {
    margin: 0;
    padding: 0;
}

.aig-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.95rem;
    border-radius: 50rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.aig-page-link:hover {
    color: #4f46e5;
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(99, 102, 241, 0.25);
}

/* Active Page Pill */
.aig-page-item.active .aig-page-link {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    border-color: transparent !important;
    box-shadow: 0 6px 18px -2px rgba(79, 70, 229, 0.45) !important;
}

.aig-page-first, .aig-page-last {
    min-width: 38px;
    padding: 0;
}

.aig-page-prev, .aig-page-next {
    padding: 0 1.1rem;
}

[data-bs-theme="dark"] .aig-page-link,
body.dark-mode .aig-page-link {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .aig-page-link:hover,
body.dark-mode .aig-page-link:hover {
    background: #334155;
    border-color: #6366f1;
    color: #ffffff;
}

/* ── ELEGANT LIGHT CLIENT REQUEST CTA CARD & STRIP ───────────────────────── */
.aig-client-cta-strip {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] .aig-client-cta-strip,
body.dark-mode .aig-client-cta-strip {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(99, 102, 241, 0.35) !important;
}

.aig-client-cta-strip:hover {
    border-color: rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 12px 30px -8px rgba(99, 102, 241, 0.18) !important;
    transform: translateY(-1px);
}

.aig-client-cta-box {
    position: relative;
    max-width: 680px;
    margin: 2rem auto 0;
    padding: 1.75rem 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    border: 1px solid rgba(99, 102, 241, 0.22);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

[data-bs-theme="dark"] .aig-client-cta-box,
body.dark-mode .aig-client-cta-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.aig-client-cta-box:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 15px 35px -10px rgba(99, 102, 241, 0.22), 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.aig-cta-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.95rem;
    border-radius: 50rem;
    font-size: 0.725rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.aig-client-request-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 50rem;
    font-size: 0.825rem;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.aig-client-request-cta-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.5);
}

.aig-client-request-cta-btn:active {
    transform: translateY(0);
}

.aig-cta-sparkle-icon {
    font-size: 0.95rem;
    color: #fbbf24;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.aig-cta-subtext {
    font-size: 0.925rem;
    color: #475569;
    line-height: 1.5;
    margin-top: 0.75rem;
    font-weight: 500;
}

[data-bs-theme="dark"] .aig-cta-subtext,
body.dark-mode .aig-cta-subtext {
    color: #94a3b8;
}

/* ── PROFESSIONAL REQUEST MODAL STYLING ─────────────────────────────────── */
#requestAiImagesModal .modal-content {
    border-radius: 1.5rem !important;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3) !important;
    border: none;
}

.aig-modal-header-pro {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    color: #ffffff;
    padding: 1.5rem 1.75rem;
    position: relative;
}

.aig-modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.aig-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .aig-form-card,
body.dark-mode .aig-form-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.aig-form-card-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4f46e5;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.aig-input-pro {
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 0.95rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.aig-input-pro:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.aig-pill-check-item .btn-check + label {
    border-radius: 50rem;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.4rem 0.95rem;
    color: var(--aig-text-sub);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
    cursor: pointer;
}

[data-bs-theme="dark"] .aig-pill-check-item .btn-check + label,
body.dark-mode .aig-pill-check-item .btn-check + label {
    background: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}

.aig-pill-check-item .btn-check:checked + label {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.aig-dropzone-pro {
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    text-align: center;
}

[data-bs-theme="dark"] .aig-dropzone-pro,
body.dark-mode .aig-dropzone-pro {
    background: #1f2937;
    border-color: #374151;
}

.aig-dropzone-pro:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
}

.aig-dropzone-icon {
    font-size: 2rem;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

/* ── UNIVERSAL TOP-RIGHT CLOSE BUTTON FOR AI GALLERY DETAIL POPUP ──────── */
.aig-modal-close-btn {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 1060 !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0.5rem !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18) !important;
    opacity: 0.9 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 0.85rem !important;
}

.aig-modal-close-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1) rotate(90deg) !important;
    background-color: #f1f5f9 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

[data-bs-theme="dark"] .aig-modal-close-btn,
body.dark-mode .aig-modal-close-btn {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
}

/* ── COMPLETE MOBILE RESPONSIVENESS (SMARTPHONES, TABLETS & MOBILE DEVICES) ───── */

/* Touch-optimized horizontal scrolling for Category Bar */
.aig-category-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.aig-category-bar::-webkit-scrollbar {
    display: none;
}

@media (max-width: 991.98px) {
    .aig-hero {
        padding: 2.5rem 0 1.75rem !important;
    }
    
    .aig-hero-title {
        font-size: clamp(1.25rem, 4.2vw, 2.25rem) !important;
        margin-bottom: 0.85rem;
    }

    .aig-hero-subtitle {
        font-size: 0.95rem !important;
        max-width: 90% !important;
        margin-left: auto;
        margin-right: auto;
    }

    .aig-masonry-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.85rem !important;
    }
}

@media (max-width: 767.98px) {
    .aig-hero {
        padding: 2rem 0 1.5rem !important;
    }

    .aig-badge-sparkle {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.85rem !important;
        max-width: 92%;
    }

    .aig-hero-title {
        font-size: clamp(0.95rem, 4.2vw, 1.45rem) !important;
        letter-spacing: -0.01em;
        margin-bottom: 0.75rem;
    }

    .aig-hero-subtitle {
        font-size: 0.875rem !important;
        line-height: 1.5;
    }

    .aig-search-box {
        max-width: 100% !important;
    }

    .aig-search-input-wrap {
        padding: 0.35rem 0.5rem !important;
        border-radius: 50rem !important;
    }

    .aig-search-input {
        font-size: 0.85rem !important;
        padding-left: 2.2rem !important;
    }

    .aig-search-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        border-radius: 50rem !important;
    }

    .aig-client-request-cta-btn,
    .aig-upload-btn-header {
        width: 100% !important;
        justify-content: center !important;
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }

    .aig-masonry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }

    .aig-card-img-wrap {
        border-radius: 0.75rem !important;
    }

    .aig-card-overlay {
        padding: 0.5rem !important;
    }

    .aig-card-title {
        font-size: 0.775rem !important;
    }

    /* Modal Mobile Adjustments */
    #requestAiImagesModal .modal-dialog,
    #aigDetailModal .modal-dialog {
        max-width: 96% !important;
        margin: 0.5rem auto !important;
    }

    .aig-modal-header-pro {
        padding: 1.1rem 1.25rem !important;
    }

    .aig-modal-header-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }

    .aig-form-card {
        padding: 1rem !important;
        border-radius: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .aig-input-pro {
        font-size: 0.825rem !important;
        padding: 0.55rem 0.85rem !important;
    }

    .aig-detail-img {
        max-height: 50vh !important;
        object-fit: contain !important;
        width: 100% !important;
    }

    .aig-modal-close-btn {
        top: 0.75rem !important;
        right: 0.75rem !important;
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
}

@media (max-width: 479.98px) {
    .aig-hero-title {
        font-size: clamp(0.85rem, 4vw, 1.15rem) !important;
    }

    .aig-badge-sparkle span {
        font-size: 0.7rem !important;
        word-break: break-word;
    }

    .aig-masonry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .aig-cat-pill {
        padding: 0.35rem 0.85rem !important;
        font-size: 0.775rem !important;
    }
}

/* Ensure mobile taps on image cards always open the detail modal popup without accidentally triggering overlay links */
@media (hover: none), (max-width: 991.98px) {
    .aig-card-overlay,
    .aig-card-top-overlay,
    .aig-card-bottom-overlay {
        pointer-events: none !important;
    }
}

