.hidden {
    display: none !important;
}

svg {
    fill: none;
}

body {
    overflow-x: hidden;
}

body.download-active {
    height: calc(100vh - 81px);
    overflow-y: visible;
}

body.selection-active {
    overflow-y: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-screen.active {
    opacity: 1;
    pointer-events: all;
}

.loading-bar-container {
    width: 300px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    position: absolute;
    height: 100%;
    background: #ff6154;
    border-radius: 2px;
    width: 40%;
    will-change: transform;
    animation: loading 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(200%);
    }
    100% {
        transform: translateX(500%);
    }
}

.loading-text {
    font-size: 15px;
    color: #666;
    font-weight: 500;
}

.container {
    background-color: transparent;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 16px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto 10px auto;
    overflow: visible;
}

/* Upload Area */
.upload-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 12px;
    flex-wrap: wrap;
}

.file-input-label {
    display: inline-block;
    padding: 16px 48px;
    background-color: #ff6154;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    flex-shrink: 0;
}

.file-input-label:hover {
    background: #e5554a;
    box-shadow: 0 4px 12px rgba(255, 97, 84, 0.4);
    transform: translateY(-1px);
}

.file-input-label.drag-over {
    background-color: #e5554a;
    transform: scale(1.05);
}

input[type="file"] {
    display: none;
}

/* Selection Panel - Split View Layout */
.selection-panel {
    margin-top: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    position: fixed;
    top: 81px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 81px);
}

