* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(145deg, #f3f4f6 0%, #ffffff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

.container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.header {
    padding: 20px 30px;
    background-color: #1a202c;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    font-size: 24px;
}

.header-info {
    display: flex;
    align-items: center;
}

.header-info span {
    margin-left: 15px;
}

.home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 15px;
}

.home-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.home-btn i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .header-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .home-btn {
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .header-info span {
        margin-left: 0;
        font-size: 12px;
    }
}

.main-content {
    padding: 20px 30px;
}

.upload-section, .files-section, .options-section, .convert-section, .progress-section, .results-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header h3 {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.section-header h3 i {
    margin-right: 8px;
}

.upload-container {
    border: 2px dashed #cbd5e0;
    background: #edf2f7;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: background-color 0.3s ease;
    position: relative;
}

.upload-area:hover, .upload-area.dragover {
    background-color: #e2e8f0;
}

.upload-area {
    cursor: pointer;
}

.upload-icon i {
    font-size: 48px;
    color: #3182ce;
    margin-bottom: 10px;
}

.file-types {
    margin-top: 15px;
    color: #718096;
}

.file-type {
    background: #3182ce;
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    display: inline-block;
    margin-right: 5px;
}

.files-list, .results-list {
    background: #edf2f7;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.file-row, .result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s ease;
}

.file-row:last-child, .result-row:last-child {
    border-bottom: none;
}

.file-details, .result-details {
    display: flex;
    align-items: center;
}

.file-icon, .result-icon {
    margin-right: 10px;
    font-size: 20px;
    color: #4a5568;
}

.file-name, .result-name {
    font-weight: 600;
    color: #1a202c;
}

.clear-all-btn, .convert-btn, .download-all-btn, .new-conversion-btn {
    background: #3182ce;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.clear-all-btn i, .convert-btn i, .download-all-btn i, .new-conversion-btn i {
    margin-right: 8px;
}

.clear-all-btn:hover, .convert-btn:hover, .download-all-btn:hover, .new-conversion-btn:hover {
    background: #2b6cb0;
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4a5568;
}

.option-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.progress-container {
    background: #edf2f7;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-bar {
    background: #cbd5e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: #3182ce;
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    color: #4a5568;
}

.current-file {
    color: #2d3748;
    font-weight: 600;
}

.footer {
    padding: 10px 30px;
    background-color: #2d3748;
    color: white;
    text-align: center;
}

.footer span {
    font-size: 12px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-info {
    font-size: 14px;
}

.footer-features {
    font-size: 14px;
    display: flex;
    justify-content: center;
}

.footer-features span {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
}

.footer-features i {
    margin-right: 5px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    color: white;
    text-align: center;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: #3182ce;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.toast i {
    margin-right: 8px;
}

/* Styles for temporary PDF conversion container */
.temp-pdf-container {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 800px;
    background-color: white;
    padding: 40px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: black;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.temp-pdf-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.temp-pdf-container table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.temp-pdf-container table, .temp-pdf-container th, .temp-pdf-container td {
    border: 1px solid #ddd;
}

.temp-pdf-container th, .temp-pdf-container td {
    padding: 8px;
    text-align: left;
}

.temp-pdf-container th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.temp-pdf-container p {
    margin: 8px 0;
}

.temp-pdf-container h1, .temp-pdf-container h2, .temp-pdf-container h3, 
.temp-pdf-container h4, .temp-pdf-container h5, .temp-pdf-container h6 {
    margin: 16px 0 8px 0;
    font-weight: bold;
}

.temp-pdf-container h1 { font-size: 24px; }
.temp-pdf-container h2 { font-size: 20px; }
.temp-pdf-container h3 { font-size: 18px; }
.temp-pdf-container h4 { font-size: 16px; }
.temp-pdf-container h5 { font-size: 14px; }
.temp-pdf-container h6 { font-size: 12px; }

.temp-pdf-container ul, .temp-pdf-container ol {
    margin: 8px 0;
    padding-left: 20px;
}

.temp-pdf-container li {
    margin: 4px 0;
}

.temp-pdf-container blockquote {
    margin: 10px 0;
    padding: 10px;
    border-left: 4px solid #ddd;
    background-color: #f9f9f9;
}

.temp-pdf-container pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
}

.temp-pdf-container code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.temp-pdf-container strong, .temp-pdf-container b {
    font-weight: bold;
}

.temp-pdf-container em, .temp-pdf-container i {
    font-style: italic;
}

.temp-pdf-container u {
    text-decoration: underline;
}

.temp-pdf-container s, .temp-pdf-container strike {
    text-decoration: line-through;
}

.temp-pdf-container sup {
    vertical-align: super;
    font-size: smaller;
}

.temp-pdf-container sub {
    vertical-align: sub;
    font-size: smaller;
}
