﻿/* ==========================================================================
   PUDEN DOCS - Image Compressor Styles
   ========================================================================== */

/* Workspace Container */
.workspace {
    max-width: 1120px;
    width: 100%;
    margin: 1.5rem auto 4.5rem;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Glassmorphic Base Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    background: rgba(17, 24, 39, 0.4);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    outline: none;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.dropzone-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
    transition: transform 0.25s ease;
}

.dropzone:hover .dropzone-icon {
    transform: scale(1.1);
    color: #fff;
    border-color: var(--accent-primary);
}

.dropzone-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.dropzone-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.dropzone-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    flex-wrap: wrap;
}

.dropzone-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Compression Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.setting-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.setting-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-title i {
    color: var(--accent-cyan);
}

/* Mode Switcher Tabs */
.mode-toggle {
    display: flex;
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.mode-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.mode-tab.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Sliders & Inputs */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    transition: background 0.2s;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
    transition: transform 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    min-width: 48px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-cyan);
    text-align: right;
}

/* Target Size Input Box */
.target-size-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.target-input-wrapper {
    position: relative;
    flex: 1;
}

.target-size-input {
    width: 100%;
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-glass);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.target-size-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.target-unit-select {
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* Quick Preset Pills */
.preset-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}

.pill-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.pill-btn.active {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
}

/* Select Form Controls */
.form-select {
    width: 100%;
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--accent-primary);
}

/* Toggle Checkbox Row */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Queue Actions Header */
.queue-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.35rem 1.75rem;
    border-radius: var(--radius-lg);
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--border-glass);
}

.stats-badges {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-item .stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
}

.stat-saved .stat-val {
    color: #34d399;
}

.queue-btn-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-zip-download {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: all 0.25s ease;
}

.btn-zip-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    filter: brightness(1.08);
}

.btn-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-sm);
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-all:hover {
    background: rgba(244, 63, 94, 0.2);
    color: #fff;
}

/* Image Queue Items */
.image-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.queue-item {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s ease;
}

.queue-item:hover {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(17, 24, 39, 0.7);
}

.item-thumb {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-glass);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.item-thumb:hover img {
    transform: scale(1.08);
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.item-metrics {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
}

.orig-size {
    color: var(--text-dim);
    text-decoration: line-through;
}

.comp-size {
    color: #34d399;
    font-weight: 700;
}

.savings-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-item-download {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-item-download:hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-item-preview {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-item-preview:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #fff;
}

.btn-item-remove {
    background: transparent;
    color: var(--text-dim);
    border: none;
    font-size: 1rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-item-remove:hover {
    color: #fb7185;
}

/* Preview Modal */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-glass);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }
}

.compare-col {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
}

.compare-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compare-img-box {
    max-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-sm);
}

.compare-img-box img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.compare-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
}