/* Modern Professional Design for PDF Tools */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #ebefff;
    --secondary-color: #6c63ff;
    --accent-color: #4cc9f0;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #2d3748;
    --light-color: #f8fafc;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background-color: white;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.nav-brand i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1.6rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

/* Dropdown Navigation Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dropdown-toggle .fas.fa-chevron-down {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle .fas.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
    margin: 0;
}

.dropdown-menu li a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-menu li a i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

.nav-menu li a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-menu li a i {
    margin-right: 0.5rem;
}

.nav-menu li a:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.nav-menu li a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: white;
        width: 80%;
        height: calc(100vh - 70px);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: 0.3s;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        padding: 1rem;
    }
    
    /* Mobile dropdown styles */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0;
        margin-left: 1rem;
        background: var(--gray-100);
        border-radius: var(--border-radius-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.mobile-open .dropdown-menu {
        max-height: 300px;
    }
    
    .dropdown-toggle .fas.fa-chevron-down {
        margin-left: auto;
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

/* Enhanced Header */
.hero-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    padding: 3rem 2rem;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    color: white;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

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

.brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 2.2rem;
    margin-right: 0.75rem;
    color: var(--accent-color);
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.hero-tagline {
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    margin: 1.5rem auto 0;
    display: inline-block;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.8rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.trust-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.trust-item i {
    margin-right: 0.5rem;
}

/* Enhanced Tool Section */
.tools-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin: 0 1rem 2rem;
}

.tool-section {
    display: none;
    padding: 2.5rem;
}

.tool-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tool-header h2 {
    font-size: 2rem;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-header h2 i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.tool-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

/* Enhanced Upload Area */
.upload-area.enhanced {
    border: 2px dashed var(--gray-400);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: var(--gray-100);
}

.upload-area.enhanced:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-area.enhanced.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.01);
    box-shadow: var(--shadow-md);
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.upload-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.upload-content p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.browse-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.supported-formats {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 1rem;
}

/* Enhanced File List */
.file-list.enhanced {
    background: var(--gray-100);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0 2rem;
    min-height: 60px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.file-size {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.remove-file {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #c0392b;
}

/* Enhanced Convert Button */
.convert-btn.enhanced {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1rem;
    min-width: 200px;
    box-shadow: var(--shadow-md);
}

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

.convert-btn.enhanced:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.convert-btn.enhanced:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    box-shadow: none;
}

/* Option Cards */
.option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.option-card {
    cursor: pointer;
    position: relative;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-content {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.option-content i {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--gray-600);
}

.option-content span {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.option-content small {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.option-card input[type="radio"]:checked + .option-content {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.option-card input[type="radio"]:checked + .option-content i {
    color: var(--primary-color);
}

/* Enhanced Input */
.enhanced-input,
.page-input.enhanced input,
.settings-grid select,
.settings-grid input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.enhanced-input:focus,
.page-input.enhanced input:focus,
.settings-grid select:focus,
.settings-grid input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Settings */
.conversion-settings,
.split-options.enhanced,
.compression-options.enhanced,
.delete-options.enhanced {
    background: var(--gray-100);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.conversion-settings h3,
.split-options.enhanced h3,
.compression-options.enhanced h3,
.delete-options.enhanced h3 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    color: var(--gray-800);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.setting-group {
    margin-bottom: 1rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Progress Modal */
.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.progress-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.progress-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.progress-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.progress-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary-color);
    animation: progress 2s infinite linear;
}

.progress-text {
    color: var(--gray-600);
    font-size: 1rem;
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.success-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 2.5rem;
    color: var(--success-color);
}

.success-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.success-content p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 1rem;
}

.download-btn.primary {
    background: var(--primary-color);
    color: white;
}

.download-btn.secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

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

.download-btn:hover {
    transform: translateY(-2px);
}

/* Enhanced Footer */
.enhanced-footer {
    padding: 4rem 2rem 2rem;
    background: var(--gray-800);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--gray-400);
    margin-top: 1rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 30px;
    height: 3px;
    background: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
    color: var(--gray-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes progress {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

/* Preview Area Styles */
.preview-area {
    min-height: 60px;
    margin: 1.5rem 0;
}

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

.image-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-200);
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.image-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-item:hover .image-remove {
    opacity: 1;
}

/* Ad Sections */
.ad-section {
    padding: 15px 0;
    text-align: center;
    background-color: #f5f7fa;
    border-bottom: 1px solid #e2e8f0;
}

.convert-tools-ad {
    margin: 20px 0;
    border-top: 1px solid #e2e8f0;
}

.footer-ad {
    border-top: 1px solid #e2e8f0;
    border-bottom: none;
    margin: 20px 0;
    background-color: transparent;
}

.ad-content {
    max-width: 1200px;
    margin: 0 auto;
}

.ad-placeholder {
    margin: 0 auto;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    border: 1px dashed #cbd5e0;
    overflow: hidden;
}

/* Header and Footer Desktop Ads - Leaderboard 728x90px */
.header-ad .desktop-ad,
.footer-ad .desktop-ad {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

/* Middle Desktop Ad - Large Rectangle 336x280px */
.convert-tools-ad .desktop-ad {
    width: 336px;
    height: 280px;
    max-width: 100%;
}

/* Header and Middle Mobile Ads - Medium Rectangle 300x250px */
.header-ad .mobile-ad,
.convert-tools-ad .mobile-ad {
    width: 300px;
    height: 250px;
    display: none;
    max-width: 100%;
}

/* Footer Mobile Ad - Mobile Banner 320x50px */
.footer-ad .mobile-ad {
    width: 320px;
    height: 50px;
    display: none;
    max-width: 100%;
}

/* Image converter specifics */
.resize-options {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.dimension-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.dimension-group {
    flex: 1;
}

.dimension-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.dimension-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 8px;
}

.checkbox-label input {
    margin-right: 8px;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.file-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.file-type {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Image Resizer Specific Styles */
.compression-preview {
    background: var(--gray-100);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.compression-preview h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
    text-align: center;
}

.preview-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.preview-item {
    text-align: center;
}

.preview-item h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.preview-item canvas {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.75rem;
}

.preview-item p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.custom-dimensions,
.preset-sizes {
    margin-top: 1rem;
}

.custom-dimensions label,
.preset-sizes label {
    margin-top: 0.75rem;
}

.target-size-input {
    position: relative;
}

.target-size-input::after {
    content: 'KB';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 0.9rem;
}

.size-suggestions {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
}

.size-suggestions h5 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.size-suggestions ul {
    list-style: none;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.size-suggestions li {
    margin-bottom: 0.25rem;
}

.compression-result {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin: 1rem 0;
}

.result-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
}

.metric.highlight {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
}

/* Anti-bot Protection */
.g-recaptcha {
    margin: 20px auto;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-header {
        padding: 2rem 1rem;
    }
    
    .brand h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .tool-section {
        padding: 1.5rem;
    }
    
    .tool-header h2 {
        font-size: 1.6rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .upload-area.enhanced {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .upload-content h3 {
        font-size: 1.25rem;
    }
    
    .option-cards {
        grid-template-columns: 1fr;
    }
    
    .download-actions {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Mobile ad adjustments */
    .desktop-ad {
        display: none;
    }
    
    .mobile-ad {
        display: flex;
        margin: 0 auto;
    }
    
    /* Ensure mobile ads fit properly on small screens */
    .header-ad .mobile-ad,
    .convert-tools-ad .mobile-ad {
        max-width: calc(100vw - 2rem);
        width: min(300px, calc(100vw - 2rem));
    }
    
    .footer-ad .mobile-ad {
        max-width: calc(100vw - 2rem);
        width: min(320px, calc(100vw - 2rem));
    }
    
    .ad-section {
        padding: 10px 1rem;
    }
}