.generator-container {
    max-width: 800px;
    margin: 1rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.upload-section {
    position: relative;
    z-index: 2;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 2px dashed #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-section:hover {
    border-color: var(--primary-color);
}

.upload-section i {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

.upload-section p {
    color: #666;
    margin-bottom: 1rem;
}

.upload-btn {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: #333;
}

.preview-section {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.images-list {
    position: relative;
    z-index: 3;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-item .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sprite-controls {
    position: relative;
    z-index: 3;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

input[type="number"],
input[type="color"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn {
    position: relative;
    z-index: 4;
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background: #333;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.output-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.sprite-preview,
.css-output {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-image {
    margin-top: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: auto;
}

.preview-image img {
    max-width: 100%;
}

pre {
    margin-top: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow: auto;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 메시지 스타일 */
.message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    background: #28a745;
    color: white;
    border-radius: 4px;
    animation: slideIn 0.3s ease;
    z-index: 9999;
}

.message.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .preview-section {
        grid-template-columns: 1fr;
    }
    
    .output-section {
        grid-template-columns: 1fr;
    }
} 