/* ===== Image Compressor – Clean Professional Style ===== */

.ic-container {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: Arial, Helvetica, sans-serif;
}

/* Headings */
.ic-title {
    text-align: center;
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ic-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
}

/* Upload Box */
.ic-upload-box {
    border: 2px dashed #cfd4da;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: #fff;
}

.ic-upload-box p {
    font-size: 16px;
    color: #495057;
}

/* Buttons */
.ic-btn-primary {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

.ic-btn-primary:hover { background: #0b5ed7; }

.ic-btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.ic-btn-success {
    background: #198754;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* Controls */
.ic-controls {
    margin-top: 10px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 14px 16px;
}

.ic-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#icSlider { height: 4px; }

.ic-percent {
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.ic-slider-row input[type="range"] { flex: 1; }

/* Preview Layout */
.ic-preview-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
    align-items: flex-start;
}

/* Preview Grid */
.ic-preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
    flex: 1;
}

/* Image Card (Compact Version) */
.ic-image-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    background: #fff;
    transition: all .15s ease;
}

.ic-image-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.ic-image-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.ic-image-card p {
    font-size: 14px;
    margin: 8px 0;
}

.ic-image-download {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 13px;
    background: #0d6efd;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.ic-image-download:hover { background: #0b5ed7; }

/* Add Images Card */
.ic-add-card {
    width: 160px;
    height: 200px;
    border: 2px dashed #cfd4da;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #555;
    transition: all .2s ease;
}

.ic-add-card:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background: #f8fbff;
}

.ic-add-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 6px;
}

/* Download Section */
.ic-download {
    display: flex;
    align-items: flex-start;
}

/* Loader */
.ic-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: #495057;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Disabled */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast */
.ic-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #198754;
    color: #fff;
    font-size: 14px;
    display: none;
    z-index: 9999;
}


.icon-box {
    width: 85px;
    height: 85px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #4dabf7);
    border-radius: 18px;
    transition: all 0.3s ease;
}

.compressor-icon {
    font-size: 42px;
    color: #ffffff;
}

.tool-card {
    transition: all 0.3s ease;
}

.tool-card:hover .icon-box {
    transform: translateY(-6px);
}

.tool-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}


.ic-toast.error { background: #dc3545; }

/* Responsive */
@media (max-width: 600px) {
    .ic-slider-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ic-preview-wrapper {
        flex-direction: column;
    }

    .ic-add-card {
        width: 100%;
    }
}