.selection-content {
    display: flex;
    gap: 0;
    align-items: stretch;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Left side - Files Preview */
.files-preview-section {
    flex: 1;
    background: none;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow-y: auto;
    margin-right: 450px;
    box-sizing: border-box;
}

/* Large File Preview Card */
.file-preview-large {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 48px;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.file-preview-large:hover {
    border-color: #ff6154;
    box-shadow: 0 8px 24px rgba(255, 97, 84, 0.12);
}

.file-preview-icon-large {
    width: 100%;
    max-width: 280px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.file-preview-thumbnail {
    width: 100%;
    max-width: 180px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.file-preview-thumbnail canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.file-preview-icon-large svg {
    width: 64px;
    height: 64px;
    stroke: #ff6154;
    fill: none;
}

.file-preview-details {
    width: 100%;
}

.file-preview-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
    line-height: 1.4;
}

.file-preview-size {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

.file-change-btn {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.file-change-btn:hover {
    border-color: #ff6154;
    color: #ff6154;
    background: #fff5f4;
}

.file-change-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Right side - Controls Panel (Fixed Overlay) */
.controls-panel {
    position: fixed;
    right: 0;
    top: 81px;
    width: 450px;
    box-sizing: border-box;
    padding: 40px;
    padding-top: 20px;
    padding-bottom: 0;
    height: calc(100vh - 81px);
    background: white;
    border-left: 2px solid #e5e7eb;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    z-index: 100;
}

.control-section {
    margin-bottom: 24px;
}

.control-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.controls-divider {
    height: 2px;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 50%, transparent 50%);
    background-size: 8px 2px;
    margin: 24px 0;
}

/* Suggestions Container */
.suggestions-container {
    margin-top: 16px;
}

/* Suggestions Label */
.suggestions-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Smart Suggestions Pills */
.suggestion-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.suggestion-pill {
    padding: 6px 12px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.suggestion-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 97, 84, 0.1) 0%, rgba(255, 97, 84, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-pill:hover {
    border-color: #ff6154;
    color: #ff6154;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 97, 84, 0.15);
}

.suggestion-pill:hover::before {
    opacity: 1;
}

.suggestion-pill:active {
    transform: translateY(0);
}

.suggestion-pill .pill-content {
    position: relative;
    z-index: 1;
}

/* OR Divider */
.controls-divider-text {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    position: relative;
}

.controls-divider-text::before,
.controls-divider-text::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 50%, transparent 50%);
    background-size: 8px 2px;
}

.controls-divider-text span {
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.preset-option {
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.preset-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 97, 84, 0.05) 0%, rgba(255, 97, 84, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preset-option:hover {
    border-color: #ff6154;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 97, 84, 0.12);
}

.preset-option:hover::before {
    opacity: 1;
}

.preset-option.active {
    border-color: #ff6154;
    background: linear-gradient(135deg, rgba(255, 97, 84, 0.08) 0%, rgba(255, 97, 84, 0.04) 100%);
    box-shadow: 0 4px 12px rgba(255, 97, 84, 0.15);
}

.preset-option.active::before {
    opacity: 0;
}

.preset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.preset-option h4 {
    font-size: 1rem;
    color: #1f2937;
    margin: 0;
    font-weight: 700;
}

.preset-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: #ff6154;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}

.preset-desc {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 4px 0;
    position: relative;
    z-index: 1;
}

.preset-size {
    color: #10b981;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 4px 0 0 0;
    position: relative;
    z-index: 1;
}

/* Target Size Warning */
.target-size-warning {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    color: #f59e0b;
    margin-bottom: 12px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.target-size-warning svg {
    width: 18px;
    height: 18px;
    stroke: #f59e0b;
    flex-shrink: 0;
}

.target-size-warning.show {
    opacity: 1;
    max-height: 50px;
}

/* Custom Mode */
.custom-size-input {
    margin-bottom: 0;
}

.size-input-group {
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 12px;
}

.size-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
    font-weight: 600;
    color: #1f2937;
}

.size-input-group input:focus {
    outline: none;
    border-color: #ff6154;
    box-shadow: 0 0 0 3px rgba(255, 97, 84, 0.1);
}

.size-input-group input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.unit-toggle {
    min-width: 70px;
    padding: 12px 20px;
    background: white;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
}

.unit-toggle:hover {
    color: #ff6154;
    border-color: #ff6154;
}

.unit-toggle:active {
    transform: scale(0.97);
}

.help-text {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 6px;
}

/* Extract Actions */
.extract-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-extract {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.btn-extract.single {
    background-color: #ff6154;
    color: white;
}

.btn-extract.single:hover:not(:disabled) {
    background: #e5554a;
    box-shadow: 0 6px 16px rgba(255, 97, 84, 0.4);
    transform: translateY(-2px);
}

.btn-extract:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-extract svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    flex-shrink: 0;
}

.btn-extract-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.btn-extract-title {
    font-size: 1rem;
    font-weight: 700;
}

.btn-extract-desc {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Download Screen */
.download-screen {
    display: none;
    padding: 0;
    max-width: 100%;
    margin: 0;
    min-height: calc(100vh - 81px);
    background: #f8f9fa;
}

.download-screen.active {
    display: block;
}

.download-content {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 81px);
}

.pdf-preview-section {
    flex: 1;
    background: #f8f9fa;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    margin-right: 450px;
    height: calc(100vh - 81px);
    box-sizing: border-box;
}

.preview-canvas-container {
    width: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    margin-bottom: 20px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-page-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
}

.preview-page-wrapper canvas {
    width: 100%;
    height: auto;
    display: block;
}

.page-number-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Compression Stats Panel (Right Side) */
.compression-stats-panel {
    margin-bottom: 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.compression-stats-panel .stats-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
    padding: 8px;
}

.compression-stats-panel .stat-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compression-stats-panel .stat-label {
    font-size: 0.75rem;
    color: #9ca3afad;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compression-stats-panel .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.compression-stats-panel .stat-box.saved {
    background: #10b9810a;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    grid-row: 1 / 3;
}

.compression-stats-panel .stat-box.saved .stat-label {
    color: #10b981;
    font-size: 0.75rem;
}

.compression-stats-panel .stat-box.saved .stat-value {
    color: #10b981;
    font-size: 2.5rem;
    font-weight: 800;
}

.download-actions-section {
    position: fixed;
    right: 0;
    top: 81px;
    width: 450px;
    height: calc(100vh - 81px);
    background: white;
    border-left: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 40px 32px;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
}

.back-button {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    position: absolute;
    margin-top: -10px;
    left: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: none;
    color: #ff6154;
    box-shadow: none;
    transform: translateX(-2px);
}

.back-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

#download-files-list {
    margin-top: 50px;
    margin-bottom: 24px;
}

.single-file-card {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.single-file-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.single-file-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ff6154;
    fill: none;
}

.single-file-details {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.single-file-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.single-file-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.done-button {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.done-button svg {
    width: 16px;
    height: 16px;
    stroke: white;
    fill: none;
}

.download-primary {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #ff6154;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-bottom: 16px;
}

.download-primary:hover {
    background: #e5554a;
    box-shadow: 0 6px 16px rgba(255, 97, 84, 0.4);
    transform: translateY(-2px);
}

.download-primary svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
}

.action-buttons-grid {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: -6px;
    margin-bottom: 10px;
}

.action-button {
    background: #f7f8f9;
    border: none;
    color: #374151;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    flex: 1;
}

#shareAction {
    flex: 2;
}

#printAction,
#deleteAction {
    flex: 1;
}

.action-button:hover {
    background: #fff5f4;
}

.action-button svg {
    width: 24px;
    height: 24px;
    stroke: #6b7280;
}

.action-button:hover svg {
    stroke: #ff6154;
}

.extract-another-btn {
    width: 100%;
    padding: 14px 32px;
    background: transparent;
    color: #ff6154;
    border: 2px solid #ff6154;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.extract-another-btn:hover {
    background: #fff5f4;
    box-shadow: 0 4px 12px rgba(255, 97, 84, 0.2);
}

/* Hide elements when showing download screen */
.content-hidden {
    display: none !important;
}

/* Global Scrollbar Styling */
.controls-panel::-webkit-scrollbar,
.files-preview-section::-webkit-scrollbar,
.pdf-preview-section::-webkit-scrollbar,
.download-actions-section::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.controls-panel::-webkit-scrollbar-track,
.files-preview-section::-webkit-scrollbar-track,
.pdf-preview-section::-webkit-scrollbar-track,
.download-actions-section::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.controls-panel::-webkit-scrollbar-thumb,
.files-preview-section::-webkit-scrollbar-thumb,
.pdf-preview-section::-webkit-scrollbar-thumb,
.download-actions-section::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.controls-panel::-webkit-scrollbar-thumb:hover,
.files-preview-section::-webkit-scrollbar-thumb:hover,
.pdf-preview-section::-webkit-scrollbar-thumb:hover,
.download-actions-section::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

@media (max-width: 1200px) {
    .controls-panel {
        width: 380px;
    }
    
    .files-preview-section {
        margin-right: 380px;
    }
    
    .download-actions-section {
        width: 380px;
    }
    
    .pdf-preview-section {
        margin-right: 380px;
    }
}

@media (max-width: 968px) {
    body.selection-active {
        overflow-y: auto;
    }

    .selection-panel {
        position: relative;
        height: auto;
        min-height: calc(100vh - 81px);
    }

    .selection-content {
        flex-direction: column;
        height: auto;
    }

    .controls-panel {
        position: relative;
        width: 100%;
        height: auto;
        top: 0;
        border-left: none;
        border-bottom: 2px solid #e5e7eb;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
        order: 1;
    }

    .files-preview-section {
        margin-right: 0;
        height: auto;
        order: 2;
        padding: 32px 24px;
        overflow-y: visible;
    }

    .download-screen {
        position: relative;
        height: auto;
        min-height: calc(100vh - 81px);
    }

    .download-content {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 81px);
    }

    .download-actions-section {
        position: relative;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 2px solid #e5e7eb;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
    }

    .pdf-preview-section {
        margin-right: 0;
        padding: 100px 20px 20px 20px;
        height: auto;
        min-height: 50vh;
    }

    .back-button {
        top: 20px;
        left: 20px;
    }

    .suggestion-pills {
        gap: 5px;
    }

    .suggestion-pill {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .suggestions-label {
        font-size: 0.7rem;
        margin-top: 12px;
    }

    .preset-grid {
        gap: 8px;
    }

    .preset-option {
        padding: 14px;
    }

    .size-input-group {
        padding: 5px;
    }

    .size-input-group input,
    .unit-toggle {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .unit-toggle {
        min-width: 65px;
    }

    .compression-stats-panel {
        margin-bottom: 16px;
        padding: 16px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .compression-stats-panel .stats-column {
        gap: 12px;
    }

    .compression-stats-panel .stat-row {
        gap: 4px;
    }

    .compression-stats-panel .stat-label {
        font-size: 0.7rem;
    }

    .compression-stats-panel .stat-value {
        font-size: 1.1rem;
    }

    .compression-stats-panel .stat-box.saved {
        padding: 18px;
        grid-row: auto;
    }

    .compression-stats-panel .stat-box.saved .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .files-preview-section {
        padding: 24px 16px 40px 16px;
        min-height: auto;
    }
    
    .files-header h2 {
        font-size: 1.5rem;
    }
    
    .selection-subtitle {
        font-size: 0.9rem;
    }
    
    .controls-panel {
        padding: 24px 16px;
    }

    .pdf-preview-section {
        padding: 80px 16px 24px 16px;
    }

    .download-actions-section {
        padding: 24px 16px;
    }

    .back-button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .compression-stats {
        grid-template-columns: 1fr;
    }
}