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

:root{
    --bg: #03040a;
    --panel: #07101a;
    --panel-2: #0b1a24;
    /* custom background served from picla/bg.jpg */
    --custom-bg: url('picla/bg.jpg');
    --muted: #9fb0bd;
    --accent: #4ec0ff;
    --accent-2: #7be0c8;
    --edge: rgba(255,255,255,0.03);
    --glass: rgba(255,255,255,0.02);
    --glass-2: rgba(255,255,255,0.01);
    --metal: linear-gradient(180deg,#0b1a24,#071017);
    /* sci-fi neon palette (used for card glows) */
    --neon-a: #4ec0ff;
    --neon-b: #8a63ff;
    --neon-c: #ff6fb3;
}

html,body{
    height:100%;
}

body {
    font-family: 'Segoe UI', Roboto, Inter, system-ui, -apple-system, 'Helvetica Neue', Arial;
    /* custom background (first layer) + subtle decorative gradients */
    background:
        var(--custom-bg),
        radial-gradient(circle at 10% 10%, rgba(78,192,255,0.03), transparent 12%),
        radial-gradient(circle at 90% 80%, rgba(123,224,200,0.02), transparent 14%),
        linear-gradient(180deg,#02040a 0%, #031027 80%);
    background-size: cover, auto, auto, cover;
    background-position: center, 0 0, 100% 100%, center;
    background-repeat: no-repeat;
    color: #d7eef9;
    min-height: 100vh;
    -webkit-font-smoothing:antialiased;
}

/* Main wrapper for layout */
.main-wrapper {
    display: flex;
    min-height: 100vh;
    gap: 16px;
    padding: 12px;
}

/* Left Sidebar Tray */
.sidebar-tray {
    width: 280px;
    background: linear-gradient(180deg, rgba(7,16,26,0.8), rgba(3,4,10,0.6));
    border: 2px solid rgba(150,150,150,0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(8px);
    position: sticky;
    top: 12px;
    height: auto;
    min-height: calc(100vh - 24px);
    max-height: none;
    box-shadow: 0 8px 32px rgba(2,6,23,0.4), inset 0 1px 0 rgba(255,255,255,0.02), 0 0 20px rgba(150,150,150,0.15);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(78,192,255,0.1);
}

.sidebar-header h2 {
    font-size: 16px;
    color: #e9fbff;
    margin: 0;
    font-weight: 600;
}

.add-btn-small {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(78,192,255,0.2), rgba(123,224,200,0.1));
    border: 1px solid rgba(78,192,255,0.3);
    color: var(--accent);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn-small:hover {
    background: linear-gradient(135deg, rgba(78,192,255,0.3), rgba(123,224,200,0.2));
    box-shadow: 0 0 12px rgba(78,192,255,0.2);
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: none;
    flex: 1;
    padding-right: 8px;
}

.sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 3px;
}

.sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(78,192,255,0.2);
    border-radius: 3px;
}

.sidebar-list::-webkit-scrollbar-thumb:hover {
    background: rgba(78,192,255,0.4);
}

.sidebar-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(78,192,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: rgba(78,192,255,0.08);
    border-color: rgba(78,192,255,0.3);
    box-shadow: 0 0 12px rgba(78,192,255,0.15);
}

.sidebar-item-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(0,0,0,0.1));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumb {
    font-size: 24px;
    color: var(--muted);
}

.sidebar-item-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.sidebar-item-title {
    color: #e9fbff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item-date {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.empty-list {
    padding: 24px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* Main content wrapper */
.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-tray {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .sidebar-tray {
        width: 100%;
        max-height: 150px;
        position: static;
    }
    
    .sidebar-list {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .sidebar-item {
        flex-shrink: 0;
        width: 120px;
    }
}

/* subtle separators like game UI */
.sidebar-section{position:relative;padding-bottom:8px}
.sidebar-section:after{content:'';position:absolute;left:8px;right:8px;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.02),transparent)}

