* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

svg {
    fill: none !important;
    width: auto;
    height: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    color: #333;
    overflow-x: 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 {
    max-width: 1100px;
    height: calc(100vh - 81px);
    align-content: center;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Step Content */
.step-content {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-panel {
    display: none;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.step-panel.active {
    display: block;
}

.step-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.step-title {
    font-size: 28px;
    font-weight: 600;
    margin-top: 10px !important;
}

.step-description {
    font-size: 16px;
    color: #999;
    margin-top: -5px;
    margin-bottom: 40px !important;
}

/* Step 1: Import */
.upload-area {
    max-width: 400px;
    margin: 40px auto;
}

.upload-button {
    background: #ff6154;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.upload-button:hover {
    background: #e5554a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 97, 84, 0.3);
}

.file-input {
    display: none;
}

.file-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    text-align: left;
    display: none;
    max-width: 500px;
}

.file-info-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.file-info-preview {
    width: 80px;
    height: 100px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.file-info-preview canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.file-info-details {
    flex: 1;
}

.file-info h4 {
    color: #ff6154;
    margin-bottom: 12px;
}

.file-info p {
    color: #666;
    margin: 4px 0;
}

.continue-btn-wrapper {
    margin-top: 20px;
    text-align: center;
}

/* Step 2: Password */
.password-container {
    max-width: 540px;
    margin: 0 auto;
}

.custom-input-container {
    position: relative;
    margin-bottom: 32px;
}

.custom-input {
    width: 100%;
    height: 60px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 0 20px;
    font-size: 16px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.custom-input:focus {
    border-color: #ff6154;
    box-shadow: 0 0 0 4px rgba(255, 97, 84, 0.1);
}

.custom-input.error {
    border-color: #d93025;
}

.custom-input.error:focus {
    border-color: #d93025;
    box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.1);
}

.custom-input.success {
    border-color: #10b981;
}

.custom-input.success:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.custom-input.warning {
    border-color: #f59e0b;
}

.custom-input.warning:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.custom-input:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.input-label {
    position: absolute;
    left: 20px;
    top: 20px;
    opacity: 0.5;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    padding: 0 4px;
    line-height: 1;
}

.custom-input:focus + .input-label,
.custom-input:not(:placeholder-shown) + .input-label {
    top: -20px;
    font-size: 12px;
    color: #ff6154;
}

.custom-input.error:focus + .input-label,
.custom-input.error:not(:placeholder-shown) + .input-label {
    color: #d93025;
}

.custom-input.success:focus + .input-label,
.custom-input.success:not(:placeholder-shown) + .input-label {
    color: #10b981;
}

.custom-input.warning:focus + .input-label,
.custom-input.warning:not(:placeholder-shown) + .input-label {
    color: #f59e0b;
}

.password-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #d93025;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
    pointer-events: none;
}

.password-error.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.password-error.success {
    color: #10b981;
}

.password-error.warning {
    color: #f59e0b;
}

.password-error svg {
    width: 18px;
    height: 18px;
    stroke: #d93025;
    flex-shrink: 0;
    transition: stroke 0.3s ease;
}

.password-error.success svg {
    stroke: #10b981;
}

.password-error.warning svg {
    stroke: #f59e0b;
}

.password-error span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.try-again-link {
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.try-again-link:hover {
    opacity: 0.8;
}

/* Password Save Modal */
.password-save-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(1px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.password-save-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.password-save-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 580px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.password-save-modal-overlay.show .password-save-modal {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 84px;
    height: 84px;
    background: none;
    border: 4px solid #ff6154;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-icon svg {
    width: 42px;
    height: 42px;
    stroke: #ff6154;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 42px;
    text-align: center;
}

.modal-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 34px;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
}

.security-note svg {
    width: 16px;
    height: 16px;
    stroke: #10b981;
}

.modal-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.modal-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ff6154;
    transition: all 0.2s ease;
}

.modal-checkbox label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: white;
}

.modal-btn-never {
    display: none;
    background: #f3f4f6;
    color: #6b7280;
}

.modal-btn-never:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-btn-no {
    background: #f3f4f6;
    color: #374151;
}

.modal-btn-no:hover {
    background: #e5e7eb;
}

.modal-btn-yes {
    background: #ff6154;
    color: white;
    flex: 1.2;
}

.modal-btn-yes:hover {
    background: #e5554a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 97, 84, 0.3);
}

/* Saved Passwords Container */
.saved-passwords-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.saved-passwords-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.password-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.password-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6154 0%, #ff8a7a 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-pill-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.password-pill-icon {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    transition: stroke 0.3s ease;
}

.password-pill-text {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.password-pill-delete {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 4px;
}

.password-pill-delete svg {
    width: 12px;
    height: 12px;
    stroke: #6b7280;
    transition: stroke 0.3s ease;
}

.password-pill:hover {
    border-color: #ff6154;
    background: #fff5f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 97, 84, 0.15);
}

.password-pill:hover .password-pill-icon,
.password-pill:hover .password-pill-delete svg {
    stroke: #ff6154;
}

.password-pill:hover .password-pill-delete {
    background: rgba(255, 97, 84, 0.1);
}

.password-pill.selected {
    border-color: #ff6154;
    background: #ff6154;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 97, 84, 0.3);
}

.password-pill.selected::before {
    opacity: 1;
}

.password-pill.selected .password-pill-icon,
.password-pill.selected .password-pill-delete svg {
    stroke: white;
}

.password-pill.selected .password-pill-delete {
    background: rgba(255, 255, 255, 0.2);
}

.password-pill.selected:hover .password-pill-delete {
    background: rgba(255, 255, 255, 0.3);
}

.password-pill.checking {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* Step 3: Quality */
.preview-container {
    max-width: 900px;
    margin: 0 auto;
}

.preview-quality-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 32px;
}

.pdf-preview {
    background: #cccccc10;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    overflow: hidden;
}

.pdf-preview canvas {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.preview-placeholder {
    color: #666;
    font-size: 16px;
}

.quality-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quality-option {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    text-align: left;
}

.quality-option:hover {
    border-color: #ff6154;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.quality-option.selected {
    border-color: #ff6154;
    background: #ff615410;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(255, 97, 84, 0.25);
}

.quality-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.quality-description {
    font-size: 13px;
    color: #666;
}

@media (max-width: 768px) {
    .preview-quality-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pdf-preview {
        min-height: 300px;
    }

    .quality-options {
        flex-direction: row;
        gap: 12px;
    }

    .quality-option {
        flex: 1;
        text-align: center;
    }

    .quality-option:hover {
        transform: translateY(-4px);
    }

    .quality-option.selected {
        transform: translateY(-4px);
    }
    
    .password-save-modal {
        padding: 32px 24px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
    
    .modal-btn-yes {
        order: -1;
    }
}

/* Step 4: Download */
.download-container {
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
}

.file-result-card {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ff6154;
}

.file-details {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.file-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.status-badge {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.status-badge svg {
    width: 16px;
    height: 16px;
    stroke: white;
}

.download-btn-group {
    margin-bottom: 16px;
    position: relative;
}

.download-btn-wrapper {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-download-main {
    background: #ff6154;
    color: white;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-download-main:hover {
    background: #e5554a;
}

.btn-download-main svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.btn-download-dropdown {
    background: #ff6154;
    color: white;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-download-dropdown:hover {
    background: #e5554a;
}

.btn-download-dropdown svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.download-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 240px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.download-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: white;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
    flex-shrink: 0;
}

.dropdown-item:hover svg {
    stroke: #ff6154;
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.dropdown-item:hover .dropdown-item-title {
    color: #ff6154;
}

.dropdown-item-subtitle {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: -15px;
}

.action-btn {
    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;
}

.action-btn:first-child {
    flex: 2;
}

.action-btn:nth-child(2),
.action-btn:nth-child(3) {
    flex: 1;
}

.action-btn:hover {
    background: #fff5f4;
}

.action-btn svg {
    width: 24px;
    height: 24px;
    stroke: #6b7280;
    transition: stroke 0.2s ease;
}

.action-btn:hover svg {
    stroke: #ff6154;
}

.btn-flatten-another {
    background: transparent;
    color: #ff6154;
    border: 2px solid #ff6154;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-flatten-another:hover {
    background: #fff5f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 97, 84, 0.1);
}

/* Buttons */
.btn {
    background: #ff6154;
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 8px;
}

.btn:hover {
    background: #e5554a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 97, 84, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #ff6154 !important;
    border: 2px solid #ff6154;
}

.btn-secondary:hover {
    background: transparent !important;
    box-shadow: 0 4px 15px rgba(255, 97, 84, 0.1);
}

.btn:disabled {
    background: #cccccc20;
    color: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

.btn-loading span {
    visibility: hidden;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

.error-message {
    color: #d93025;
    background: #fce8e6;
    border-radius: 12px;
    padding: 16px;
    margin: 20px auto;
    display: none;
    max-width: 400px;
}

.warning-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #f59e0b;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px auto 0;
    max-width: 400px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.warning-message.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.warning-message svg {
    width: 20px;
    height: 20px;
    stroke: #f59e0b;
    flex-shrink: 0;
}

.warning-message span {
    flex: 1;
    text-align: left;
}
/* Password Inputs Group */
.password-inputs-group {
    margin-bottom: 28px;
}

.password-inputs-group .custom-input-container {
    margin-bottom: 24px;
}

.password-inputs-group .custom-input-container:last-child {
    margin-bottom: 0;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.button-group .btn {
    flex: 1;
    max-width: 200px;
    margin: 0;
}

.btn-primary {
    background: #ff6154;
    color: white !important;
}

.btn-primary:hover {
    background: #e5554a;
}

/* Saved Passwords adjustments */
.saved-passwords-container {
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: column-reverse;
    }
    
    .button-group .btn {
        max-width: 100%;
        width: 100%;
    }
}


/* Step 3: Download - Layout Only (Keep Original Element Styling) */
.download-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 600px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

/* Preview Section - New */
.download-preview-section {
    position: sticky;
    top: 20px;
    justify-items: center;
}

.preview-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 14px;
    text-align: center;
    width: max-content;
    height: max-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#downloadPreviewCanvas {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Download Options Section - New */
.download-options-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 450px;
    justify-self: center;
}

/* Responsive */
@media (max-width: 900px) {
    .download-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .download-preview-section {
        position: relative;
        top: 0;
    }
    
    .preview-box {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .download-layout {
        gap: 24px;
    }
    
    .preview-box {
        padding: 20px;
        min-height: 350px;
    }
}