/* ============================================================================ */
/* Reduce Image Size - Image Compression Tool Styling */
/* ============================================================================ */

/* Tool Page Wrapper */
.tool-page-wrapper {
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Tool Hero */
.tool-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.hero-content-tool {
    max-width: 800px;
    margin: 0 auto;
}

.tool-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.tool-hero h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 800;
}

.tool-hero p {
    font-size: 1.2rem;
    color: #c7d2fe;
    max-width: 600px;
    margin: 0 auto;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 2rem;
    text-align: center;
}

.how-it-works h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 3rem;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 2rem;
    width: 200px;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: #818cf8;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.step-icon {
    position: relative;
    margin-bottom: 1rem;
}

.step-emoji {
    font-size: 3rem;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

.step-card:nth-child(1) .step-emoji { animation-delay: 0s; }
.step-card:nth-child(3) .step-emoji { animation-delay: 0.3s; }
.step-card:nth-child(5) .step-emoji { animation-delay: 0.6s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.step-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.step-arrow {
    color: #6366f1;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Upload Section */
.upload-section {
    margin-bottom: 3rem;
}

.drag-drop-area {
    border: 2px dashed #6366f1;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(30, 41, 59, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2rem 0;
}

.drag-drop-area:hover {
    border-color: #818cf8;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.upload-icon-wrapper {
    position: relative;
    display: inline-block;
}

.upload-icon-wrapper i {
    font-size: 4rem;
    color: #6366f1;
}

.upload-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.drag-drop-area h3 {
    color: white;
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem;
}

.drag-drop-area p {
    color: #c7d2fe;
    margin: 0.5rem 0;
}

.supported-formats {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Quick Tips */
.upload-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tip-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.tip-item:hover {
    border-color: #818cf8;
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-3px);
}

.tip-item i {
    color: #6366f1;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-item span {
    color: #c7d2fe;
    line-height: 1.6;
}

/* Gallery Section */
.gallery-section {
    margin: 3rem 0;
}

.gallery-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.gallery-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.gallery-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

/* Controls Section */
.controls-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
}

.controls-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.controls-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.preset-controls,
.size-controls {
    display: flex;
    flex-direction: column;
}

.preset-controls label,
.size-controls label,
.control-group label {
    color: #c7d2fe;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.preset-controls select,
.size-controls select,
.control-group input,
.control-group select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.preset-controls select:hover,
.preset-controls select:focus,
.size-controls select:hover,
.size-controls select:focus,
.control-group input:hover,
.control-group input:focus,
.control-group select:hover,
.control-group select:focus {
    border-color: #818cf8;
    background: rgba(30, 41, 59, 0.8);
    outline: none;
}

.dimension-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.custom-controls {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
}

.custom-target-size-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
}

.custom-target-size-section h3 {
    color: #a5b4fc;
    margin-bottom: 0.5rem;
}

.custom-target-size-section p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.custom-size-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.size-example {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

/* Convert Button */
.convert-button-container {
    text-align: center;
    margin-top: 2rem;
}

.convert-btn {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.convert-btn:disabled {
    background: #475569;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Results Section */
.results-section {
    margin: 3rem 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    color: white;
    font-size: 1.8rem;
}

.download-all-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.result-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    border-color: #818cf8;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.result-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.result-info {
    padding: 1rem;
}

.result-name {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.result-stats {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.result-download {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.result-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-content .spinner {
    width: 50px;
    height: 50px;
    border-width: 3px;
    margin: 0 auto 1rem;
}

.loading-content p {
    color: white;
    font-size: 1.2rem;
}

/* Features Section */
.tool-features {
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.5);
}

.tool-features h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 3rem;
}

.features-grid-tool {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Blog Section */
.tool-blog {
    padding: 4rem 2rem;
    background: #0f172a;
}

.blog-container-tool {
    max-width: 900px;
    margin: 0 auto;
}

.tool-blog h2 {
    font-size: 2rem;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
}

.blog-article {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 3rem;
}

.blog-article h3 {
    color: #a5b4fc;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-article h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.blog-article h4 {
    color: #c7d2fe;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.blog-article p {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.blog-article code {
    background: rgba(0, 0, 0, 0.3);
    color: #fbbf24;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.blog-list {
    color: #cbd5e1;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.blog-list li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.blog-list.numbered {
    list-style-type: decimal;
}

.blog-list a {
    color: #818cf8;
    text-decoration: none;
}

.blog-list a:hover {
    text-decoration: underline;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    font-weight: 600;
}

.comparison-table td {
    color: #c7d2fe;
}

/* FAQ Items */
.faq-item {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.faq-item h4 {
    color: #818cf8;
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-hero h1 { 
        font-size: 2rem; 
    }
    
    .steps-container { 
        flex-direction: column; 
    }
    
    .step-arrow { 
        transform: rotate(90deg); 
        margin: 0.5rem 0;
    }
    
    .step-card { 
        width: 100%; 
        max-width: 280px; 
    }
    
    .blog-article { 
        padding: 1.5rem; 
    }
    
    .features-grid-tool {
        grid-template-columns: 1fr;
    }
    
    .dimension-controls,
    .custom-size-controls {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-container {
        grid-template-columns: 1fr;
    }
}

.upload-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.tip-item i {
    color: #667eea;
    font-size: 1.2rem;
}

.tip-item span {
    color: #2c3e50;
    font-weight: 500;
}

.drag-drop-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8f2ff 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drag-drop-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(103, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.drag-drop-area:hover::before {
    left: 100%;
}

.drag-drop-area:hover {
    border-color: #5a6fd8;
    background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(103, 126, 234, 0.2);
}

.drag-drop-area.drag-over {
    border-color: #52c41a;
    background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(82, 196, 26, 0.3);
}

.drag-drop-area.drag-over .upload-icon {
    color: #52c41a;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.drag-drop-area h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.drag-drop-area p {
    color: #666;
    margin-bottom: 1rem;
}

.supported-formats small {
    color: #888;
    font-size: 0.9rem;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 3rem;
}

.gallery-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.gallery-info {
    padding: 1rem;
    background: #fff;
}

.gallery-filename {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-size {
    font-size: 0.8rem;
    color: #666;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Controls Section */
.controls-section {
    margin-bottom: 3rem;
}

.controls-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.controls-container {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.preset-controls,
.custom-controls,
.size-controls {
    margin-bottom: 2rem;
}

.preset-controls label,
.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.preset-controls select,
.control-group input,
.control-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #fff;
}

.preset-controls select:focus,
.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.1);
}

.dimension-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.control-group input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.custom-size-input {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 8px;
    border: 2px dashed rgba(103, 126, 234, 0.2);
}

.custom-size-input input {
    border-color: #667eea;
}

.custom-size-input .size-hint {
    display: block;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

.custom-target-size-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 12px;
    border: 2px solid rgba(103, 126, 234, 0.1);
}

.custom-target-size-section h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-target-size-section h3::before {
    content: '🎯';
}

.custom-target-size-section p {
    color: #666;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.custom-size-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.size-example {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(82, 196, 26, 0.1);
    border-radius: 6px;
    border-left: 4px solid #52c41a;
}

.size-example small {
    color: #2c3e50;
    font-weight: 500;
}

.size-example i {
    color: #52c41a;
    margin-right: 0.5rem;
}

.convert-button-container {
    text-align: center;
    margin-top: 2rem;
}

.convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(103, 126, 234, 0.3);
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(103, 126, 234, 0.4);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.convert-btn i {
    margin-right: 0.5rem;
}

/* Results Section */
.results-section {
    margin-bottom: 3rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
}

.download-all-btn {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
}

.download-all-btn i {
    margin-right: 0.5rem;
}

.results-container {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
    gap: 1rem;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: #f8f9ff;
}

.result-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-info h4 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.result-info p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-info p::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.size-increase {
    color: #1890ff !important;
}

.size-decrease {
    color: #52c41a !important;
}

.size-unchanged {
    color: #666 !important;
}

.result-size,
.result-dimensions {
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
}

.result-size {
    color: #52c41a;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(103, 126, 234, 0.3);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reduce-image-container {
        padding: 1rem;
    }
    
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .drag-drop-area {
        padding: 2rem 1rem;
    }
    
    .dimension-controls {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .result-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .controls-container {
        padding: 1rem;
    }
    
    .convert-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .download-all-btn {
        width: 100%;
    }
}