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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header .logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.converter-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8eeff;
    transform: scale(1.02);
}

.upload-prompt svg {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-prompt p {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-prompt span {
    color: #999;
    font-size: 0.95em;
}

.file-info {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 30px;
}

.files-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-item:last-child {
    margin-bottom: 0;
}

.remove-file-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details svg {
    color: #667eea;
    flex-shrink: 0;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.file-type {
    color: #666;
    font-size: 0.9em;
}

.change-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.conversion-options {
    margin-bottom: 25px;
}

.conversion-options h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.option-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-card {
    flex: 1;
    min-width: 200px;
    cursor: pointer;
}

.option-card input[type="radio"] {
    display: none;
}

.option-content {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: white;
}

.option-card:hover .option-content {
    border-color: #667eea;
    background: #f9fafe;
}

.option-card input[type="radio"]:checked + .option-content {
    border-color: #667eea;
    background: #f0f4ff;
}

.format-badge {
    display: block;
    font-size: 1.2em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.format-desc {
    display: block;
    font-size: 0.85em;
    color: #666;
}

.vector-settings-panel {
    background: #f9fafe;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.vector-settings-panel h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1em;
}

.vector-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    background: #f9fafe;
}

.vector-header {
    margin-bottom: 15px;
}

.vector-settings {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

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

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9em;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.convert-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.convert-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: #f0f4ff;
}

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

.preview-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.preview-single {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
    margin-bottom: 20px;
    text-align: center;
}

.preview-single img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.preview-item {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    background: #fafafa;
}

.preview-item p {
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    text-align: center;
    font-size: 0.9em;
}

.preview-item img,
.preview-item svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}

#svgPreview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-actions {
    display: flex;
    gap: 15px;
}

.preview-actions .secondary-btn {
    flex: 1;
}

.preview-actions .convert-btn {
    flex: 2;
}

.status-message {
    margin-top: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.batch-results {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.batch-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
}

.batch-result-item:last-child {
    margin-bottom: 0;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.result-info svg {
    color: #667eea;
    flex-shrink: 0;
}

.result-filename {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.result-original {
    font-size: 0.85em;
    color: #666;
}

.result-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.download-single-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.download-single-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .converter-box {
        padding: 25px;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .option-group {
        flex-direction: column;
    }
    
    .preview-actions {
        flex-direction: column;
    }
}
