#gn-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 1800px;
    height: 80vh;
    background: var(--modal-bg, #fff);
    border-radius: var(--radius-xl, 16px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 50000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid var(--border);
}

#gn-popup.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

#gn-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 49999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#gn-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.gn-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--primary-rgb), 0.05);
}

.gn-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.gn-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gn-item {
    display: flex;
    gap: 12px;
    padding: 1rem;
    background: var(--surface-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    position: relative;
    animation: gn-slide-up 0.3s ease-out;
}

@keyframes gn-slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gn-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 12px;
}

.gn-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gn-item-content {
    flex: 1;
}

.gn-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.gn-item-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

.gn-item-date {
    font-size: 10px;
    color: var(--text-muted);
}

.gn-item-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.5;
}

.gn-item-attachments {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gn-att-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    border: 1px solid var(--border);
}

.gn-att-file {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--border);
}

.gn-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.gn-item:hover .gn-item-actions {
    opacity: 1;
}

.gn-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(var(--primary-rgb), 0.02);
}

.gn-editor-container {
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    background: var(--bg-input, #fff);
}

.gn-editor-container .ql-toolbar {
    border: none;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.05);
}

.gn-editor-container .ql-container {
    border: none;
    height: 100px;
}

.gn-pending-atts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gn-pending-item {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    overflow: hidden;
}

.gn-pending-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gn-pending-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: #fff;
    border: none;
    width: 16px;
    height: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom-left-radius: 4px;
}

.gn-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md, 8px);
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.gn-drop-zone.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}