/* Detail card modal styles */
.detail-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(2,6,11,0.6);z-index:1250}
.detail-card{width:820px;max-width:92%;background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));border-radius:12px;padding:18px;box-shadow:0 30px 80px rgba(2,6,23,0.85);transform:translateY(6px) scale(.98);opacity:0;transition:transform 5s ease,opacity 5s ease}
.detail-card.enter{transform:translateY(0) scale(1);opacity:1}
.detail-close{position:absolute;right:14px;top:12px;background:transparent;border:1px solid rgba(255,255,255,0.03);color:var(--muted);padding:6px 8px;border-radius:6px;cursor:pointer}
.detail-grid{display:grid;grid-template-columns:260px 1fr;gap:18px;align-items:start}
.detail-image{background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent);padding:12px;border-radius:8px;display:flex;align-items:center;justify-content:center}
.detail-image img{max-width:220px;max-height:220px;border-radius:6px;object-fit:contain}
.detail-image img{transition:transform 5s cubic-bezier(.2,.8,.2,1), box-shadow 5s ease;cursor:zoom-in}
.detail-image img.zoomed{transform:scale(2.2);cursor:zoom-out;box-shadow:0 40px 120px rgba(2,6,23,0.9);z-index:1300}
.detail-modal.zoomed{background:rgba(2,6,11,0.88)}
.detail-info{min-width:0;display:flex;flex-direction:column}
.detail-info h2{margin:0 0 8px 0;color:#e9fbff;overflow-wrap:anywhere;word-break:break-word}
.detail-meta{display:flex;gap:12px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.detail-meta span{background:rgba(255,255,255,0.02);padding:6px 10px;border-radius:6px;color:var(--muted);font-size:13px;white-space:nowrap}
.detail-notes p{margin:6px 0;color:#d7eef9}

/* small neon separators between cells for sci-fi feel */
.market-table td{position:relative;vertical-align:middle}
.market-table td:after{content:'';position:absolute;right:0;top:14%;bottom:14%;width:1px;background:linear-gradient(180deg,transparent,rgba(78,192,255,0.12),transparent);opacity:0.9}
.market-table td:last-child:after{display:none}

.col-img{width:40px}
.col-name{width:20%}
.col-cat{width:110px}
.col-qty{width:80px;text-align:left}
.col-note{width:12%}
.col-time{width:140px;color:var(--muted)}
.col-actions{width:70px;text-align:center}

.table-image{width:32px;height:32px;object-fit:cover;border-radius:6px}
.img-cell{padding:12px 0}
.img-cell:after{display:none}
.no-img{width:40px;height:40px;background:rgba(255,255,255,0.02);display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--muted)}

.name-cell{padding:12px 0 12px var(--col-name-pad);color:#e6f6ff;display:flex;flex-direction:row;align-items:center;text-align:left;gap:4px;min-width:0}
.cat-cell{padding:12px 8px}
.cat-cell .cat-tag{margin-left:0}

/* neon glow around the detail card */
.detail-card::before{
    content: '';
    position: absolute;
    left: -12px;
    right: -12px;
    top: -12px;
    bottom: -12px;
    border-radius: 16px;
    pointer-events: none;
    /* animated multi-color sci-fi glow */
    background: linear-gradient(90deg, rgba(78,192,255,0.18), rgba(138,99,255,0.14), rgba(255,111,179,0.12));
    background-size: 300% 300%;
    filter: blur(36px) saturate(1.05);
    opacity: 0.85;
    mix-blend-mode: screen;
    transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
    animation: neonShift 6s linear infinite;
    z-index: -1;
}

.detail-card::after{
    content: '';
    position: absolute;
    left: -8px;
    right: -8px;
    top: -8px;
    bottom: -8px;
    border-radius: 14px;
    pointer-events: none;
    border: 1px solid rgba(138,99,255,0.16);
    box-shadow: 0 20px 60px rgba(78,192,255,0.10), 0 0 80px rgba(138,99,255,0.06);
    transition: box-shadow 2s ease, opacity 2s ease;
    z-index: -1;
}

.detail-modal .detail-card:hover::before{
    filter: blur(40px) saturate(1.08);
    opacity: 1;
}

.detail-modal .detail-card:hover::after{
    box-shadow: 0 40px 120px rgba(78,192,255,0.18), 0 12px 40px rgba(0,0,0,0.5);
}

/* outline neon glow for the info/detail card used by item popup */
.info-card{
    width:820px;
    max-width:92%;
    border-radius:12px;
    padding:18px;
    box-shadow:0 30px 80px rgba(2,6,23,0.85);
    transform: scale(0.3);
    opacity: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    background-color: rgba(8,14,22,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
    z-index: 1300;
}

.info-card.enter {
    animation: zoomIn 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.info-card::before{
    content: '';
    position: absolute;
    left: -12px;
    right: -12px;
    top: -12px;
    bottom: -12px;
    border-radius: 16px;
    pointer-events: none;
    /* animated multi-color sci-fi glow */
    background: linear-gradient(90deg, rgba(78,192,255,0.18), rgba(138,99,255,0.14), rgba(255,111,179,0.12));
    background-size: 300% 300%;
    filter: blur(36px) saturate(1.05);
    opacity: 0.85;
    mix-blend-mode: screen;
    transition: filter 2s ease, opacity 2s ease, transform 2s ease;
    animation: neonPulse 2.8s infinite ease-in-out;;
    z-index: -1;
}

.info-card::after{
    content: '';
    position: absolute;
    left: -8px;
    right: -8px;
    top: -8px;
    bottom: -8px;
    border-radius: 14px;
    pointer-events: none;
    border: 1px solid rgba(138,99,255,0.16);
    box-shadow: 0 20px 60px rgba(78,192,255,0.10), 0 0 80px rgba(138,99,255,0.06);
    transition: box-shadow 2s ease, opacity 2s ease;
    z-index: -1;
}

.info-overlay .info-card:hover::before{
    filter: blur(40px) saturate(1.08);
    opacity: 1;
}

.info-overlay .info-card:hover::after{
    box-shadow: 0 40px 120px rgba(78,192,255,0.18), 0 12px 40px rgba(0,0,0,0.5);
}


.market-top{
    height:64px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px 22px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(16,38,60,0.06));
    border-bottom: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 6px 30px rgba(2,6,23,0.6), inset 0 -1px rgba(255,255,255,0.02);
}

.market-brand{
    font-weight:800;
    letter-spacing:2px;
    color:var(--accent);
    font-size:18px;
    text-shadow: 0 2px 10px rgba(78,192,255,0.06);
}

.market-controls{display:flex;gap:8px;align-items:center}
.market-controls .small{height:34px;padding:6px 10px}

.market-wrap{
    display:flex;
    gap:20px;
    padding:18px;
}

.market-sidebar{
    width:260px;
    background: var(--metal);
    border-radius:10px;
    padding:14px;
    box-shadow: 0 10px 40px rgba(2,6,23,0.6);
    border: 1px solid rgba(255,255,255,0.02);
}

.sidebar-section{margin-bottom:16px}
.section-title{font-size:12px;color:var(--muted);margin-bottom:8px}
.category-list{list-style:none}
.category-add{display:flex;gap:8px;margin-bottom:8px}
.cat-input{flex:1;padding:8px;border-radius:6px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:inherit}
.cat-remove{background:transparent;border:none;color:rgba(255,255,255,0.18);margin-left:8px;cursor:pointer}
.category-item{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-radius:6px;color:#a9bac6;cursor:pointer}
.category-item.active{background:linear-gradient(90deg, rgba(78,192,255,0.06), rgba(123,224,200,0.03));color:var(--accent);box-shadow:0 4px 18px rgba(46,155,210,0.06)}
.cat-name{flex:1}
.cat-tag{display:inline-block;margin-top:6px;padding:2px 6px;border-radius:4px;background:rgba(255,255,255,0.02);color:var(--muted);font-size:11px;margin-left:6px}

/* subtle separators like game UI */
.sidebar-section{position:relative;padding-bottom:8px}
.sidebar-section:after{content:'';position:absolute;left:8px;right:8px;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.02),transparent)}

/* Image preview modal styles */
.image-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.7);z-index:1200}
.image-modal-content{position:relative;background:transparent;padding:18px;border-radius:8px;max-width:90%;max-height:90%;display:flex;flex-direction:column;align-items:center}
.image-modal img{max-width:92vw;max-height:80vh;border-radius:6px;box-shadow:0 10px 40px rgba(2,6,23,0.8)}
.image-caption{margin-top:10px;color:var(--muted);font-size:13px}
.image-close{position:absolute;right:-8px;top:-8px;background:#0b1220;border-radius:50%;border:1px solid rgba(255,255,255,0.06);color:#dbeff8;padding:6px;cursor:pointer}
.category{padding:8px 10px;border-radius:6px;color:#a9bac6;cursor:pointer}
.category.active{background:rgba(255,255,255,0.02);color:var(--accent)}
.stat{font-size:13px;color:var(--muted);padding:6px 0}

.market-main{flex:1}
.market-header{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:12px}
.market-title{font-size:18px;font-weight:700}
.market-sub{font-size:12px;color:var(--muted)}

.table-wrap{background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.005));
    padding:12px;border-radius:12px;box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
    /* glass effect: blur background behind the list */
    background-color: rgba(8,14,22,0.46);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.03);
}
.table-wrap{position:relative;overflow:visible}

