/* ============================================ */
/* GALLERY - SCI-FI HUD CYBERPUNK              */
/* COMPLETE REWRITE - FIXED DROPDOWN + MOBILE  */
/* ============================================ */

:root {
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(20px);
    --text-primary: #e8e0f0;
    --text-secondary: #a090b8;
    --text-muted: #6a5a7a;
    --bg-primary: #0a0810;
    --bg-secondary: #12101f;
    --neon-purple: #8A19E1;
    --neon-cyan: #58ebfe;
    --neon-pink: #ff00ea;
    --neon-green: #4ff3a6;
    --neon-gold: #ffc72e;
    --neon-orange: #ff6b00;
    --purple-glow: rgba(138, 25, 225, 0.3);
    --cyan-glow: rgba(88, 235, 254, 0.15);
    --shadow-glow: 0 8px 40px rgba(0, 0, 0, 0.6);
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    --font-display: 'Orbitron', 'Share Tech Mono', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================ */
/* BACKGROUND EFFECTS                           */
/* ============================================ */

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background:
        radial-gradient(ellipse at 0% 0%, #8A19E1 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, #58ebfe 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, #ff00ea 0%, transparent 60%);
    background-size: 200% 200%;
    animation: gradientWarm 25s ease-in-out infinite alternate;
    opacity: 0.2;
    pointer-events: none;
}

@keyframes gradientWarm {
    0%,
    100% {
        background-position: 0% 0%;
        opacity: 0.15;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.25;
    }
}

.gradient-bg.cool {
    background:
        radial-gradient(ellipse at 0% 0%, #8A19E1 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, #4ff3a6 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, #58ebfe 0%, transparent 60%);
    animation: gradientCool 25s ease-in-out infinite alternate;
}

@keyframes gradientCool {
    0%,
    100% {
        background-position: 0% 0%;
        opacity: 0.15;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.25;
    }
}

.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9997;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 3px);
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scanline-overlay:not(.active) {
    opacity: 0;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9996;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-image:
        linear-gradient(rgba(88, 235, 254, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 235, 254, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
}

body.grid-mode .grid-overlay {
    opacity: 1;
}

.particle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.3;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
    opacity: 0;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 22s;
    background: var(--neon-purple);
}
.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
    background: var(--neon-cyan);
}
.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 25s;
    background: var(--neon-pink);
}
.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 20s;
    background: var(--neon-green);
}
.particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 23s;
    background: var(--neon-gold);
}
.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
    animation-duration: 19s;
    background: var(--neon-orange);
}
.particle:nth-child(7) {
    left: 70%;
    animation-delay: 2s;
    animation-duration: 21s;
    background: var(--neon-purple);
}
.particle:nth-child(8) {
    left: 80%;
    animation-delay: 4s;
    animation-duration: 24s;
    background: var(--neon-cyan);
}
.particle:nth-child(9) {
    left: 15%;
    animation-delay: 6s;
    animation-duration: 17s;
    background: var(--neon-pink);
}
.particle:nth-child(10) {
    left: 45%;
    animation-delay: 3s;
    animation-duration: 26s;
    background: var(--neon-green);
}
.particle:nth-child(11) {
    left: 75%;
    animation-delay: 5s;
    animation-duration: 22s;
    background: var(--neon-gold);
}
.particle:nth-child(12) {
    left: 90%;
    animation-delay: 7s;
    animation-duration: 20s;
    background: var(--neon-orange);
}

