/* ======================
   RESET & BASE STYLES
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
      Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.tool-page {
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    position: relative;
}

.tool-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 0 0 30px 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ======================
   ENHANCED HEADER SECTION
   ====================== */
.tool-header {
    background: linear-gradient(135deg, #2C3E50 0%, #3498DB 100%);
    padding: 60px 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.05)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease;
    color: white;
    text-align: center;
}

.header-content h1 i {
    margin-right: 15px;
    color: #F39C12;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-description {
    font-size: 1.4rem;
    margin-bottom: 40px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-align: center;
    color: white;
}

.feature-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.badge {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ai-badge { background: rgba(255,193,7,0.2); color: #FFC107; }
.format-badge { background: rgba(76,175,80,0.2); color: #4CAF50; }
.batch-badge { background: rgba(233,30,99,0.2); color: #E91E63; }
.quality-badge { background: rgba(156,39,176,0.2); color: #9C27B0; }

.badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

h2 {
    font-size: 1.8rem;
    color: #3498db;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.3rem;
    color: #34495e;
    margin: 1.5rem 0 0.75rem;
}

/* ======================
   TOOL INSTRUCTIONS
   ====================== */
.tool-instructions {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.instructions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.instruction-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* ======================
   ENHANCED UPLOAD SECTION
   ====================== */
.upload-section {
    position: relative;
    text-align: center;
    padding: 4rem 2rem;
    margin: 2rem auto;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 3px dashed #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.upload-section:hover::before,
.upload-section.dragover::before {
    opacity: 1;
}

.upload-section:hover,
.upload-section.dragover {
    border-color: #667eea;
    background: linear-gradient(145deg, #f8faff 0%, #f0f4ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.upload-section:hover .upload-icon,
.upload-section.dragover .upload-icon {
    transform: scale(1.1) translateY(-5px);
    color: #667eea;
}

.upload-icon {
    font-size: 4.5rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-text {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.upload-info {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-weight: 400;
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upload-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.upload-btn.secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #475569;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.upload-btn.secondary:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.upload-progress {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* ======================
   CONVERTER CONTAINER
   ====================== */
.converter-container {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 2rem;
	margin-bottom: 2rem;
}

/* Image Info Panel */
.image-info-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.image-metadata p {
    margin-bottom: 0.5rem;
}

.format-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.format-pill {
    background: #e1f5fe;
    color: #0277bd;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.format-pill:hover {
    background: #b3e5fc;
}

/* Preview Container */
.preview-container {
	max-width: 100%;
	overflow: hidden;
	border-radius: 8px;
	background: #f5f5f5;
	text-align: center;
	padding: 1rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#imagePreview {
	max-width: 100%;
	max-height: 400px;
	height: auto;
}

/* Format Options */
.format-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.format-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    color: #3498db;
    background: #e1f5fe;
    border-bottom: 2px solid #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.format-option {
    position: relative;
}

.format-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.format-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.format-option input[type="radio"]:checked + label {
    border-color: #3498db;
    background: #f0f7ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.format-option label:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.format-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.format-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.format-desc {
    font-size: 0.8rem;
    color: #666;
}

/* Quality Settings */
.quality-settings {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.quality-slider {
    margin-top: 1rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

#qualityValue {
    font-weight: 600;
    color: #3498db;
    width: 50px;
    text-align: center;
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

#convertBtn {
    background: #28a745;
    color: white;
}

#convertBtn:hover {
    background: #218838;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.secondary:hover {
    background: #5a6268;
}

/* ======================
   BLOG CONTENT STYLES
   ====================== */
.blog-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content article {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.blog-content article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ======================
   FAQ SECTION STYLES
   ====================== */
.faq-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h3 {
    display: flex;
    align-items: center;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-item h3::before {
    content: "Q:";
    margin-right: 0.5rem;
    color: #3498db;
    font-weight: bold;
}

.faq-item p {
    padding-left: 1.5rem;
    line-height: 1.7;
}

/* ======================
   BATCH PROCESSING & AI SECTIONS
   ====================== */
.batch-queue {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    margin: 2rem auto;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.queue-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.queue-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-queue {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-queue.select-all {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-queue.clear-queue {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-queue:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-optimization-panel {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ai-header h3 {
    color: #4c1d95;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 600;
    color: #475569;
}

.ai-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ======================
   PROCESSING & RESULTS
   ====================== */
.processing-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.processing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.processing-header h4 {
    color: #1e40af;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cancel-processing {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.cancel-processing:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.results-section {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(21, 128, 61, 0.08));
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(34, 197, 94, 0.1);
}

.results-header h4 {
    color: #166534;
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.overall-savings {
    text-align: right;
}

.savings-label {
    font-size: 0.9rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
}

.savings-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.download-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 1rem;
}

.download-btn.individual {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.download-btn.batch {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ======================
   COMPREHENSIVE RESPONSIVE STYLES
   ====================== */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .tool-container {
        padding: 0 2rem;
    }
    
    .upload-section {
        padding: 5rem 3rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Medium screens (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .tool-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .header-content h1 {
        font-size: 2.8rem;
    }
    
    .tool-description {
        font-size: 1.3rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
}

/* Tablet screens (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .tool-header {
        padding: 3rem 2rem;
    }
    
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .tool-description {
        font-size: 1.2rem;
    }
    
    .feature-badges {
        gap: 0.75rem;
    }
    
    .upload-section {
        padding: 3rem 2rem;
        margin: 1.5rem auto;
    }
    
    .upload-content h3 {
        font-size: 1.5rem;
    }
    
    .upload-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .image-info-panel {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .format-tabs {
        justify-content: center;
    }
    
    .download-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Small tablets and large phones (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .tool-header {
        padding: 2.5rem 1.5rem;
    }
    
    .header-content h1 {
        font-size: 2.2rem;
    }
    
    .header-content h1 i {
        margin-right: 10px;
    }
    
    .tool-description {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .feature-badges {
        gap: 0.5rem;
    }
    
    .badge {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .upload-section {
        padding: 2.5rem 1.5rem;
        margin: 1rem auto;
    }
    
    .upload-icon {
        font-size: 3.5rem;
    }
    
    .upload-content h3 {
        font-size: 1.4rem;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .upload-info {
        font-size: 0.85rem;
    }
    
    .upload-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .instructions-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .format-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .tab-btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .queue-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .queue-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile phones (575px and below) */
@media (max-width: 575px) {
    .tool-container {
        margin: 0;
        border-radius: 0;
    }
    
    .tool-header {
        padding: 2rem 1rem;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .header-content h1 i {
        display: block;
        margin-right: 0;
        margin-bottom: 0.5rem;
        font-size: 2rem;
    }
    
    .tool-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .feature-badges {
        gap: 0.5rem;
    }
    
    .badge {
        padding: 6px 12px;
        font-size: 0.8rem;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    .upload-section {
        padding: 2rem 1rem;
        margin: 1rem 0.5rem;
        border-radius: 16px;
    }
    
    .upload-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .upload-content h3 {
        font-size: 1.25rem;
    }
    
    .upload-text {
        font-size: 0.95rem;
    }
    
    .upload-info {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .upload-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .upload-btn {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .tool-instructions,
    .blog-content,
    .faq-section,
    .converter-container,
    .batch-queue,
    .processing-panel,
    .results-section {
        margin: 1rem 0.5rem;
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .instructions-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .instruction-step {
        padding: 1rem;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .format-option label {
        padding: 1rem 0.75rem;
    }
    
    .format-icon {
        font-size: 1.5rem;
    }
    
    .format-name {
        font-size: 0.9rem;
    }
    
    .format-desc {
        font-size: 0.75rem;
    }
    
    .format-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        border-radius: 6px;
    }
    
    h2 {
        font-size: 1.4rem;
        text-align: center;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .ai-header,
    .queue-header,
    .processing-header,
    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .ai-toggle-container {
        justify-content: center;
    }
    
    .queue-actions,
    .download-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-queue,
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .overall-savings {
        text-align: center;
    }
}

/* Extra small devices (400px and below) */
@media (max-width: 400px) {
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .tool-description {
        font-size: 0.95rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .upload-section {
        padding: 1.5rem 0.75rem;
    }
    
    .upload-content h3 {
        font-size: 1.1rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .format-option label {
        padding: 0.75rem 0.5rem;
    }
    
    .format-icon {
        font-size: 1.25rem;
    }
    
    .format-name {
        font-size: 0.8rem;
    }
    
    .format-desc {
        font-size: 0.7rem;
    }
    
    .tab-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }
    
    .upload-btn,
    .action-btn,
    .btn-queue,
    .download-btn {
        font-size: 0.85rem;
        padding: 0.75rem 0.75rem;
    }
    
    .tool-instructions,
    .blog-content,
    .faq-section,
    .converter-container,
    .batch-queue,
    .processing-panel,
    .results-section {
        margin: 0.75rem 0.25rem;
        padding: 1rem 0.75rem;
    }
}