/* neon border and glow for the items list */
.table-wrap::before{
    content: '';
    position: absolute;
    left: -10px;
    right: -10px;
    top: -10px;
    bottom: -10px;
    border-radius: 14px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(78,192,255,0.10), rgba(123,224,200,0.06));
    filter: blur(26px);
    opacity: 0.6;
    mix-blend-mode: screen;
    transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.table-wrap::after{
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    top: -6px;
    bottom: -6px;
    border-radius: 12px;
    pointer-events: none;
    border: 1px solid rgba(78,192,255,0.20);
    box-shadow: 0 12px 40px rgba(78,192,255,0.12);
    transition: box-shadow 220ms ease, opacity 220ms ease;
}

/* hover/pulse effect when user hovers over the table container */
.table-wrap:hover::before{
    filter: blur(34px) saturate(1.1);
    opacity: 0.95;
    transform: scale(1.01);
}

.table-wrap:hover::after{
    box-shadow: 0 30px 90px rgba(78,192,255,0.18), 0 8px 28px rgba(0,0,0,0.45);
}
.market-table{width:100%;border-collapse:separate;border-spacing:0 10px;font-size:13px}
.market-table thead th{color:var(--muted);font-weight:700;text-align:left;padding:12px 10px;border-bottom:1px solid rgba(255,255,255,0.03);letter-spacing:1px;font-size:12px}
.market-table tbody tr{background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.0));border-radius:8px}
.market-row{transition:transform .12s, box-shadow .12s}
.market-row:hover{transform:translateY(-4px);box-shadow:0 12px 40px rgba(2,6,23,0.6);background:linear-gradient(90deg, rgba(78,192,255,0.02), rgba(123,224,200,0.01))}

