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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Section Headers */
section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 8px;
}

/* Upload Section */
.upload-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.upload-area h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #444;
}

.drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: #ff6b35;
    background: #fff5f3;
}

.drop-zone.dragover {
    border-color: #ff6b35;
    background: #fff5f3;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.drop-zone p {
    margin: 5px 0;
    color: #666;
}

.or-text {
    font-size: 0.9rem;
    color: #999;
}

.upload-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: #e55a2b;
}

.preview-section {
    margin-top: 25px;
}

.preview-section h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #444;
}

.preview-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
    min-height: 100px;
    color: #6c757d;
}

/* Configuration Section */
.config-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.config-group {
    margin-bottom: 30px;
}

.config-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    user-select: none; /* Prevent text selection */
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.checkbox-item:hover {
    background: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevent shrinking */
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-item.checked .checkmark,
.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #ff6b35;
    border-color: #ff6b35;
    color: white;
}

.checkbox-item.checked .checkmark::after,
.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Sliders */
.slider-container {
    position: relative;
    margin: 20px 0;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #666;
}

.slider-value {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.slider-value::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
}

/* Custom Instructions */
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
}

textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.generate-btn:hover {
    background: #e55a2b;
}

.generate-btn:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    section h2 {
        font-size: 1.1rem;
    }
    
    .upload-section,
    .config-section {
        padding: 20px;
    }
}

/* File list styling */
.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.file-item .file-name {
    flex: 1;
    margin-left: 8px;
}

.file-item .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.file-item .remove-btn:hover {
    background: #c82333;
}
