/* ========================================
   PDFWorld - Tool Stage Styles
   Upload, Settings, Processing, Download
   ======================================== */

/* ========================================
   STAGE 2: UPLOAD UI (Shared)
   ======================================== */

.upload-stage {
    padding: 0.5rem 0;
}

.upload-area {
    border: 2px dashed #E0E7FF;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #F9FAFB;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-600);
    background: #EEF2FF;
    transform: translateY(-2px);
}

.upload-area.drag-over {
    border-color: var(--primary-600);
    background: #EEF2FF;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.upload-icon-circle {
    width: 72px;
    height: 72px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: var(--shadow-md);
    font-size: 2.25rem;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.upload-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.upload-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   STAGE 3: TOOL SETTINGS (Tool-Specific)
   ======================================== */

.settings-stage {
    padding: 1.5rem 0;
}

.tool-settings {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.settings-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.btn-change {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change:hover {
    border-color: var(--primary-600);
    color: var(--primary-600);
}

/* File List (for merge, organize tools) */
.file-list {
    margin: 1.5rem 0;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-600);
}

.file-icon-circle {
    width: 48px;
    height: 48px;
    background: #FEF2F2;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-remove {
    padding: 0.5rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    color: #DC2626;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: #DC2626;
    color: white;
}

/* Options Grid (for compression, quality settings) */
.option-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* ========================================
   STAGE 4A: PROCESSING UI (Shared)
   ======================================== */

.processing-stage {
    text-align: center;
    padding: 2rem;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.processing-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.processing-status {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    margin: 1.5rem auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

/* ========================================
   STAGE 4B: SUCCESS/DOWNLOAD UI (Shared)
   ======================================== */

.download-stage {
    text-align: center;
    padding: 2rem;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: #ECFDF5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #059669;
    font-size: 2.25rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.success-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-600);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.btn-download-all {
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary-action {
    padding: 1rem 2rem;
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-action:hover {
    border-color: var(--primary-600);
    color: var(--primary-600);
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
    min-height: calc(100vh - 140px);
}

.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
}

.tool-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.tool-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}