/* Image Compressor Tool Styles */

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section with Animation */
.tool-hero {
    background: var(--background-gradient);
    color: white;
    padding: 5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-icon-bg {
    position: absolute;
    top: -20%;
    right: -5%;
    font-size: 25rem;
    opacity: 0.1;
    color: white;
    transform: rotate(-10deg);
    animation: float 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-10deg);
    }

    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

.tool-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.accent-text {
    position: relative;
    display: inline-block;
}

.accent-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}

.tool-hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.hero-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Main Content Area */
.tool-content {
    max-width: 1200px;
    margin: -50px auto 3rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.tool-container {
    background: var(--background-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
}

/* Upload Area */
.upload-container {
    border: 2px dashed var(--accent);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all var(--transition-speed);
    position: relative;
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

.upload-container:hover,
.upload-container.dragover {
    border-color: var(--primary);
    background-color: rgba(244, 180, 164, 0.1);
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.upload-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.formats-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.format-badge {
    background-color: var(--background-white);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.format-badge i {
    color: var(--secondary);
}

.size-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.size-info i {
    color: var(--primary);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.browse-btn {
    display: inline-block;
    background: var(--background-gradient);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(243, 106, 70, 0.3);
}

.browse-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243, 106, 70, 0.4);
}

.browse-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(243, 106, 70, 0.3);
}

/* Options Section */
.options-container {
    margin: 2.5rem 0;
    background-color: var(--background-light);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.options-header {
    margin-bottom: 1.5rem;
}

.option-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.option-title i {
    color: var(--primary);
}

.separator-line {
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    width: 80px;
    border-radius: 2px;
    margin-top: 0.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.option-card {
    background-color: var(--background-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.option-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.option-card-header i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.option-card-header h4 {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="range"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all var(--transition-speed);
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-white);
}

.form-group select:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(243, 106, 70, 0.2);
}

/* Styled Range Input */
.styled-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    padding: 0;
    margin: 0;
}

.styled-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.styled-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    border: none;
}

.styled-range::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.styled-range::-moz-range-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.quality-levels {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.range-with-value {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 0.5rem;
}

.range-value {
    position: absolute;
    top: -5px;
    right: 0;
    background-color: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Custom Select Styling */
.format-selector {
    position: relative;
}

.format-selector select {
    appearance: none;
    padding-right: 2.5rem;
    width: 100%;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 3rem;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Toggle Switch */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.toggle-switch {
    position: relative;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-label:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked+.toggle-label {
    background-color: var(--primary);
}

.toggle-switch input:checked+.toggle-label:after {
    transform: translateX(24px);
}

.toggle-text {
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

/* Size input group */
.size-input-group {
    display: flex;
    gap: 0.5rem;
}

.size-unit-selector {
    width: 80px;
    flex-shrink: 0;
}

/* Dimension Controls */
.dimension-group {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Processing Indicator */
.processing-container {
    background-color: var(--background-light);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.processing-animation {
    margin-bottom: 1.5rem;
}

.loader {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.circular-loader {
    width: 100%;
    height: 100%;
    border: 6px solid rgba(243, 106, 70, 0.2);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loader-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 2rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.processing-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.progress-bar {
    height: 12px;
    background-color: rgba(243, 106, 70, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
    position: relative;
}

.progress-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    background-size: 50px 50px;
    animation: progressAnimation 2s linear infinite;
}

@keyframes progressAnimation {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Compress Button */
.compress-btn {
    background: var(--background-gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    width: 100%;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(243, 106, 70, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.compress-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(243, 106, 70, 0.4);
}

.compress-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(243, 106, 70, 0.3);
}

.compress-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #bbb 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.results-section {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease;
}

.results-header {
    margin-bottom: 1.5rem;
}

/* Stats Summary */
.stats-summary {
    display: flex;
    justify-content: space-around;
    background-color: var(--background-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    transition: all var(--transition-speed);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    background-color: rgba(243, 106, 70, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    min-width: 180px;
    justify-content: center;
}

.download-all-btn {
    background-color: var(--success);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.download-all-btn:hover {
    background-color: #218838;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.compress-more-btn {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(83, 82, 237, 0.3);
}

.compress-more-btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(83, 82, 237, 0.4);
}

/* Images List */
.images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.image-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
}

.image-item:hover {
    transform: translateY(-7px);
    box-shadow: var(--card-shadow-hover);
}

.image-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--background-light);
    position: relative;
}

.image-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-details {
    padding: 1.5rem;
}

.image-name {
    font-weight: 600;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.size-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.size-original {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.size-arrow {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

.size-compressed {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
}

.savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--success-light);
    color: var(--success);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.dimensions-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimensions-info::before {
    content: '\f2d0';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.9rem;
}

.image-actions {
    display: flex;
    gap: 1rem;
}

.image-actions button {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.download-btn {
    background-color: var(--success);
    color: white;
}

.download-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(33, 136, 56, 0.3);
}

.preview-btn {
    background-color: var(--secondary);
    color: white;
}

.preview-btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(66, 65, 216, 0.3);
}

/* About Section */
.about-section {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background-color: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-size: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 5px 15px rgba(243, 106, 70, 0.3);
}

.about-section h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.about-intro {
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-item {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    text-align: center;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(243, 106, 70, 0.2);
}

.feature-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.feature-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    flex-grow: 1;
    line-height: 1.7;
}

/* How It Works Section */
.how-it-works {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.section-subtitle {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 160px;
    position: relative;
}

.step-number {
    background-color: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    position: absolute;
    top: -10px;
    right: -10px;
    box-shadow: 0 3px 8px rgba(243, 106, 70, 0.3);
    z-index: 2;
}

.step-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(243, 106, 70, 0.2);
    z-index: 1;
}

.step h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.step-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
}

.disclaimer {
    margin-top: 3rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    text-align: left;
}

.disclaimer i {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Modal for image preview */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: var(--background-white);
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalShow 0.3s ease;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.modal-title {
    font-weight: 600;
    margin: 0;
}

.modal-close {
    color: white;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 1.5rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-info {
    margin-top: 1rem;
    background-color: var(--background-light);
    border-radius: 8px;
    padding: 1.5rem;
}

.modal-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* Notification Styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 350px;
    animation: slideIn 0.3s ease, slideOut 0.3s ease 4.7s forwards;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.notification.error {
    background-color: var(--danger);
    color: white;
}

.notification.success {
    background-color: var(--success);
    color: white;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.notification-message {
    font-size: 0.95rem;
    opacity: 0.9;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tool-content {
        margin-top: -30px;
    }

    .tool-hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .tool-hero h1 {
        font-size: 2.5rem;
    }

    .steps {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
}

@media (max-width: 768px) {
    .tool-container {
        padding: 1.5rem;
    }

    .stats-summary {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .tool-hero h1 {
        font-size: 2.2rem;
    }

    .tool-hero p {
        font-size: 1.1rem;
    }

    .hero-badges {
        gap: 1rem;
    }

    .upload-container {
        padding: 2rem 1.5rem;
    }

    .results-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .action-btn {
        min-width: 100%;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
}

@media (max-width: 576px) {
    .upload-text {
        font-size: 1.3rem;
    }

    .upload-subtext {
        font-size: 1rem;
    }

    .formats-info {
        gap: 0.3rem;
    }

    .format-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .tool-hero {
        padding: 3rem 1rem;
    }

    .tool-hero h1 {
        font-size: 2rem;
    }

    .about-section h2 {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1.5rem;
    }

    .option-card {
        padding: 1.2rem;
    }

    .processing-container {
        padding: 1.5rem;
    }

    .image-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .image-preview {
        height: 150px;
    }

    .disclaimer {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Animation for file drag-and-drop */
@keyframes border-pulse {
    0% {
        border-color: var(--accent);
    }

    50% {
        border-color: var(--primary);
    }

    100% {
        border-color: var(--accent);
    }
}

.upload-container.dragover {
    animation: border-pulse 1.5s infinite;
}

/* File List Styling */
.file-list-item {
    margin-bottom: 1.5rem;
    animation: itemFadeIn 0.5s ease;
}

@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-list-item:last-child {
    margin-bottom: 0;
}

.file-item {
    display: flex;
    background-color: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.file-item .image-preview {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.file-item .image-details {
    flex: 1;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.file-item .image-name {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.file-size::before {
    content: '\f1c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    opacity: 0.8;
}

.remove-file {
    margin-top: auto;
    background-color: white;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
}

.remove-file:hover {
    background-color: var(--danger);
    color: white;
}

@media (max-width: 576px) {
    .file-item {
        flex-direction: column;
    }

    .file-item .image-preview {
        width: 100%;
        height: 150px;
    }

    .file-item .image-details {
        padding: 1rem;
    }
}

/* Empty state styling */
.upload-container.empty-state {
    min-height: 250px;
}

/* Tooltip styling */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-dark);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Loading shimmer effect for images */
.loading-shimmer {
    background: linear-gradient(90deg,
            var(--background-light) 0%,
            #f0f0f0 50%,
            var(--background-light) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}