@keyframes floatParticle {
    0% {
        top: -10%;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
    10% {
        opacity: 0.8;
        transform: translateX(10px) scale(1);
    }
    90% {
        opacity: 0.8;
        transform: translateX(-10px) scale(1);
    }
    100% {
        top: 110%;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
}

/* ============================================ */
/* THEME CONTROLS                              */
/* ============================================ */

.theme-controls {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(13, 11, 21, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 6px 10px;
    border-radius: 40px;
    border: 1px solid rgba(138, 25, 225, 0.15);
    box-shadow: var(--shadow-glow);
}

.theme-controls button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(138, 25, 225, 0.12);
    background: rgba(138, 25, 225, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-controls button:hover {
    background: rgba(138, 25, 225, 0.15);
    transform: scale(1.05);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.theme-controls button.active {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    color: white;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(138, 25, 225, 0.25);
}

/* ============================================ */
/* SIDEBAR                                     */
/* ============================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(13, 11, 21, 0.92);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glow);
    border-right: 1px solid rgba(88, 235, 254, 0.06);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 235, 254, 0.1) transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 3px;
}
.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(88, 235, 254, 0.1);
    border-radius: 10px;
}

.sidebar-logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(88, 235, 254, 0.06);
    flex-shrink: 0;
}

.sidebar-logo .logo-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 20px rgba(138, 25, 225, 0.3));
}

.sidebar-logo .logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.sidebar-nav {
    padding: 8px 0;
}
.sidebar-nav.secondary {
    border-top: 1px solid rgba(88, 235, 254, 0.06);
    padding-top: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-left: 2px solid transparent;
    min-height: 44px;
    font-size: 0.8rem;
}

.sidebar-link i {
    width: 22px;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.sidebar-link span {
    flex: 1;
}
.sidebar-link .badge {
    background: var(--neon-purple);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.55rem;
}

.sidebar-link:hover {
    background: rgba(138, 25, 225, 0.06);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}
.sidebar-link:hover i {
    color: var(--neon-cyan);
}
.sidebar-link.active {
    background: rgba(138, 25, 225, 0.08);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}
.sidebar-link.active i {
    color: var(--neon-cyan);
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 235, 254, 0.08), transparent);
    margin: 8px 20px;
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(88, 235, 254, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: rgba(13, 11, 21, 0.5);
    backdrop-filter: blur(8px);
}

.user-avatar-sidebar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
    border: 1px solid rgba(88, 235, 254, 0.1);
    overflow: hidden;
}

.user-avatar-sidebar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-email {
    display: block;
    font-size: 0.55rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-mono);
}
.user-login-link {
    color: var(--neon-cyan);
    font-size: 0.7rem;
    text-decoration: none;
}
.user-login-link:hover {
    color: var(--neon-purple);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.08);
    color: #ef448c;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.55rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 4px;
}
.logout-btn:hover {
    background: #ef44bc;
    color: white;
    border-color: #ef44bc;
}

.sidebar-collapse-toggle {
    position: absolute;
    bottom: 80px;
    right: -12px;
    width: 26px;
    height: 26px;
    background: var(--neon-purple);
    border: 1px solid rgba(88, 235, 254, 0.15);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    z-index: 1001;
    box-shadow: 0 2px 12px rgba(138, 25, 225, 0.3);
}
.sidebar-collapse-toggle:hover {
    transform: scale(1.1);
}
.sidebar.collapsed .sidebar-collapse-toggle {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-logo .logo-text,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-link .badge,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-divider {
    display: none;
}
.sidebar.collapsed .sidebar-logo {
    justify-content: center;
    padding: 24px 0;
}
.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px 0;
}
.sidebar.collapsed .sidebar-link i {
    margin: 0;
    font-size: 1.1rem;
}
.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 16px 0;
}
.sidebar.collapsed .user-avatar-sidebar {
    margin: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================ */
/* MAIN CONTENT                                */
/* ============================================ */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
    float: left;
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* ============================================ */
/* TOP BAR                                     */
/* ============================================ */

.top-bar {
    position: sticky;
    top: 0;
    background: rgba(13, 11, 21, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(88, 235, 254, 0.06);
    z-index: 100;
    flex-wrap: wrap;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
}
.mobile-sidebar-toggle:hover {
    color: var(--neon-cyan);
}

/* ============================================ */
/* CATEGORY DROPDOWN - COMPLETE FIXED          */
/* ============================================ */

.category-dropdown {
    position: relative;
    z-index: 1000;
    flex-shrink: 0;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(138, 25, 225, 0.06);
    border: 1px solid rgba(88, 235, 254, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.dropdown-btn i {
    color: var(--neon-cyan);
}

.dropdown-btn .fa-chevron-down {
    transition: transform 0.3s ease;
}

.dropdown-btn.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(13, 11, 21, 0.96);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(88, 235, 254, 0.08);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-glow);
    padding: 6px 0;
    z-index: 1001;

    /* Hidden by default */
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Scrollbar */
.dropdown-menu::-webkit-scrollbar {
    width: 3px;
}
.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(88, 235, 254, 0.02);
}
.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(138, 25, 225, 0.3);
    border-radius: 10px;
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    background: transparent;
    border-right: none;
    border-top: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(138, 25, 225, 0.06);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}

.dropdown-item.active {
    background: rgba(138, 25, 225, 0.08);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
}

.dropdown-item.nsfw-link {
    color: #ff2d95;
}

.dropdown-item.nsfw-link:hover {
    background: rgba(255, 45, 149, 0.08);
    color: #ff6db5;
    border-left-color: #ff2d95;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: rgba(88, 235, 254, 0.06);
    margin: 4px 12px;
}

/* Dropdown Label */
.dropdown-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-label:hover {
    background: rgba(138, 25, 225, 0.04);
    color: var(--text-secondary);
}

.dropdown-label input[type="checkbox"] {
    accent-color: var(--neon-cyan);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.dropdown-label i {
    color: #10b981;
    font-size: 0.7rem;
}

/* ============================================ */
/* MINI PROMPT                                 */
/* ============================================ */

.mini-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(138, 25, 225, 0.04);
    border: 1px solid rgba(88, 235, 254, 0.04);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-family: var(--font-mono);
    flex: 1;
    min-width: 120px;
    max-width: 220px;
}

.mini-prompt i {
    color: var(--neon-cyan);
    flex-shrink: 0;
}
.mini-prompt span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.mini-prompt-btn {
    background: rgba(138, 25, 225, 0.08);
    border: 1px solid rgba(88, 235, 254, 0.06);
    padding: 2px 10px;
    border-radius: 2px;
    color: var(--neon-cyan);
    font-size: 0.55rem;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.mini-prompt-btn:hover {
    background: rgba(138, 25, 225, 0.15);
}

/* ============================================ */
/* SEARCH BAR                                  */
/* ============================================ */

.search-bar-container {
    flex: 1;
    max-width: 280px;
    min-width: 120px;
    position: relative;
}

.search-bar-input {
    width: 100%;
    padding: 6px 14px 6px 34px;
    background: rgba(13, 11, 21, 0.6);
    border: 1px solid rgba(88, 235, 254, 0.06);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: var(--font-mono);
}
.search-bar-input::placeholder {
    color: var(--text-muted);
}
.search-bar-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(88, 235, 254, 0.04);
}

.search-bar-container .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-cyan);
    font-size: 0.7rem;
}
.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
}
.search-clear:hover {
    color: var(--neon-cyan);
}

/* ============================================ */
/* UPLOAD BUTTON                               */
/* ============================================ */

.top-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    box-shadow: 0 4px 16px rgba(138, 25, 225, 0.2);
    flex-shrink: 0;
}
.top-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(138, 25, 225, 0.3);
}