.col-img{width:56px}
.col-name{width:40%}
.col-qty{width:80px;text-align:right}
.col-note{width:14%}
.col-time{width:140px;color:var(--muted)}
.col-actions{width:70px;text-align:center}

.table-image{width:40px;height:40px;object-fit:cover;border-radius:6px}
.no-img{width:40px;height:40px;background:rgba(255,255,255,0.02);display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--muted)}

.name-cell{padding:12px 8px;color:#e6f6ff}
.name-cell .name-link {
    color: #e6f6ff;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}
.name-cell .name-link:hover {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(78,192,255,0.4);
}
.qty-cell{padding:12px 8px;text-align:right;color:#9be3ff;font-weight:800}
.note-cell{padding:12px 8px;color:var(--muted)}
.time-cell{padding:12px 8px;color:var(--muted);font-size:12px}
.action-cell{padding:8px}

.table-btn{background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.005));border:1px solid rgba(255,255,255,0.03);color:var(--muted);padding:6px 8px;border-radius:6px;cursor:pointer}
.table-btn.edit{color:var(--accent);box-shadow:0 4px 18px rgba(78,192,255,0.06)}
.table-btn.delete{color:#ff9b9b}

.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:var(--muted)}
.empty-icon{font-size:26px;margin-bottom:8px}
.empty-sub{font-size:13px;color:var(--muted)}

/* Modal & Form tweaks */
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);align-items:center;justify-content:center;padding:20px}
.modal-content{background:linear-gradient(180deg,#061018,#04101a);border-radius:10px;padding:0;color:#dbeff8;width:100%;max-width:720px;box-shadow:0 20px 60px rgba(2,6,23,0.85);border:1px solid rgba(255,255,255,0.02)}
.modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid rgba(255,255,255,0.02)}
.modal-header h2{margin:0}
.close-btn{background:none;border:none;color:var(--muted);font-size:22px}

#item-form{padding:20px}
.form-group label{color:#d9eefb}
.form-group input[type="text"],.form-group input[type="number"],.form-group textarea{width:100%;padding:8px 10px;border-radius:6px;border:1px solid rgba(255,255,255,0.04);background:rgba(255,255,255,0.01);color:#d8eefc}
.form-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}

.primary-btn{background:linear-gradient(90deg,var(--accent),#2fb0a8);border:none;color:#04121a;padding:8px 12px;border-radius:6px;font-weight:800;cursor:pointer;box-shadow:0 8px 28px rgba(78,192,255,0.06)}
.secondary-btn{background:transparent;border:1px solid rgba(255,255,255,0.03);color:var(--muted);padding:8px 12px;border-radius:6px}
.icon-btn{background:transparent;border:1px solid rgba(255,255,255,0.03);color:var(--muted);padding:6px 8px;border-radius:6px}

/* Responsive */
@media (max-width:900px){
    .market-wrap{flex-direction:column;padding:12px}
    .market-sidebar{width:100%;display:flex;gap:12px;overflow:auto}
}

/* small polish: subtle grid background in main table area */

/* Gallery Wrapper - Two column layout */
.gallery-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    padding: 16px 0;
}

/* Items Container */
#items-container {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

#items-container::-webkit-scrollbar {
    width: 8px;
}

#items-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

#items-container::-webkit-scrollbar-thumb {
    background: rgba(78,192,255,0.2);
    border-radius: 4px;
}

#items-container::-webkit-scrollbar-thumb:hover {
    background: rgba(78,192,255,0.4);
}

