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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #34495e;
}

.description {
    color: #666;
    margin-bottom: 30px;
}

.info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.upload-section,
.prop-names-section,
.config-section,
.output-section,
.rename-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#fileInput {
    display: none;
}

.primary-btn,
.secondary-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-btn {
    background-color: #3498db;
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.primary-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.secondary-btn {
    background-color: #95a5a6;
    color: white;
    margin-right: 10px;
}

.secondary-btn:hover {
    background-color: #7f8c8d;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.preview-item img {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 5px;
}

.preview-item .filename {
    font-size: 14px;
    color: #666;
    word-break: break-all;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.preview-item .remove-btn:hover {
    background: #c0392b;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

#configOutput {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    background: #f8f9fa;
    resize: vertical;
}

.output-section .secondary-btn {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

.prop-name-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.prop-name-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px;
    background: white;
}

.prop-name-item .index {
    font-weight: 600;
    color: #495057;
    min-width: 40px;
}

.prop-name-item input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.prop-name-item input:focus {
    outline: none;
    border-color: #3498db;
}