:root {
    --primary-color: #2563eb;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --bg-surface: #ffffff;
    --bg-subtle: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(37, 99, 235, 0.08);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.bulk-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 15px 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header Section */
.bulk-hero-header {
    text-align: center;
    margin-bottom: 30px;
}

.bulk-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.bulk-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.bulk-hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}

/* Ultra Modern Drop Zone */
.bulk-drop-card {
    background: var(--bg-surface);
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 45px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.bulk-drop-card:hover,
.bulk-drop-card.drag-over {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.bulk-icon-circle {
    width: 72px;
    height: 72px;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    transition: transform 0.3s ease;
}

.bulk-drop-card:hover .bulk-icon-circle {
    transform: scale(1.1) rotate(-5deg);
    background: #2563eb;
}

.bulk-icon-circle svg {
    width: 36px;
    height: 36px;
    fill: #2563eb;
    transition: fill 0.3s ease;
}

.bulk-drop-card:hover .bulk-icon-circle svg {
    fill: #ffffff;
}

.bulk-select-btn {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.bulk-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    color: #ffffff;
}

.bulk-format-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.format-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Controls Panel Dashboard */
.bulk-dashboard {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 10px;
    box-shadow: var(--shadow-sm);
}

.dashboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Preset Pills */
.preset-pills {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.preset-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover,
.preset-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Segmented Format Switcher */
.segmented-control {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    gap: 2px;
}

.segment-item {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.segment-item.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Modern Slider */
.bulk-slider-container {
    position: relative;
    width: 100%;
    height: 10px;
    margin-top: 10px;
}

.bulk-slider-track {
    width: 100%;
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(to right, #2563eb 0%, #2563eb 80%, #e2e8f0 80%, #e2e8f0 100%);
    transition: background 0.15s ease;
}

.bulk-real-slider {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
}

/* Main Action Buttons */
.action-btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-add-more {
    background: #f1f5f9;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-more:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.btn-compress-main {
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-compress-main:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-zip-main {
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-zip-main:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.stat-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.stat-card-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
}

.stat-card-value.saved {
    color: #059669;
}

/* Progress Bar */
.progress-wrap {
    margin-top: 20px;
}

.progress-track-bg {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #10b981);
    transition: width 0.3s ease;
}

/* Queue Cards Grid & List Toggle */
.queue-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    margin-bottom: 16px;
}

.queue-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.view-toggle-btns {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
}

.view-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
}

.view-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Cards Grid */
.cards-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.cards-list-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Card Component */
.bulk-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cards-list-layout .bulk-item-card {
    flex-direction: row;
    align-items: center;
    padding: 10px 16px;
}

.bulk-item-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.cards-list-layout .bulk-item-card:hover {
    transform: none;
}

.card-preview-thumb {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8fafc;
    margin-bottom: 12px;
}

.cards-list-layout .card-preview-thumb {
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    margin-right: 14px;
    flex-shrink: 0;
}

.card-file-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-file-size {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-badge-status {
    margin-top: 8px;
}

.cards-list-layout .card-badge-status {
    margin-top: 0;
    margin-left: auto;
    margin-right: 16px;
}

.card-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.cards-list-layout .card-actions-bar {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: #2563eb;
    border-color: #93c5fd;
}

.icon-btn-danger:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* Completion Modal Overlay */
.bulk-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.bulk-modal-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 580px;
    width: 100%;
    padding: 28px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bulk-modal-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.bulk-modal-close-btn:hover {
    color: #1e293b;
}

.bulk-modal-icon-wrap {
    width: 56px;
    height: 56px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.bulk-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.bulk-modal-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 18px;
}

/* Modal Selection Bar & List */
.bulk-modal-select-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 12px 12px 0 0;
    margin-bottom: -1px;
}

.bulk-modal-file-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    margin-bottom: 20px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.modal-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.modal-file-item:last-child {
    border-bottom: none;
}

.modal-file-item:hover {
    background: #f8fafc;
}

.modal-file-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

.modal-file-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.modal-file-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-file-size {
    font-size: 11px;
    color: #64748b;
}

.bulk-modal-actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-zip-download-modal {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.btn-zip-download-modal:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-individual-download-modal {
    background: #f1f5f9;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-individual-download-modal:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #93c5fd;
}

.bulk-modal-close-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}