/* PDF Magazine Converter Styles */
.pdf-magazine-converter {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    position: relative;
}

.pdf-magazine-converter * {
    box-sizing: border-box;
}

/* Upload Interface */
.pmc-upload-container {
    max-width: 800px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.pmc-upload-container h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #222;
}

.pmc-upload-container p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.pmc-upload-area {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 60px 40px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}.pmc-upload-area:hover,
.pmc-upload-area.drag-over {
    border-color: #e74c3c;
    background: #fff5f5;
}

.pmc-upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    fill: #ddd;
}

.pmc-upload-area:hover .pmc-upload-icon,
.pmc-upload-area.drag-over .pmc-upload-icon {
    fill: #e74c3c;
}

.pmc-upload-button {
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pmc-upload-button:hover {
    background: #c0392b;
}/* File Info */
.pmc-file-info {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 6px;
}

.pmc-file-name {
    font-weight: 600;
    color: #333;
}

.pmc-file-size {
    color: #666;
    font-size: 0.875rem;
}

/* Processing Indicator */
.pmc-processing {
    display: none;
    text-align: center;
    padding: 40px;
}

.pmc-processing.active {
    display: block;
}

.pmc-processing-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: pmc-spin 1s linear infinite;
}@keyframes pmc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pmc-progress-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

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

/* Magazine Display */
.pmc-magazine-container {
    display: none;
    min-height: 100vh;
    background: white;
    position: relative;
}

.pmc-magazine-container.active {
    display: block;
}/* Fixed Header */
.pmc-magazine-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.pmc-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.pmc-magazine-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.pmc-header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}.pmc-control-button {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.pmc-control-button:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.pmc-reading-progress {
    height: 3px;
    background: #e74c3c;
    width: 0%;
    transition: width 0.3s ease;
}

/* Page Content */
.pmc-magazine-content {
    margin-top: 80px;
    padding-bottom: 100px;
}

.pmc-magazine-page {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 40px 20px;
    background: white;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}.pmc-magazine-page.visible {
    opacity: 1;
    transform: translateY(0);
}

.pmc-page-number {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #999;
    font-size: 0.875rem;
}

.pmc-page-content {
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

.pmc-page-content canvas {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Navigation */
.pmc-page-nav {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1001;
}.pmc-nav-button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.875rem;
}

.pmc-nav-button:hover {
    background: #c0392b;
}

.pmc-nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#pmcPageInfo {
    font-size: 0.875rem;
    color: #666;
    min-width: 60px;
    text-align: center;
}

/* TOC Sidebar */
.pmc-toc-sidebar {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: white;
    padding: 0;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 1002;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}.pmc-toc-sidebar.active {
    right: 0;
}

.pmc-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
}

.pmc-toc-header h3 {
    margin: 0;
    color: #333;
}

.pmc-close-toc {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}.pmc-close-toc:hover {
    color: #333;
}

#pmcTocNav {
    padding: 1rem;
}

.pmc-toc-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
}

.pmc-toc-item:hover {
    background: #f5f5f5;
    color: #333;
}

.pmc-toc-item.active {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    font-weight: 600;
}

/* Zoom Controls */
.pmc-zoom-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1001;
}.pmc-zoom-button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.pmc-zoom-button:hover {
    background: #e5e5e5;
}

.pmc-zoom-level {
    font-size: 0.875rem;
    color: #666;
    min-width: 50px;
    text-align: center;
}

/* Loading states */
.pmc-page-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 800px;
    color: #999;
}

/* Fullscreen mode */
.pmc-magazine-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: white;
}/* Responsive Design */
@media (max-width: 768px) {
    .pmc-upload-container {
        padding: 20px;
        margin: 20px;
    }
    
    .pmc-upload-container h1 {
        font-size: 1.8rem;
    }
    
    .pmc-upload-area {
        padding: 40px 20px;
    }
    
    .pmc-magazine-page {
        padding: 20px 10px;
    }
    
    .pmc-header-content {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .pmc-header-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .pmc-control-button {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .pmc-zoom-controls,
    .pmc-page-nav {
        bottom: 10px;
        transform: scale(0.9);
    }
    
    .pmc-toc-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .pmc-page-content {
        min-height: 500px;
    }
}

/* Print Styles */
@media print {
    .pmc-magazine-header,
    .pmc-page-nav,
    .pmc-zoom-controls,
    .pmc-toc-sidebar {
        display: none !important;
    }
    
    .pmc-magazine-content {
        margin-top: 0;
    }
    
    .pmc-magazine-page {
        page-break-after: always;
        box-shadow: none;
    }
}

/* Error States */
.pmc-error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}