/* ============================================ */
/* RANDOM PROMPT BANNER                        */
/* ============================================ */

.random-prompt-banner {
    margin: 16px 24px 0;
    background: rgba(13, 11, 21, 0.5);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(88, 235, 254, 0.04);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.prompt-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.prompt-icon {
    font-size: 1.3rem;
}
.prompt-text {
    flex: 1;
    min-width: 100px;
}
.prompt-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    display: block;
}
.prompt-value {
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: var(--font-mono);
}
.btn-prompt {
    background: rgba(138, 25, 225, 0.06);
    border: 1px solid rgba(88, 235, 254, 0.06);
    padding: 4px 16px;
    border-radius: var(--radius-sm);
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    flex-shrink: 0;
}
.btn-prompt:hover {
    background: rgba(138, 25, 225, 0.12);
    border-color: var(--neon-cyan);
}

/* ============================================ */
/* GALLERY GRID - CSS COLUMNS                  */
/* ============================================ */

.gallery-container {
    padding: 16px 24px 48px;
    max-width: 100%;
    overflow: hidden;
}

.gallery-grid {
    column-count: 4;
    column-gap: 16px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Card */
.gallery-card {
    display: inline-block;
    width: 100%;
    margin-bottom: 16px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.card-inner {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(13, 11, 21, 0.6);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(88, 235, 254, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.card-inner:hover {
    transform: translateY(-4px);
    border-color: rgba(88, 235, 254, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(138, 25, 225, 0.03);
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-inner:hover .card-image {
    transform: scale(1.02);
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: rgba(13, 11, 21, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 2px;
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--neon-cyan);
    border: 1px solid rgba(88, 235, 254, 0.06);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Verification Badge */
.verification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 2px;
    font-size: 0.45rem;
    font-family: var(--font-mono);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Actions */
.card-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.card-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(13, 11, 21, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(88, 235, 254, 0.06);
    border-radius: 2px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.55rem;
    font-family: var(--font-mono);
}

.card-action-btn:hover {
    background: rgba(138, 25, 225, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: scale(1.05);
}

.card-action-btn.like-btn {
    color: #ef4444;
}
.card-action-btn.like-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
}
.card-action-btn.like-btn.liked {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.card-action-btn .count {
    font-size: 0.5rem;
}

/* Card Overlay (Hover) */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 8, 16, 0.9) 0%,
            rgba(10, 8, 16, 0.3) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    pointer-events: none;
}

.card-inner:hover .card-overlay {
    opacity: 1;
}

.card-hover-info {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-inner:hover .card-hover-info {
    opacity: 1;
    transform: translateY(0);
}

.card-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-artist {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.card-artist:hover {
    color: var(--neon-cyan);
}

.card-artist-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.card-tags .tag {
    font-size: 0.45rem;
    color: var(--text-muted);
    background: rgba(13, 11, 21, 0.4);
    padding: 1px 8px;
    border-radius: 2px;
    border: 1px solid rgba(88, 235, 254, 0.03);
    font-family: var(--font-mono);
}

/* ============================================ */
/* LOADING & EMPTY STATES                      */
/* ============================================ */

.loading-spinner {
    text-align: center;
    padding: 48px;
    display: none;
}
.loading-spinner.show {
    display: block;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(88, 235, 254, 0.06);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.load-more-container {
    text-align: center;
    margin-top: 24px;
}

.btn-load-more {
    background: rgba(13, 11, 21, 0.5);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(88, 235, 254, 0.04);
    padding: 10px 28px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}
.btn-load-more:hover {
    background: rgba(138, 25, 225, 0.06);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.empty-gallery {
    width: 100%;
    text-align: center;
    padding: 60px 24px;
}
.empty-gallery i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}
.empty-gallery h3 {
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.empty-gallery p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================ */
/* TOAST                                       */
/* ============================================ */

.toast-notification {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background: rgba(13, 11, 21, 0.95);
    backdrop-filter: var(--glass-blur);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    border: 1px solid rgba(88, 235, 254, 0.06);
    box-shadow: var(--shadow-glow);
    transform: translateX(200%);
    transition: transform 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}
.toast-notification.show {
    transform: translateX(0);
}
.toast-notification i {
    color: var(--neon-cyan);
}
.toast-notification.error {
    border-color: rgba(239, 68, 68, 0.15);
}
.toast-notification.error i {
    color: #ef4444;
}

/* ============================================ */
/* RESPONSIVE - PHONE FIXED (2 columns)        */
/* ============================================ */

/* Tablet: 3 columns */
@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 3;
        column-gap: 14px;
    }
    .gallery-card {
        margin-bottom: 14px;
    }
}

/* Mobile: 2 columns - FIXED! */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        width: var(--sidebar-width);
    }
    .sidebar.collapsed .sidebar-logo .logo-text,
    .sidebar.collapsed .sidebar-link span,
    .sidebar.collapsed .sidebar-link .badge,
    .sidebar.collapsed .user-info,
    .sidebar.collapsed .sidebar-divider {
        display: flex;
    }
    .sidebar.collapsed .sidebar-logo {
        justify-content: flex-start;
        padding: 24px 20px;
    }
    .sidebar.collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 10px 20px;
    }
    .sidebar.collapsed .sidebar-link i {
        margin-right: 14px;
    }
    .sidebar.collapsed .sidebar-user {
        justify-content: flex-start;
        padding: 16px 20px;
    }
    .sidebar-collapse-toggle {
        display: none;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .sidebar.collapsed~.main-content {
        margin-left: 0;
        width: 100%;
    }
    .mobile-sidebar-toggle {
        display: block;
    }

    .top-bar {
        padding: 10px 12px;
        gap: 8px;
    }

    /* Gallery grid: 2 columns on mobile */
    .gallery-grid {
        column-count: 2;
        column-gap: 10px;
    }
    .gallery-card {
        margin-bottom: 10px;
    }

    .gallery-container {
        padding: 12px 12px 32px;
    }

    .mini-prompt span {
        max-width: 60px;
    }
    .mini-prompt {
        max-width: 120px;
        min-width: 80px;
    }

    .search-bar-container {
        max-width: 140px;
        min-width: 80px;
    }
    .search-bar-input {
        font-size: 0.65rem;
        padding: 4px 10px 4px 28px;
    }
    .search-bar-container .search-icon {
        font-size: 0.6rem;
        left: 8px;
    }

    .top-upload-btn span {
        display: none;
    }
    .top-upload-btn {
        padding: 6px 12px;
    }

    .prompt-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 10px 16px;
    }
    .prompt-value {
        font-size: 0.75rem;
    }

    .dropdown-menu {
        min-width: 180px;
        right: 0;
        left: auto;
        max-height: 300px;
    }

    .theme-controls {
        bottom: 16px;
        right: 16px;
        padding: 4px 8px;
        gap: 2px;
    }
    .theme-controls button {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }

    .random-prompt-banner {
        margin: 12px 12px 0;
    }

    .toast-notification {
        bottom: 70px;
        right: 16px;
        left: 16px;
        font-size: 0.65rem;
        padding: 8px 16px;
    }
}

/* Small Mobile: still 2 columns */
@media (max-width: 480px) {
    .top-bar {
        gap: 6px;
        padding: 8px 10px;
    }

    .gallery-grid {
        column-count: 2;
        column-gap: 8px;
    }
    .gallery-card {
        margin-bottom: 8px;
    }
    .gallery-container {
        padding: 8px 8px 24px;
    }

    .dropdown-btn {
        font-size: 0.6rem;
        padding: 4px 10px;
    }
    .dropdown-menu {
        min-width: 160px;
    }
    .dropdown-item {
        padding: 6px 14px;
        font-size: 0.65rem;
    }

    .mini-prompt {
        display: none;
    }

    .search-bar-container {
        max-width: 100px;
        min-width: 60px;
    }
    .search-bar-input {
        font-size: 0.6rem;
        padding: 4px 8px 4px 24px;
    }

    .top-upload-btn {
        padding: 4px 10px;
        font-size: 0.65rem;
    }

    .card-title {
        font-size: 0.65rem;
    }
    .category-badge {
        font-size: 0.4rem;
        padding: 2px 6px;
        top: 6px;
        left: 6px;
    }
    .verification-badge {
        font-size: 0.4rem;
        padding: 1px 6px;
        top: 6px;
        right: 6px;
    }
    .card-action-btn {
        font-size: 0.45rem;
        padding: 2px 6px;
    }
    .card-action-btn .count {
        font-size: 0.4rem;
    }
    .card-overlay {
        padding: 10px;
    }
}

/* Extra small: still 2 columns! */
@media (max-width: 360px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 6px;
    }
    .gallery-card {
        margin-bottom: 6px;
    }

    .search-bar-container {
        max-width: 70px;
        min-width: 50px;
    }
    .search-bar-input {
        padding: 3px 6px 3px 20px;
        font-size: 0.55rem;
    }
    .search-bar-container .search-icon {
        font-size: 0.5rem;
        left: 6px;
    }

    .dropdown-btn {
        font-size: 0.5rem;
        padding: 3px 8px;
        gap: 4px;
    }
    .dropdown-btn i {
        font-size: 0.5rem;
    }
    .dropdown-menu {
        min-width: 140px;
    }
    .dropdown-item {
        padding: 4px 10px;
        font-size: 0.55rem;
    }
}

/* ============================================ */
/* LIGHT MODE                                  */
/* ============================================ */

body.light-mode {
    --bg-primary: #f0ecf5;
    --bg-secondary: #e8e0f0;
    --text-primary: #1a1028;
    --text-secondary: #5a4a70;
    --text-muted: #8a7a9a;
}

body.light-mode .gradient-bg {
    opacity: 0.06;
}
body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.85);
}
body.light-mode .top-bar {
    background: rgba(255, 255, 255, 0.8);
}
body.light-mode .search-bar-input {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}
body.light-mode .card-inner {
    background: rgba(255, 255, 255, 0.6);
}
body.light-mode .user-name {
    color: #4a2a6a;
}
body.light-mode .dropdown-menu {
    background: rgba(255, 255, 255, 0.92);
}
body.light-mode .dropdown-item {
    color: #5a5070;
}
body.light-mode .dropdown-item:hover {
    background: rgba(138, 25, 225, 0.06);
    color: var(--neon-purple);
}
body.light-mode .theme-controls {
    background: rgba(255, 255, 255, 0.8);
}
body.light-mode .dropdown-label {
    color: #8a7a9a;
}
body.light-mode .dropdown-label:hover {
    color: #5a4a70;
}

/* ============================================ */
/* HUD MODE                                    */
/* ============================================ */

body.hud-mode .scanline-overlay {
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 2px,
            rgba(88, 235, 254, 0.015) 2px,
            rgba(88, 235, 254, 0.015) 3px,
            transparent 3px,
            transparent 5px,
            rgba(138, 25, 225, 0.015) 5px,
            rgba(138, 25, 225, 0.015) 6px);
    animation: scanMove 0.5s linear infinite;
}

@keyframes scanMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(6px);
    }
}

body.hud-mode::before {
    content: '';
    position: fixed;
    inset: 20px;
    pointer-events: none;
    z-index: 9998;
    border: 1px solid rgba(88, 235, 254, 0.05);
    border-radius: 4px;
}

body.hud-mode::after {
    content: '⏣ SYS: ONLINE  |  GALLERY  |  HUD: v2.1';
    position: fixed;
    bottom: 80px;
    right: 30px;
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: rgba(88, 235, 254, 0.15);
    letter-spacing: 2px;
    z-index: 9998;
    pointer-events: none;
}

.hud-card-corners {
    position: absolute;
    inset: 4px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.card-inner:hover .hud-card-corners {
    opacity: 1;
}

.hud-card-corners span {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 8px;
    color: rgba(88, 235, 254, 0.08);
}
.hud-card-corners .hud-tl {
    top: 2px;
    left: 4px;
}
.hud-card-corners .hud-tr {
    top: 2px;
    right: 4px;
}
.hud-card-corners .hud-bl {
    bottom: 2px;
    left: 4px;
}
.hud-card-corners .hud-br {
    bottom: 2px;
    right: 4px;
}
.hud-card-corners .hud-id {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.35rem;
    color: rgba(88, 235, 254, 0.04);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}
