/* ======================
   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: expandContract 2s infinite;
}

@keyframes expandContract {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@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; }
.quality-badge { background: rgba(76,175,80,0.2); color: #4CAF50; }
.speed-badge { background: rgba(233,30,99,0.2); color: #E91E63; }
.preset-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);
}

/* ======================
   TOOL INSTRUCTIONS
   ====================== */
.tool-instructions {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-instructions h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instructions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.instruction-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1rem;
}

.instruction-step p {
    color: #64748b;
    line-height: 1.6;
    margin: 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-text {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.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;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1;
}

.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:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* ======================
   RESIZER CONTAINER
   ====================== */
.resizer-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
}

/* ======================
   IMAGE INFO PANEL
   ====================== */
.image-info-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);
}

.image-info-panel h3 {
    color: #4c1d95;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.image-metadata p {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

/* ======================
   PREVIEW CONTAINER
   ====================== */
.preview-container {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ======================
   RESIZE OPTIONS
   ====================== */
.resize-options {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.resize-options h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.resize-options h4 {
    margin: 1.5rem 0 1rem;
    color: #475569;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Presets */
.presets-container {
    margin-bottom: 2rem;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preset-btn {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    text-align: left;
}

.preset-btn i {
    margin-right: 12px;
    font-size: 1.2rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.preset-btn:hover {
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.preset-btn:hover i {
    transform: scale(1.2);
}

/* Custom Dimensions */
.custom-dimensions {
    margin-bottom: 2rem;
}

.dimension-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    align-items: end;
    margin-top: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
}

.input-group input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: #667eea;
    outline: none;
}

.checkbox-container {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: #475569;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Quality Settings */
.quality-settings {
    margin-bottom: 2rem;
}

.quality-slider-container {
    margin: 1rem 0;
}

.quality-slider-container label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    transition: background 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.quality-info {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* Output Format */
.output-format {
    margin-bottom: 2rem;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.format-option {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.format-option:has(input:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.format-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #475569;
}

.format-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* ======================
   ACTION BUTTONS
   ====================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.reset-btn,
.resize-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.reset-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.reset-btn:hover {
    background: linear-gradient(135deg, #5a6268, #3d4245);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.5);
}

.resize-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    flex: 1;
    max-width: 300px;
}

.resize-btn:hover {
    background: linear-gradient(135deg, #218838, #1aa179);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

/* ======================
   BLOG SECTION
   ====================== */
.blog-section {
    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);
    border-top: 4px solid #667eea;
}

.blog-section h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a5568;
}

.blog-content h3 {
    margin: 2rem 0 1rem;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
}

.blog-content p {
    margin-bottom: 1.25rem;
}

.blog-content ul,
.blog-content ol {
    margin: 1.25rem 0;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.75rem;
}

.blog-content strong {
    color: #2c3e50;
    font-weight: 700;
}

/* ======================
   COMPREHENSIVE RESPONSIVE STYLES
   ====================== */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .tool-container {
        padding: 0 2rem;
    }
    
    .upload-section {
        padding: 5rem 3rem;
    }
    
    .presets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dimension-controls {
        grid-template-columns: auto auto auto 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;
    }
    
    .presets-grid {
        grid-template-columns: repeat(2, 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;
    }
    
    .instructions-container {
        grid-template-columns: 1fr;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
    }
    
    .dimension-controls {
        grid-template-columns: 1fr 1fr;
    }
    
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .resize-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .reset-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* 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-text {
        font-size: 1rem;
    }
    
    .upload-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .instructions-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .resizer-container {
        padding: 1.5rem;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .dimension-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 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-text {
        font-size: 0.95rem;
    }
    
    .upload-btn {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .tool-instructions,
    .resize-options,
    .image-info-panel,
    .blog-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: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .resizer-container {
        padding: 1rem;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .preset-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .dimension-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .format-options {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .reset-btn,
    .resize-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .image-metadata {
        grid-template-columns: 1fr;
    }
}

/* 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-icon {
        font-size: 2.5rem;
    }
    
    .preset-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .upload-btn,
    .reset-btn,
    .resize-btn {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .tool-instructions,
    .resize-options,
    .image-info-panel,
    .blog-section {
        margin: 0.75rem 0.25rem;
        padding: 1rem 0.75rem;
    }
}
