* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    text-align: center;
    background: #007bff;
    color: #fff;
    padding: 2rem 1rem;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 0.5rem 0 0 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Upload Area Styles */
.upload-area {
    border: 2px dashed #007bff;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #0056b3;
    background: #e3f2fd;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e8;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin: 0 0 0.5rem 0;
    color: #007bff;
    font-size: 1.5rem;
}

.upload-area p {
    margin: 0 0 1.5rem 0;
    color: #666;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Button Styles */
.btn-primary, .btn-secondary, .btn-download {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-download {
    background: #28a745;
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-download:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

/* Preview Section */
.preview-section {
    display: none;
    margin-top: 2rem;
}

.preview-section.show {
    display: block;
}

.document-preview {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f8f9fa;
    margin: 1rem 0;
    text-align: center;
}

.document-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.document-icon {
    font-size: 3rem;
    color: #007bff;
}

.document-details {
    flex-grow: 1;
    margin-left: 1rem;
    text-align: left;
}

.document-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.document-size {
    color: #666;
    font-size: 0.9rem;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

.controls {
    text-align: center;
    margin-top: 1.5rem;
}

/* Options Section */
.options-section {
    display: none;
    margin-top: 1rem;
}

.options-section.show {
    display: block;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.option-group select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
}

.option-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Progress Section */
.progress-section {
    display: none;
    text-align: center;
}

.progress-section.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
    width: 0%;
}

/* Download Section */
.download-section {
    display: none;
    text-align: center;
}

.download-section.show {
    display: block;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Features Section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin: 0 0 1rem 0;
    color: #007bff;
}

/* How to Use Section */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem auto;
}

.step h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

/* Supported Formats Section */
.format-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.format-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.format-name {
    font-weight: bold;
    color: #007bff;
}

.format-desc {
    color: #666;
    font-size: 0.9rem;
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-item {
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.benefit-item h3 {
    margin: 0 0 1rem 0;
    color: #007bff;
    font-size: 1.1rem;
}

.benefit-item p {
    margin: 0;
    color: #666;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    margin: 0 0 0.5rem 0;
    color: #007bff;
}

.faq-item p {
    margin: 0;
    color: #666;
}

/* Tips Section */
.tips-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.tips-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
    background: #f8f9ff;
    border-radius: 0 6px 6px 0;
}

.tips-list li strong {
    color: #007bff;
}

/* Document Content Preview */
.document-content {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    background: white;
    margin-top: 1rem;
    text-align: left;
}

/* Footer */
footer {
    background: #f1f1f1;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: #666;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .feature-grid,
    .steps,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .document-info {
        flex-direction: column;
        text-align: center;
    }
    
    .document-details {
        margin-left: 0;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 1.5rem 0.5rem;
    }
    
    .btn-primary, .btn-secondary, .btn-download {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .format-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Hidden class utility */
.hidden {
    display: none !important;
}

/* Error message styles */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 1rem 0;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin: 1rem 0;
}
/* Styled note box */
.note-box {
  margin: 1.5rem auto 0 auto;
  padding: 1rem 1.5rem;
  max-width: 700px;
  border: 2px solid #007bff;
  border-radius: 8px;
  background: #e9f5ff;
  font-size: 1rem;
  font-weight: 500;
  color: #0056b3;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.note-box p {
  margin: 0;
}
/* Header styling */
.site-header {
  text-align: center;
  background: #007bff;
  color: #fff;
  padding: 2rem 1rem;
}