/* Image Compressor CSS */
.editor-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 25px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-header span {
    font-family: monospace;
    font-weight: bold;
    color: var(--accent-color);
}

.custom-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
    transition: transform 0.1s ease;
}

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

.stats-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--surface-border);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item .stat-lbl {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-item .stat-value {
    font-family: monospace;
    font-weight: 600;
}

.text-highlight {
    color: var(--accent-color);
}

.highlight-item {
    border-top: 1px solid var(--surface-border);
    padding-top: 10px;
    margin-top: 5px;
}

.highlight-item .stat-value {
    color: #27c93f;
    font-weight: bold;
    font-size: 1.1rem;
}

.download-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1.05rem;
    background: linear-gradient(135deg, #06d6a0, #11998e);
    border: none;
    box-shadow: 0 10px 20px rgba(6, 214, 160, 0.25);
}

.download-btn:hover {
    box-shadow: 0 15px 30px rgba(6, 214, 160, 0.45);
    transform: translateY(-3px);
}

/* Right Visual Panel */
.visual-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: 4px;
    align-self: flex-start;
}

.toggle-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toggle-tab:hover {
    color: var(--text-primary);
}

.toggle-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.image-viewer {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    max-height: 550px;
    overflow: hidden;
}

.image-viewer img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%), 
                      linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%), 
                      linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Responsive */
@media (max-width: 900px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .image-viewer {
        min-height: 250px;
    }
}