/* Item Card */
.item-card {
    background: linear-gradient(180deg, rgba(11,26,36,0.8), rgba(3,4,10,0.4));
    border: 1px solid rgba(78,192,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.item-card:hover {
    border-color: rgba(78,192,255,0.3);
    box-shadow: 0 8px 24px rgba(78,192,255,0.1);
    transform: translateY(-2px);
}

.item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, rgba(78,192,255,0.05), rgba(123,224,200,0.02));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
}

.item-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-content h3 {
    font-size: 14px;
    color: #e9fbff;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-content .note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-content .timestamp {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

/* Preview Panel */
.preview-panel {
    background: linear-gradient(180deg, rgba(11,26,36,0.8), rgba(3,4,10,0.4));
    border: 2px solid rgba(78,192,255,0.2);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(78,192,255,0.08), inset 0 1px 0 rgba(255,255,255,0.02);
}

.preview-panel::-webkit-scrollbar {
    width: 6px;
}

.preview-panel::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 3px;
}

.preview-panel::-webkit-scrollbar-thumb {
    background: rgba(78,192,255,0.2);
    border-radius: 3px;
}

.preview-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(78,192,255,0.4);
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.preview-media {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, rgba(78,192,255,0.05), rgba(123,224,200,0.02));
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-info {
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(78,192,255,0.1);
}

.preview-info h2 {
    font-size: 15px;
    color: #e9fbff;
    margin: 0 0 8px 0;
    word-break: break-word;
}

.preview-info p {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.preview-date {
    color: var(--accent);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-wrapper {
        grid-template-columns: 1fr;
    }
    
    .preview-panel {
        max-height: 300px;
    }
    
    #items-container {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .gallery-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 8px 0;
    }
    
    #items-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 12px;
        max-height: 400px;
        gap: 12px;
    }
    
    .preview-panel {
        max-height: 280px;
        padding: 10px;
    }
    
    .preview-media {
        height: 200px;
    }
    
    .item-image {
        height: 150px;
    }
}

/* Zoom Modal */
.zoom-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 42, 42, 0.733);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
}

.zoom-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.zoom-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomInSlow 1.0s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes zoomInSlow {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2001;
}

.zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(78, 192, 255, 0.4);
}

/* Video player hover effect */
.preview-video-player {
    transition: all 0.2s ease;
}
.market-main{background-image:radial-gradient(rgba(78,192,255,0.002) 0.8px, transparent 0.8px), radial-gradient(rgba(123,224,200,0.002) 0.8px, transparent 0.8px);background-position:0 0, 10px 10px;background-size:20px 20px,20px 20px}

/* Animation keyframes for neon effects */
@keyframes neonPulse {
    0%, 100% {
        opacity: 0.85;
        filter: blur(36px) saturate(1.05);
    }
    50% {
        opacity: 1;
        filter: blur(42px) saturate(1.12);
    }
}

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

@keyframes zoomIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
