/* Packer Specific Styles */

.editor-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 140px);
}

.controls-panel, .canvas-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.properties-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.2);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.drop-zone .drop-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.drop-zone p {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.drop-zone .text-muted {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sprite List */
.sprite-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 350px;
    overflow-y: auto;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sprite-list li {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.sprite-list li:last-child {
    border-bottom: none;
}

.sprite-list li.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    justify-content: center;
}

.sprite-list .sprite-thumb {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHElEQVQYV2N89erVfwY0wAgXYwTFqMGoQYwAAwAAzEwxP0U5WAAAAABJRU5ErkJggg==');
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sprite-list .sprite-info {
    flex: 1;
    overflow: hidden;
}

.sprite-list .sprite-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.sprite-list .sprite-dim {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sprite-list .btn-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
}

.sprite-list .btn-remove:hover {
    opacity: 1;
}

/* Canvas Area */
.canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: auto;
    position: relative;
    padding: 1rem;
}

.checkered-bg {
    background-image: 
        linear-gradient(45deg, #1a1a1a 25%, transparent 25%), 
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%), 
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#atlas-canvas {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Export Bar */
.export-bar {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.export-bar button {
    flex: 1;
    justify-content: center;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    margin-top: 0;
    color: #ef4444;
}

.modal-content p {
    color: var(--text);
    margin-bottom: 0;
}
