/* ========== IMAGE TOOLS STYLES ========== */
/* checkbox */
.form-check{
    display: grid;
}

/* ========== Filters Grid Layout ========== */
.filters-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Mobile first: 2 columns */
.filters-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Small tablets: 3 columns */
@media (min-width: 576px) {
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium screens: ensure at least 2 per row */
@media (min-width: 769px) and (max-width: 991px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
}

/* Medium-large screens: ensure better fit */
@media (min-width: 992px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* Large screens: more filters per row with better spacing */
@media (min-width: 1200px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1.25rem;
    }
}

/* ========== WATERMARK UI ENHANCEMENTS ========== */

/* Watermark Type Selection Enhanced */
.watermark-type-selection {
    margin-bottom: 2rem;
}

.type-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 769px) {
    .type-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.watermark-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 140px;
    justify-content: center;
}

.watermark-type-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.watermark-type-card.active {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.watermark-type-card .card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.watermark-type-card .card-content {
    flex-grow: 1;
}

.watermark-type-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.watermark-type-card .card-description {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

.watermark-type-card .card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.watermark-type-card.active .card-badge {
    opacity: 1;
}

/* Enhanced Controls Layout */
.watermark-controls-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.controls-primary-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 769px) {
    .controls-primary-row {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (min-width: 992px) {
    .controls-primary-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .controls-primary-row {
        grid-template-columns: 350px 300px 1fr;
        gap: 2rem;
    }
}

.control-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.control-panel .panel-header {
    background: white;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.control-panel .panel-header h3 {
    margin: 0;
    color: #2d3748;
    display: flex;
    align-items: center;
}

.control-panel .panel-content {
    padding: 1.25rem;
}

/* Adjustment Controls Panel */
.adjustment-controls-panel {
    grid-column: span 1;
}

.adjustment-controls-panel .form-range {
    margin-bottom: 0.5rem;
}

.adjustment-controls-panel .text-muted {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

/* Enhanced Position Grid */
.position-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 140px;
    margin: 0 auto;
}

.position-grid-enhanced .position-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: #718096;
}

.position-grid-enhanced .position-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.position-grid-enhanced .position-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Adjustment Controls */
.adjustment-controls .form-range {
    margin-bottom: 0.5rem;
}

.adjustment-controls .text-muted {
    display: block;
    margin-bottom: 1rem;
}

/* Actions Section */
.actions-section {
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

@media (min-width: 769px) {
    .actions-section .btn {
        min-width: 140px;
    }
}

.filter-preview {
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: var(--primary-color) !important;
}

.filter-preview.active {
    border-color: var(--primary-color) !important;
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.filter-preview canvas {
    border-radius: 8px;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Ensure minimum canvas size for tablets */
@media (min-width: 769px) and (max-width: 991px) {
    .filter-preview canvas {
        min-width: 80px;
        min-height: 80px;
    }
}

/* Ensure minimum canvas size for desktop and larger */
@media (min-width: 992px) {
    .filter-preview canvas {
        min-width: 120px;
        min-height: 120px;
    }
}

.filter-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* ========== Tool Container ========== */
.image-tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tool-header .lead {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* ========== Upload Area ========== */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
}

.upload-area.drag-over {
    border-color: var(--success-color);
    background: rgba(25, 135, 84, 0.1);
    transform: scale(1.02);
}

.upload-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-content h2 {
    color: #495057;
    margin-bottom: 1rem;
}

.upload-content p {
    color: var(--secondary-color);
    margin: 0.5rem 0;
}

/* Edit Area */
.edit-area {
    animation: fadeIn 0.5s;
}

/* Controls Section */
.controls-section {
    margin-bottom: 2rem;
}

.controls-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

/* Preview Section */
.preview-section .card {
    min-height: 500px;
}

.preview-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Preview Container */
.preview-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#previewCanvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Controls Panel */
.controls-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 20px;
}

.controls-panel h5 {
    color: #495057;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* ========== Compress Tool Specific - Used in: compress.html ========== */
.compression-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 0;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item span {
    color: #6c757d;
}

.stat-item strong {
    font-weight: 600;
}

.stat-item .text-muted {
    font-weight: normal;
    opacity: 0.6;
}

.stat-item.text-success strong {
    color: #198754 !important;
    font-weight: 700;
}

/* Compress Tool Layout - Images List Section */
.images-list-section {
    width: 100%;
}

.images-list-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.images-list-section .card-body {
    min-height: 300px;
    background: #f8f9fa;
}

/* Compress Tool Responsive Layout */
@media (min-width: 1200px) {
    .compression-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .compression-area .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .compression-area .images-list-section {
        order: 2;
        width: 100%;
    }
    
    .compression-area .controls-section .col-md-12 {
        margin-bottom: 2rem;
    }
}

@media (min-width: 993px) and (max-width: 1199px) {
    .compression-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .compression-area .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .compression-area .images-list-section {
        order: 2;
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .compression-area .row {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .compression-area .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .compression-area .images-list-section {
        order: 2;
        width: 100%;
    }
    
    /* Better controls layout for tablets */
    .compression-area .controls-section .card-body {
        padding: 1.5rem;
    }
    
    .compression-area .controls-section .row {
        gap: 1rem;
    }
    
    .compression-area .controls-section .col-md-12 {
        margin-bottom: 1.5rem;
    }
    
    /* Quality settings optimization */
    .compression-area h2.h6 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: var(--primary-color);
        border-bottom: 2px solid #e0e0e0;
        padding-bottom: 0.5rem;
    }
    
    .compression-area .form-label {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .compression-area .form-range {
        margin: 0.75rem 0;
    }
    
    /* Preset quality buttons - 2x2 grid for tablets */
    .compression-area .btn-group-rtl {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    
    .compression-area .btn-group-rtl > .btn {
        border-radius: 8px !important;
        margin: 0 !important;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Compression stats optimization */
    .compression-area .compression-stats {
        padding: 1rem;
        margin-bottom: 1rem;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 1px solid #dee2e6;
        border-radius: 10px;
    }
    
    .compression-area .stat-item {
        padding: 0.25rem 0;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .compression-area .stat-item span {
        font-weight: 500;
    }
    
    .compression-area .stat-item strong {
        font-weight: 700;
        font-size: 0.95rem;
    }
    
    /* Action buttons optimization */
    .compression-area .d-grid {
        gap: 0.75rem;
    }
    
    .compression-area .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        font-weight: 600;
        min-height: 48px;
        border-radius: 8px;
    }
    
    .compression-area .row.g-2 {
        margin-top: 0.5rem;
        gap: 0.5rem;
    }
    
    .compression-area .row.g-2 .col-6 {
        flex: 1;
    }
    
    /* Images list section optimization */
    .compression-area .images-list-section .card {
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .compression-area .images-list-section .card-header {
        padding: 1rem 1.5rem;
        font-weight: 600;
    }
    
    .compression-area .images-list-section .card-header h3 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .compression-area .images-list-section .card-body {
        min-height: 350px;
        padding: 1.5rem;
    }
    
    /* Better spacing for image grid */
    .compression-area .images-list .row {
        gap: 1rem;
    }
    
    /* Upload area optimization for tablet */
    .compression-area ~ .upload-area {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .compression-area ~ .upload-area .upload-content h2 {
        font-size: 1.5rem;
    }
    
    .compression-area ~ .upload-area .upload-content i {
        font-size: 3.5rem;
    }
}

/* Mobile specific compress tool styles */
@media (max-width: 575px) {
    .compression-area .controls-section .card-body {
        padding: 1rem;
    }
    
    .compression-area .controls-section .col-md-12 {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .compression-area h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: var(--primary-color);
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 0.5rem;
    }
    
    .compression-stats {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-group-rtl > .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    
    .images-list-section .card-body {
        min-height: 250px;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .compression-area .controls-section .card-body {
        padding: 0.75rem;
    }
    
    .compression-area .controls-section .col-md-12 {
        padding: 0 0.25rem;
        margin-bottom: 1rem;
    }
    
    .btn-group-rtl > .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.125rem;
    }
    
    .compression-stats {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .stat-item {
        margin-bottom: 6px;
        padding: 2px 0;
    }
    
    .images-list-section .card-body {
        min-height: 200px;
        padding: 0.5rem;
    }
}

/* RTL Button Group - Used in: compress.html */
.btn-group-rtl {
    display: flex;
    position: relative;
}

.btn-group-rtl > .btn {
    position: relative;
    flex: 1 1 auto;
    border-radius: 0;
    margin-left: -1px;
}

.btn-group-rtl > .btn:first-child {
    margin-left: 0;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn-group-rtl > .btn:last-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group-rtl > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

.btn-group-rtl > .btn:hover,
.btn-group-rtl > .btn:focus,
.btn-group-rtl > .btn.active {
    z-index: 1;
}

.btn-group-rtl > .btn.active {
    border-color: #6c757d;
    background-color: #6c757d;
    color: white;
}

/* Button gap fix - Used in: compress.html, watermark.html */
.d-flex[style*="gap"] {
    gap: 0.5rem;
}

/* ========== Converter Tool Specific - Used in: converter.html ========== */
.format-card {
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.format-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.format-card.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.format-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 10px;
    color: var(--success-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.format-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.heif-notice {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.conversion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.image-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.file-info {
    flex-grow: 1;
    margin-left: 15px;
}

.quality-settings {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* ========== Crop Tool Specific - Used in: crop.html ========== */
.cropper-container {
    max-height: 600px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

.crop-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
}

.ratio-btn.active {
    background: var(--bs-primary);
    color: white;
}

/* Result canvas display - Used in: crop.html */
#resultCanvas {
    max-width: 100%;
    height: auto;
}

/* Crop Tool Layout - Button Groups */
.ratio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.ratio-btn {
    flex: 0 0 auto;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
}

.tool-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.tool-btn {
    flex: 0 0 auto;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
}

.cropper-section {
    width: 100%;
}

.cropper-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cropper-section .card-body {
    min-height: 400px;
    background: #f8f9fa;
}

/* Crop Tool Responsive Layout */
@media (min-width: 1200px) {
    .crop-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .crop-area .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .crop-area .cropper-section {
        order: 2;
        width: 100%;
    }
    
    .crop-area .result-preview {
        order: 3;
        width: 100%;
    }
    
    .crop-area .controls-section .col-md-12 {
        margin-bottom: 2rem;
    }
}

@media (min-width: 993px) and (max-width: 1199px) {
    .crop-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .crop-area .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .crop-area .cropper-section {
        order: 2;
        width: 100%;
    }
    
    .crop-area .result-preview {
        order: 3;
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .crop-area .row {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .crop-area .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .crop-area .cropper-section {
        order: 2;
        width: 100%;
    }
    
    .crop-area .result-preview {
        order: 3;
        width: 100%;
    }
    
    /* Better controls layout for tablets */
    .crop-area .controls-section .card-body {
        padding: 1.5rem;
    }
    
    .crop-area .controls-section .col-md-12 {
        margin-bottom: 1.5rem;
    }
    
    /* Ratio buttons in grid for tablets */
    .crop-area .ratio-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .crop-area .ratio-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
        text-align: center;
    }
    
    /* Tool buttons in 2x3 grid */
    .crop-area .tool-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .crop-area .tool-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        text-align: center;
    }
    
    .crop-area .cropper-section .card-body {
        min-height: 350px;
        padding: 1.5rem;
    }
    
    .crop-area .crop-info {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .crop-area .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 48px;
    }
}

/* Mobile specific crop tool styles */
@media (max-width: 575px) {
    .crop-area .controls-section .card-body {
        padding: 1rem;
    }
    
    .crop-area .controls-section .col-md-12 {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .crop-area h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: var(--primary-color);
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 0.5rem;
    }
    
    /* Ratio buttons vertical stack on mobile */
    .crop-area .ratio-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .crop-area .ratio-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        text-align: right;
        justify-content: flex-start;
        border-radius: 6px;
        width: 100%;
    }
    
    /* Tool buttons vertical stack on mobile */
    .crop-area .tool-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .crop-area .tool-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        text-align: right;
        justify-content: flex-start;
        border-radius: 6px;
        width: 100%;
    }
    
    .crop-area .crop-info {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .crop-area .cropper-section .card-body {
        min-height: 250px;
        padding: 0.75rem;
    }
    
    .crop-area .cropper-container {
        max-height: 300px;
        padding: 0.5rem;
    }
    
    .crop-area .result-preview .card-body {
        padding: 0.75rem;
    }
    
    .crop-area #resultCanvas {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .crop-area .controls-section .card-body {
        padding: 0.75rem;
    }
    
    .crop-area .controls-section .col-md-12 {
        padding: 0 0.25rem;
        margin-bottom: 1rem;
    }
    
    .crop-area .ratio-btn,
    .crop-area .tool-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .crop-area .crop-info {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .crop-area .cropper-section .card-body {
        min-height: 200px;
        padding: 0.5rem;
    }
    
    .crop-area .cropper-container {
        max-height: 250px;
        padding: 0.25rem;
    }
    
    .crop-area #resultCanvas {
        max-height: 150px;
    }
}

/* ========== Filters Tool Specific - Used in: filters.html ========== */
.filter-preview {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    border: 3px solid transparent;
}

.filter-preview:hover {
    transform: scale(1.05);
}

.filter-preview.active {
    border-color: var(--bs-primary);
}

.filter-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    text-align: center;
}

.adjustment-control {
    margin-bottom: 15px;
}

.adjustment-control label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

/* ========== Watermark Tool Specific - Used in: watermark.html ========== */
.watermark-type-card {
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
    padding: 20px;
    text-align: center;
}

.watermark-type-card:hover {
    transform: translateY(-5px);
    border-color: var(--bs-primary);
}

.watermark-type-card.active {
    border-color: var(--bs-success);
    background: #d4edda;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 150px;
}

.position-btn {
    aspect-ratio: 1;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.position-btn:hover {
    background: #e9ecef;
}

.position-btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

.watermark-preview {
    position: relative;
    display: inline-block;
}

.watermark-overlay {
    position: absolute;
    pointer-events: none;
}

/* Pattern controls - Used in: watermark.html */
#patternControls {
    display: none;
}

/* ========== Common Tool Elements ========== */

/* Preset Buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.preset-btn {
    flex: 0 0 auto;
    padding: 5px 12px;
    font-size: 0.875rem;
    border-radius: 0px;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Image Info */
.image-info {
    background: white;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #e0e0e0;
}

.image-info strong {
    color: var(--primary-color);
}

/* Format Selection */
.format-selection {
    animation: slideIn 0.5s;
}

/* Quality Control */
.quality-control {
    margin-top: 1rem;
}

.form-range {
    width: 100%;
    height: 6px;
    background: #dee2e6;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: white;
    border-radius: 12px;
    margin-top: 3rem;
}

.features-section i {
    margin-bottom: 1rem;
}

.features-section h5 {
    color: #495057;
    margin: 1rem 0;
}

.features-section p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Tool Grid (for tools list page) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.tool-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* ========== Responsive Improvements ========== */

/* Desktop and Large Screens (1200px+) */
@media (min-width: 1200px) {
    .image-tool-container {
        max-width: 1600px;
        padding: 0 2rem;
    }
    
    .tool-header {
        margin-bottom: 3rem;
    }
    
    .tool-header h1 {
        font-size: 3rem;
    }
    
    .tool-header .lead {
        font-size: 1.25rem;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .upload-area {
        padding: 4rem;
        margin-bottom: 3rem;
    }
    
    .upload-content i {
        font-size: 5rem;
        margin-bottom: 2rem;
    }
    
    .upload-content h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Force vertical stack layout - controls above, preview below */
    .edit-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .preview-section {
        order: 2;
        width: 100%;
        min-height: 600px;
    }
    
    .preview-container {
        min-height: 500px;
        padding: 2rem;
    }
    
    .controls-section .card-body {
        padding: 2rem;
    }
    
    .controls-section h3 {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }
    
    /* Better spacing for desktop */
    .controls-section .col-md-12 {
        margin-bottom: 2rem;
    }
    
    .preset-buttons {
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .preset-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    
    .btn-group {
        gap: 0.25rem;
        margin-top: 1rem;
    }
    
    .image-info {
        padding: 1.25rem;
        font-size: 0.95rem;
    }
    
    .d-grid {
        gap: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .image-tool-container {
        max-width: 1800px;
    }
    
    /* Maintain vertical stack layout */
    .controls-section {
        width: 100%;
    }
    
    .preview-section {
        width: 100%;
    }
    
    .preview-container {
        min-height: 600px;
        padding: 3rem;
    }
    
    #previewCanvas {
        max-width: 100%;
        max-height: 700px;
    }
}

/* Large Tablet Landscape (993px - 1199px) */
@media (min-width: 993px) and (max-width: 1199px) {
    .image-tool-container {
        padding: 0 1.5rem;
    }
    
    .tool-header h1 {
        font-size: 2.5rem;
    }
    
    .upload-area {
        padding: 3rem 2rem;
    }
    
    /* Force vertical stack layout - controls above, preview below */
    .edit-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .preview-section {
        order: 2;
        width: 100%;
    }
    
    .preview-container {
        min-height: 500px;
        padding: 2rem;
    }
    
    .controls-section .col-md-12 {
        margin-bottom: 1.5rem;
    }
    
    .preset-buttons {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .preset-btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Medium Tablet Landscape (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .image-tool-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .tool-header h1 {
        font-size: 2.25rem;
    }
    
    .upload-area {
        padding: 2.5rem 1.5rem;
    }
    
    /* Force vertical stack layout - controls above, preview below */
    .edit-area .row {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .controls-section {
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .preview-section {
        order: 2;
        width: 100%;
    }
    
    .controls-section .row {
        align-items: flex-start;
        gap: 1rem;
    }
    
    .controls-section .col-md-12 {
        margin-bottom: 1.5rem;
        flex: 1;
    }
    
    .preview-container {
        min-height: 400px;
        padding: 1.5rem;
    }
    
    .preset-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .btn-group {
        display: flex;
        justify-content: center;
        gap: 0.25rem;
        margin-top: 0.75rem;
    }
    
    .btn-group .preset-btn {
        flex: 1;
        max-width: 60px;
    }
}

/* Large Mobile and up (768px+) - General tablet optimizations */
@media (min-width: 768px) {
    .controls-section .row {
        align-items: start;
    }
    
    .form-control {
        font-size: 1rem;
    }
    
    .btn {
        min-height: auto;
    }
}

/* Medium Mobile (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .image-tool-container {
        padding: 0 0.5rem;
    }
    
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-header .lead {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .controls-section .col-md-3,
    .controls-section .col-md-5,
    .controls-section .col-md-4 {
        margin-bottom: 1.5rem;
    }
    
    #imgInContainer {
        max-width: 100%;
    }
    .preset-buttons {
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .preset-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .preview-container {
        min-height: 300px;
        padding: 1rem;
    }
}

/* Small Mobile (≤575px) */
@media (max-width: 575px) {
    .image-tool-container {
        padding: 0 0.25rem;
    }
    
    .tool-header {
        margin-bottom: 1rem;
    }
    
    .tool-header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .tool-header .lead {
        font-size: 0.95rem;
    }
    
    .upload-area {
        padding: 1.5rem 0.75rem;
        margin-bottom: 1rem;
    }
    
    .upload-content i {
        font-size: 3rem;
    }
    
    .upload-content h2 {
        font-size: 1.25rem;
    }
    
    /* Controls Section Mobile Layout */
    .controls-section .card-body {
        padding: 1rem;
    }
    
    .controls-section .col-md-3,
    .controls-section .col-md-5,
    .controls-section .col-md-4 {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .controls-section h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: var(--primary-color);
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 0.5rem;
    }
    
    /* Size Controls Mobile */
    .form-label {
        font-size: 0.875rem;
        font-weight: 500;
        margin-bottom: 0.25rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-check {
        margin-top: 0.75rem;
    }
    
    .form-check-label {
        font-size: 0.875rem;
    }
    
    /* Preset Buttons Mobile */
    .preset-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .preset-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        text-align: right;
        justify-content: flex-start;
        border-radius: 0px;
        width: 100%;
    }
    
    /* Percentage buttons in mobile */
    .btn-group {
        display: flex;
        gap: 0.25rem;
        margin-top: 0.5rem;
    }
    
    .btn-group .preset-btn {
        flex: 1;
        min-width: calc(20% - 0.25rem);
        text-align: center;
        font-size: 0.75rem;
        padding: 0.375rem 0.25rem;
    }
    
    /* Image Info Mobile */
    .image-info {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Action Buttons Mobile */
    .d-grid {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 48px;
    }
    
    /* Preview Section Mobile */
    .preview-section .card-header {
        padding: 0.75rem;
    }
    
    .preview-section .card-header h3 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .preview-container {
        min-height: 250px;
        padding: 0.75rem;
    }
    
    #previewCanvas {
        max-width: 100%;
        max-height: 300px;
        width: auto;
        height: auto;
    }
    
    /* Controls Panel Mobile */
    .controls-panel {
        position: static;
        margin-top: 1rem;
        padding: 1rem;
    }
}

/* Extra Small Mobile (≤480px) */
@media (max-width: 480px) {
    .image-tool-container {
        padding: 0;
    }
    
    .card {
        border-radius: 8px;
        margin: 0 0.25rem;
    }
    
    .tool-header h1 {
        font-size: 1.5rem;
    }
    
    .upload-area {
        padding: 1rem 0.5rem;
        border-width: 2px;
    }
    
    .upload-content i {
        font-size: 2.5rem;
    }
    
    .upload-content h2 {
        font-size: 1.1rem;
    }
    
    .upload-content p {
        font-size: 0.85rem;
    }
    
    .upload-content .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .controls-section .card-body {
        padding: 0.75rem;
    }
    
    .controls-section .col-md-3,
    .controls-section .col-md-5,
    .controls-section .col-md-4 {
        padding: 0 0.25rem;
        margin-bottom: 1rem;
    }
    
    .preset-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .btn-group .preset-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.125rem;
        min-width: calc(20% - 0.125rem);
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.5rem;
    }
    
    .preview-container {
        min-height: 200px;
        padding: 0.5rem;
    }
    
    #previewCanvas {
        max-height: 200px;
    }
}

/* Touch Device Optimizations */
@media (max-width: 768px) and (pointer: coarse) {
    /* Larger touch targets */
    .btn, .form-control, .form-select, .form-check-input {
        min-height: 44px;
        min-width: 44px;
    }
    
    .preset-btn {
        min-height: 40px;
        touch-action: manipulation;
    }
    
    .form-check-input {
        transform: scale(1.2);
    }
    
    .form-check-label {
        padding-left: 0.5rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .upload-content i {
        transform: translateZ(0); /* Hardware acceleration */
    }
    
    #previewCanvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Legacy Responsive Support */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 1.8rem;
    }
    
    .upload-area {
        padding: 2rem;
    }
    
    .controls-panel {
        position: static;
        margin-top: 1rem;
    }
    
    .preset-buttons {
        justify-content: center;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========== Filters Tool Mobile Optimizations ========== */

/* Filter Preview Grid - Mobile Responsive */
@media (max-width: 768px) {
    .filter-area .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-area .nav-tabs .nav-link i {
        font-size: 1.1rem;
    }
    
    .filter-area #filtersList {
        gap: 1rem;
        display: flex;
        flex-wrap: wrap;
    }
    
    .filter-area #filtersList > div {
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
        margin-bottom: 1.5rem;
    }
    
    .filter-preview {
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
        aspect-ratio: 1;
        position: relative;
        min-height: 120px;
    }
    
    .filter-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .filter-preview .filter-name {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
        background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        font-weight: 600;
    }
    
    .filter-preview:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    }
    
    .filter-preview.active {
        border: 3px solid var(--primary-color);
        transform: scale(1.02);
    }
    
    /* Adjustment Controls Mobile */
    .filter-area .adjustment-control {
        margin-bottom: 1.5rem;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }
    
    .filter-area .adjustment-control label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .filter-area .adjustment-control label span:first-child {
        color: #495057;
    }
    
    .filter-area .adjustment-control label span:last-child {
        color: var(--primary-color);
        font-weight: 700;
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
        background: rgba(var(--primary-color-rgb, 102, 126, 234), 0.1);
        border-radius: 4px;
    }
    
    .filter-area .form-range {
        height: 8px;
        background: linear-gradient(to right, #e9ecef 0%, #e9ecef 100%);
        border-radius: 5px;
        margin-top: 0.5rem;
    }
    
    .filter-area .form-range::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        background: var(--primary-color);
        border: 3px solid white;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }
    
    .filter-area .form-range::-moz-range-thumb {
        width: 24px;
        height: 24px;
        background: var(--primary-color);
        border: 3px solid white;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }
    
    /* Reset button styling */
    .filter-area #resetAdjustments {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
    
    /* Canvas and Preview Mobile */
    .filter-area .preview-container {
        padding: 0.75rem;
        min-height: 300px;
        overflow: hidden;
    }
    
    .filter-area #previewCanvas {
        max-width: 100% !important;
        max-height: 400px !important;
        width: auto !important;
        height: auto !important;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
}

/* Small Mobile (≤575px) - Filters Specific */
@media (max-width: 575px) {
    .filter-area .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.6rem 0.25rem;
    }
    
    .filter-area #filtersList {
        gap: 1rem;
        display: flex;
        flex-wrap: wrap;
    }
    
    .filter-area #filtersList > div {
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
        margin-bottom: 1.5rem;
    }
    
    .filter-area .filter-preview {
        min-height: 140px;
    }
    
    .filter-area .filter-preview .filter-name {
        font-size: 0.85rem;
        padding: 0.6rem 0.4rem;
        font-weight: 600;
    }
    
    .filter-area .adjustment-control {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .filter-area .adjustment-control label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .filter-area .adjustment-control label span:last-child {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .filter-area .form-range::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .filter-area .form-range::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
    
    .filter-area .preview-container {
        padding: 0.75rem;
        min-height: 250px;
    }
    
    .filter-area #previewCanvas {
        max-width: 100% !important;
        max-height: 300px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
}

/* Touch-specific optimizations for filters */
@media (max-width: 768px) and (pointer: coarse) {
    .filter-preview {
        touch-action: manipulation;
    }
    
    .filter-area .nav-tabs .nav-link {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .filter-area .form-range {
        min-height: 44px;
        touch-action: pan-x;
    }
    
    .filter-area .form-range::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    
    .filter-area .form-range::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
    
    .filter-area .btn {
        min-height: 48px;
        touch-action: manipulation;
    }
}