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

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

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

main {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

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

.upload-area:hover {
    border-color: #667eea;
    background-color: #f5f5ff;
}

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

.upload-icon {
    width: 80px;
    height: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.select-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.select-button:hover {
    background: #5a67d8;
}

/* Options Section */
.options-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.options-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #444;
}

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

.option-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.option-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-group input[type="number"] {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
}

/* Preview Section */
.preview-section {
    margin-bottom: 30px;
}

.preview-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #444;
}

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

.preview-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    max-width: 100%;
    max-height: 100px;
    margin-bottom: 10px;
}

.preview-item p {
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.convert-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.convert-button:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.clear-button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-button:hover {
    background: #c53030;
}

/* Result Section */
.result-section {
    margin-bottom: 30px;
}

.result-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #444;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.result-item.success {
    background: #e6fffa;
    border: 1px solid #81e6d9;
}

.result-item.error {
    background: #fed7d7;
    border: 1px solid #fc8181;
    color: #c53030;
}

.download-link {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.download-link:hover {
    color: #667eea;
}

.file-size {
    color: #718096;
    font-size: 0.9rem;
}

/* Info Section */
.info-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.info-section h2 {
    color: #2d3748;
    margin-bottom: 15px;
    margin-top: 25px;
}

.info-section h2:first-child {
    margin-top: 0;
}

.info-section ol,
.info-section ul {
    margin-left: 30px;
    color: #4a5568;
}

.info-section li {
    margin-bottom: 8px;
}

.info-section p {
    color: #4a5568;
    line-height: 1.8;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    main,
    .info-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .actions-section {
        flex-direction: column;
    }
    
    .convert-button,
    .clear-button {
        width: 100%;
    }
}