/*
* MORELESS CSS Minifier & Beautifier - Main Stylesheet
* Compact single-screen design optimized for instant use
* Performance optimized for 60fps on all devices
*/

/* Font Override - Ensure Inter is used everywhere except icons and mode buttons */
*:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(.fat):not(.mode-title):not(.mode-desc) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Glass Morphism Design Variables - MORELESS Standard */
:root {
    /* Glass Morphism Core */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 77, 41, 0.15);
    --glass-bg-secondary: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(20px) saturate(120%);
    --glass-blur-light: blur(8px) saturate(110%);
    
    /* MORELESS Brand Colors */
    --color-dark: #031024;
    --color-dark-accent: #051e3e;
    --color-dark-light: #0a1932;
    --color-primary: #FF4D29;
    --color-primary-light: rgba(255, 77, 41, 0.1);
    --color-primary-dark: #e64024;
    --color-secondary: #0055A4;
    --color-secondary-light: rgba(0, 85, 164, 0.1);
    --color-white: #FFFFFF;
    --color-light-gray: rgba(255, 255, 255, 0.7);
    --color-gray: rgba(255, 255, 255, 0.5);
    --color-dark-gray: rgba(255, 255, 255, 0.1);
    --color-success: #27AE60;
    --color-success-light: rgba(39, 174, 96, 0.15);
    --color-warning: #F39C12;
    --color-warning-light: rgba(243, 156, 18, 0.15);
    --color-error: #E74C3C;
    --color-error-light: rgba(231, 76, 60, 0.15);
    --color-info: #3498DB;
    --color-info-light: rgba(52, 152, 219, 0.15);
    --color-purple: #9B59B6;
    --color-purple-light: rgba(155, 89, 182, 0.15);

    /* Text Colors */
    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.75);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.875rem;
    --font-size-3xl: 2.25rem;
    --font-size-4xl: 3rem;
    --font-size-5xl: 3.75rem;
    --font-size-6xl: 4.5rem;
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    
    /* Border Radius */
    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-fire: 0 0 12px rgba(255, 77, 41, 0.3);
    --shadow-fire-lg: 0 0 20px rgba(255, 77, 41, 0.4);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.1);
    
    /* Z-Index Scale */
    --z-behind: -1;
    --z-normal: 0;
    --z-above: 1;
    --z-sticky: 10;
    --z-fixed: 100;
    --z-overlay: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
    --z-tooltip: 4000;
    --z-confetti: 5000;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 16, 36, 0.95);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-dark-gray);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Global resets */
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    background: radial-gradient(ellipse at top left, #05204b 25%, #031127 60%);
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    position: relative;
    opacity: 1;
}

body.page-ready .main-content {
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

@media (max-width: 1024px) {
    body {
        background: linear-gradient(180deg, #05204b 0%, #031127 100%);
    }
}

body::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 77, 41, 0.15), transparent 60%);
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Universal box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark-gray);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: background var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Selection Styling */
::selection {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Layout - Single column without sidebars */
.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    box-sizing: border-box;
}

.main-column {
    min-width: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Container classes */
.tool-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    box-sizing: border-box;
    position: relative;
}

.tool-container .content-wrapper {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.wide-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.wide-container .content-wrapper {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

/* Main content */
.main-content {
    opacity: 0;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: var(--space-md) 0;
    position: relative;
    background: radial-gradient(circle at 15% 10%, rgb(255 77 41 / 11%) -2%, transparent 30%), radial-gradient(circle at 70% 85%, rgba(0, 85, 164, 0.12) 0%, transparent 55%);
    width: 100%;
    box-sizing: border-box;
}

/* Compact Hero Section */
.hero {
    text-align: center;
    margin-bottom: var(--space-md);
    padding: var(--space-xs) 0;
}

.hero-title {
    font-size: var(--font-size-xl);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: var(--font-size-base);
    color: var(--color-light-gray);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.3;
}

/* Compact Converter Section */
.compact-converter {
    margin-bottom: var(--space-xl);
}

/* Content Wrapper - MORELESS Standard */
.content-wrapper {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    position: relative;
    z-index: 10;
    overflow: hidden;
    contain: layout;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
}

/* Spacing between content wrappers */
.content-wrapper.analytics-wrapper {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.content-wrapper.features-wrapper {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.content-wrapper.faq-wrapper {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

/* Specific padding adjustments for converter */
.compact-converter .content-wrapper {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

/* Analytics wrapper specific styles */
.analytics-wrapper {
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
}

.analytics-wrapper::before {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
}

/* Mode Selector Row */
.mode-selector-row {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-dark-gray);
    transition: margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-selector-row.collapsed {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
}

.mode-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    margin: 0;
}

.mode-label i {
    color: var(--color-primary);
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   MODE TABS - ICON-INTEGRATED CARDS (COMPACT FLEXBOX - 2 TABS)
   ═══════════════════════════════════════════════════════════════ */

.mode-buttons-integrated {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px;
    justify-content: center;
}

.mode-btn-integrated {
    flex: 1 1 200px;
    max-width: 250px;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.mode-btn-integrated::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #FF4D29, #ff6b47);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-btn-integrated:hover {
    transform: translateX(4px);
    border-color: rgba(255, 77, 41, 0.4);
    background: rgba(255, 77, 41, 0.08);
}

.mode-btn-integrated:hover::before {
    transform: scaleY(1);
}

.mode-btn-integrated.active {
    background: rgba(25, 111, 61, 0.15);
    border-color: #196F3D;
}

.mode-btn-integrated.active::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, #196F3D, #228B22);
}

.mode-icon-integrated {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FF4D29, #ff6b47);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    flex-shrink: 0;
}

.mode-btn-integrated.active .mode-icon-integrated {
    background: linear-gradient(135deg, #196F3D, #228B22);
}

.mode-content-integrated {
    flex: 1;
    min-width: 0;
}

.mode-title-integrated {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 2px;
}

.mode-desc-integrated {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

/* ============================================
   MODE COLLAPSE/EXPAND FUNCTIONALITY
   ============================================ */

/* Mode header row (collapse button + label) */
.mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

/* Collapse button */
.mode-collapse-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-collapse-btn:hover {
    background: rgba(255, 77, 41, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.mode-collapse-btn i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsible content wrapper */
.mode-collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 500px;
    opacity: 1;
}

/* Collapsed state */
.mode-selector-row.collapsed .mode-collapsible-content {
    max-height: 0;
    opacity: 0;
}

.mode-selector-row.collapsed .mode-collapse-btn i {
    transform: rotate(180deg);
}

/* Converter Grid */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-xl);
    align-items: stretch;
    margin-bottom: var(--space-lg);
    margin-top: var(--space-xs);
    box-sizing: border-box;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--color-white);
    font-size: var(--font-size-sm);
}

.section-label i {
    color: var(--color-primary);
    font-size: var(--font-size-md);
}

.section-actions {
    display: flex;
    gap: var(--space-xs);
}

.action-btn-inline {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: var(--font-size-sm);
    overflow: hidden;
    contain: layout style;
    flex-shrink: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.action-btn-inline:hover {
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
    border-color: rgba(255, 77, 41, 0.4);
    background: var(--glass-bg-hover);
}

/* Colored variants with glass morphism */
#clearBtn {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.15);
    color: rgba(231, 76, 60, 0.9);
}

#clearBtn:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
}

#downloadBtn {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.15);
    color: rgba(52, 152, 219, 0.9);
}

#downloadBtn:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.25);
    color: #3498db;
}

/* Toggle Button Styles */
.action-btn-inline.toggle-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn-inline.toggle-btn.active {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.25);
    color: #ffc107;
}

.action-btn-inline.toggle-btn.active:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.3);
}

/* Code Editor Styles - IDENTICAL TO BASE64 */
.textarea-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    min-height: 300px;
    max-height: 600px;
    height: 300px;
    box-sizing: border-box;
    width: 100%;
    flex: 1;
}

.text-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: var(--space-md);
    border: 1px solid transparent; /* Transparent when hidden, prevents double border with watermark */
    border-radius: var(--radius-md);
    background: rgba(8, 22, 50, 0.55);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-family: var(--font-mono);
    outline: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: none;
    box-sizing: border-box;
    line-height: 1.6;
    z-index: 2;
    opacity: 0;
    cursor: pointer;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

/* Show text input ONLY when focused or has content */
.text-input:focus,
.textarea-container.has-content .text-input {
    opacity: 1;
    /* Background already set in base .text-input rule */
    /* No backdrop-filter - parent .content-wrapper already provides it */
    border-color: var(--glass-border); /* Show border only when visible */
    cursor: text;
}

.text-input:focus {
    border-color: var(--color-primary);
}

.text-input::placeholder {
    color: transparent;
}

.code-editor {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    background: rgba(8, 22, 50, 0.55);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-mono);
    outline: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: none;
    min-height: 300px;
    max-height: 600px;
    height: 300px;
    box-sizing: border-box;
    width: 100%;
    line-height: 1.6;
    contain: layout style;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

.code-editor:focus {
    border-color: var(--color-primary);
}

.code-editor::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* Drag & Drop Watermark */
.drop-zone-watermark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 22, 50, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    /* No backdrop-filter here - parent .content-wrapper already has it */
    /* Adding another backdrop-filter here causes double saturation/blur */
    z-index: 1;
    pointer-events: auto;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: text;
}

.textarea-container.has-content .drop-zone-watermark {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.textarea-container.dragging .drop-zone-watermark {
    opacity: 1;
    visibility: visible;
    background: linear-gradient(135deg, rgba(255, 77, 41, 0.1) 0%, rgba(255, 77, 41, 0.05) 100%);
    border: 2px dashed var(--color-primary);
    pointer-events: all;
}

.watermark-content {
    text-align: center;
    color: var(--color-gray);
    pointer-events: none;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    contain: layout style;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.watermark-content i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    opacity: 0.6;
}

.watermark-content h3 {
    font-size: var(--font-size-lg);
    color: var(--color-light-gray);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.supported-formats {
    margin-top: var(--space-sm);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.format-badge {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 77, 41, 0.1);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Syntax Errors Display */
.syntax-errors {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-md);
}

.error-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-error);
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.error-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.error-item {
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.2s ease;
}

.error-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Center Actions */
.center-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-sm);
}

.convert-btn {
    padding: var(--space-md) var(--space-lg);
    min-width: 120px;
    height: 44px;
    contain: layout style;
    flex-shrink: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.swap-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: var(--font-size-lg);
    overflow: hidden;
    contain: layout style;
    flex-shrink: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.swap-btn:hover:not(.disabled) {
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
    border-color: rgba(255, 77, 41, 0.4);
    background: var(--glass-bg-hover);
}

.swap-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--color-dark-gray);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
}

/* Diff View Section - IMPROVED DESIGN */
.diff-view-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-dark-gray);
}

.diff-header {
    margin-bottom: var(--space-lg);
}

.diff-header h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
}

.diff-header i {
    color: var(--color-primary);
}

.diff-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.diff-panel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.diff-panel:hover {
    border-color: rgba(255, 77, 41, 0.3);
    transform: translateY(-2px);
}

.diff-panel-header {
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-white);
}

.diff-panel-header i {
    color: var(--color-primary);
}

.diff-code {
    margin: 0;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    max-height: 400px;
    min-height: 200px;
}

.diff-code code {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    line-height: 1.6;
    color: var(--text-primary);
}

/* ============================================
   MODE SELECTOR - Image Resizer Style
   ============================================ */

.mode-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent);
    margin: var(--space-sm) 0;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.content-wrapper:hover .mode-divider {
    opacity: 0.8;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
    max-width: 500px;
    margin: 0 auto var(--space-md);
    justify-content: center;
}

.mode-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    text-align: center;
    color: var(--text-primary);
    min-height: 80px;
    box-sizing: border-box;
    width: 100%;

    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.mode-btn:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: rgba(255, 77, 41, 0.4);
    background: var(--glass-bg-hover);
}

.mode-btn:hover::before {
    transform: scaleX(1);
}

.mode-btn.active {
    background: rgba(25, 111, 61, 0.15);
    border-color: #196F3D;
    transform: translate3d(0, -2px, 0);
}

.mode-btn.active::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, #196F3D 100%);
}

.mode-btn.active:hover {
    background: rgba(25, 111, 61, 0.2);
    border-color: #196F3D;
    transform: translate3d(0, -4px, 0) scale3d(1.02, 1.02, 1);
}

.mode-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), #ff6b47);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    font-family: var(--font-primary);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-icon i {
    color: white;
}

.mode-btn.active .mode-icon {
    background: linear-gradient(135deg, #196F3D, #228B22);
}

.mode-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mode-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.mode-desc {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   SETTINGS PANEL - Image Resizer Style
   ============================================ */

.settings-panel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: 0;
    margin-bottom: var(--space-lg); /* Space between settings and input/output sections */
}

/* Preset Selector - Inside Settings Panel */
.preset-selector {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preset-buttons-row {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.preset-btn {
    padding: 4px var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                border-color 0.2s ease,
                background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.preset-btn:hover {
    background: rgba(255, 77, 41, 0.08);
    border-color: rgba(255, 77, 41, 0.2);
    color: var(--color-white);
}

.preset-btn.active {
    background: rgba(255, 77, 41, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Settings Layout Grid - 2 Column Layout */
.settings-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    width: 100%;
    align-items: stretch;
}

.settings-left-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.settings-right-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Setting Group Cards - Glass Morphism */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex: 1;
    border-radius: var(--radius-md);
}

/* Setting Labels */
.setting-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Option Checkbox - 1:1 Copy from Image Resizer */
.option-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-checkbox:hover {
    color: var(--color-white);
}

.option-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--color-gray);
    border-radius: var(--radius-sm);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
    transition: transform var(--transition-bounce);
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-label {
    user-select: none;
}

/* Auto-process specific styling */
.auto-convert-option .checkbox-label {
    font-size: 14px;
}

/* ============================================
   MODE SETTINGS - Mode-specific visibility
   ============================================ */

.mode-settings {
    display: block;
}

.mode-settings.hidden {
    display: none;
}

/* ============================================
   ADVANCED TOGGLE BUTTON
   ============================================ */

.advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    margin-top: var(--space-md);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.advanced-toggle:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(255, 77, 41, 0.3);
    color: var(--text-primary);
    transform: translate3d(0, -1px, 0);
}

.advanced-toggle i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-toggle.active i {
    transform: rotate(180deg);
}

/* ============================================
   ADVANCED SETTINGS - Collapsible Section
   ============================================ */

.advanced-settings {
    max-height: 500px;
    overflow: hidden;
    opacity: 1;
    margin-top: var(--space-md);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                margin-top 0.3s ease;
}

.advanced-settings.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.advanced-settings .settings-layout-grid {
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   SELECT DROPDOWN - Custom Styling
   ============================================ */

.option-select {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.select-label {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: rgba(8, 22, 50, 0.45);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.7)' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    padding-right: var(--space-2xl);
    transition: border-color 0.3s ease,
                box-shadow 0.3s ease,
                background-color 0.3s ease;
}

.custom-select:hover {
    border-color: rgba(255, 77, 41, 0.3);
    background-color: var(--glass-bg-hover);
}

.custom-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.custom-select option {
    background: var(--color-dark-accent);
    color: var(--text-primary);
    padding: var(--space-sm);
}

/* Bottom Bar */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-dark-gray);
}

.options-group {
    display: flex;
    gap: var(--space-lg);
}

.stats-group {
    display: flex;
    gap: var(--space-md);
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    min-width: 60px;
    height: 44.78px;
    contain: layout style;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.stat-badge.primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.stat-value {
    font-size: 14px;
    font-weight: 900;
    color: var(--color-white);
    font-family: var(--font-primary);
}

.stat-label {
    font-size: 9px;
    color: var(--color-light-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-badge.primary .stat-label {
    color: var(--color-white);
}

/* Analytics Section */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.analytics-header h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.analytics-header i {
    color: var(--color-primary);
    font-size: 16px;
}

.reset-stats-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0 var(--space-md);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reset-stats-btn i {
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reset-stats-btn:hover {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error) 100%);
    border-color: var(--color-error);
    color: var(--color-white);
    transform: translateY(-1px);
}

.reset-stats-btn:hover i {
    color: var(--color-white);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.analytics-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.analytics-card:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}

.analytics-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.analytics-data {
    flex: 1;
}

.analytics-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-white);
    font-family: var(--font-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.analytics-label {
    font-size: var(--font-size-xs);
    color: var(--color-light-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

/* How to Use Section */
.usage-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.usage-steps-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: nowrap;
    margin-bottom: var(--space-2xl);
}

.usage-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 200px;
}

.step-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), #ff6b47);
    border-radius: 50%;
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.step-icon:hover {
    transform: scale3d(1.05, 1.05, 1);
    will-change: transform;
}

.step-icon i {
    font-size: 1.5rem;
    color: white;
}

.step-num {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--color-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 800;
    border: 2px solid var(--color-primary);
}

.usage-step h4 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.usage-step p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-arrow {
    display: flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 30px;
    color: var(--color-primary);
    font-size: 1.5rem;
    opacity: 0.7;
}

.quick-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.quick-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 72px;
    text-align: center;
}

.quick-feature:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}

.quick-feature i {
    font-size: 1.25rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.quick-feature span {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features Section */
.features-section {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-2xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.section-header p {
    font-size: var(--font-size-md);
    color: var(--color-light-gray);
    max-width: 600px;
    margin: 0 auto;
}

.section-header-with-action {
    position: relative;
}

.docs-link-btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0 var(--space-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: 1px solid rgba(255, 77, 41, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.docs-link-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

.docs-link-btn:hover::before {
    left: 100%;
}

.docs-link-btn i {
    color: var(--color-white);
}

.docs-link-short {
    display: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.feature-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.feature-card:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--font-size-xl);
    color: var(--color-white);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.feature-card p {
    color: var(--color-light-gray);
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin-bottom: var(--space-3xl);
}

.faq-grid {
    display: grid;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}

.faq-question {
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

.faq-question:hover {
    background: rgba(255, 77, 41, 0.1);
}

.faq-question h3 {
    font-size: var(--font-size-md);
    color: var(--color-white);
    font-weight: 600;
    margin: 0;
}

.faq-question i {
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-content {
    padding: 0 var(--space-xl) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.faq-answer p {
    color: var(--color-light-gray);
    line-height: 1.6;
    margin: 0;
    width: 100%;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--font-size-sm);
    text-decoration: none;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    border: 1px solid rgba(255, 77, 41, 0.3);
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

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

.btn-primary:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: -1;
    animation: shine 0.8s ease-out;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

/* Tool Tabs (Favorites) */
.tool-tabs {
    position: absolute;
    top: -44px;
    right: 64px;
    display: flex;
    gap: var(--space-sm);
    z-index: 5;
}

.tool-tab {
    position: relative;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.tool-tab i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 77, 41, 0.3);
}

.tool-tab:hover i {
    color: var(--color-primary);
}

.tool-tab.active i {
    color: #E74C3C;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.visible { display: block; }

/* Desktop only elements */
.desktop-only {
    display: flex;
}

/* Mobile action buttons - hidden on desktop */
.mobile-action-group {
    display: none;
}

.mobile-divider {
    display: none;
}

.mobile-group-label {
    display: none;
}

/* MOBILE AUTO-CONVERT HIDDEN */
@media (max-width: 768px) {
    .auto-convert-option {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 1600px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: 0 var(--space-md);
        max-width: 1200px;
        margin: 0 auto;
    }

    .main-column {
        max-width: 1200px;
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .analytics-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .converter-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .center-actions {
        flex-direction: row;
        padding: var(--space-md) 0;
    }

    .mode-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .diff-container {
        grid-template-columns: 1fr;
    }

    .settings-layout-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .settings-left-column,
    .settings-right-column {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .bottom-bar {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .tool-container {
        padding: 0 var(--space-md);
    }
    
    .hero {
        margin-top: -var(--space-lg);
        margin-bottom: var(--space-sm);
    }
    
    .hero-title {
        font-size: var(--font-size-lg);
    }
    
    .hero-description {
        font-size: var(--font-size-xs);
    }
    
    .content-wrapper {
        padding: var(--space-md);
    }
    
    .code-editor,
    .text-input {
        min-height: 300px;
        max-height: 300px;
        height: 300px;
        font-size: var(--font-size-xs);
    }

    .textarea-container {
        min-height: 300px;
        max-height: 300px;
        height: 300px;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .analytics-header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .reset-stats-btn {
        width: 100%;
        justify-content: center;
    }
    
    .mode-selector-row {
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-lg);
    }
    
    .mode-buttons {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .mode-btn {
        flex-direction: row;
        gap: var(--space-sm);
        justify-content: flex-start;
        padding: var(--space-sm) var(--space-md);
        min-height: 60px;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .mode-icon {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-md);
    }

    .mode-content {
        text-align: left;
    }

    .mode-title {
        font-size: 13px;
    }

    .mode-desc {
        font-size: 11px;
    }
    
    .desktop-only {
        display: none;
    }
    
    .converter-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    #autoUpdate {
        pointer-events: none;
        opacity: 0.7;
    }
    
    #autoUpdate:checked {
        pointer-events: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .feature-card {
        padding: var(--space-lg);
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: var(--font-size-lg);
    }
    
    .feature-card h3 {
        font-size: var(--font-size-md);
    }
    
    .feature-card p {
        font-size: var(--font-size-sm);
    }
    
    .faq-question {
        padding: var(--space-lg);
    }
    
    .faq-answer-content {
        padding: 0 var(--space-lg) var(--space-lg);
    }
    
    .usage-steps-horizontal {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .step-arrow {
        transform: rotate(90deg);
        font-size: 1.25rem;
    }

    .step-icon {
        width: 70px;
        height: 70px;
    }

    .step-icon i {
        font-size: 1.25rem;
    }
    
    .bottom-bar {
        padding-top: var(--space-md);
        justify-content: center;
    }
    
    .stats-group {
        gap: var(--space-sm);
    }
    
    .stat-badge {
        min-width: 50px;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .preset-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tool-container,
    .wide-container {
        padding: 0 var(--space-sm);
    }
    
    .hero {
        padding: var(--space-xs) 0;
        margin-bottom: var(--space-sm);
        margin-top: -var(--space-xl);
    }
    
    .hero-title {
        font-size: var(--font-size-md);
    }
    
    .content-wrapper {
        padding: var(--space-sm);
    }
    
    .code-editor,
    .text-input {
        padding: var(--space-sm);
        font-size: var(--font-size-xs);
        min-height: 150px;
        max-height: 300px;
        height: 150px;
    }
    
    .textarea-container {
        min-height: 150px;
        max-height: 300px;
        height: 150px;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-card {
        padding: var(--space-sm);
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .action-btn-inline {
        width: 28px;
        height: 28px;
        font-size: var(--font-size-xs);
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .feature-card {
        padding: var(--space-lg);
    }
    
    .faq-question {
        padding: var(--space-md);
    }
    
    .faq-question h3 {
        font-size: var(--font-size-sm);
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
    }

    .step-icon i {
        font-size: 1.125rem;
    }

    .usage-step h4 {
        font-size: var(--font-size-base);
    }

    .usage-step p {
        font-size: var(--font-size-xs);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }
}

/* Print Styles */
@media print {
    .tool-tabs,
    .btn,
    .faq-section,
    .section-actions,
    .center-actions {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .page-layout {
        grid-template-columns: 1fr;
    }

    .content-wrapper,
    .analytics-card,
    .feature-card {
        border: 1px solid #ccc;
        background: white;
        color: black;
        break-inside: avoid;
    }

    .hero-title,
    .section-header h2 {
        color: black;
    }

    .stat-value,
    .analytics-value {
        color: #333;
    }
}

/* TABLET OPTIMIZATION (769px-1024px) - Keep usage steps and quick features in one row */
@media (max-width: 1024px) and (min-width: 769px) {
    /* How to use steps - 4 in one row on tablet */
    .usage-steps-horizontal {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
        gap: var(--space-lg);
    }

    .usage-step {
        flex: 1;
        max-width: 180px;
        text-align: center;
        align-items: center;
    }

    /* Quick features - single row on tablet */
    .quick-features {
        display: flex;
        flex-wrap: nowrap;
        gap: var(--space-sm);
    }

    .quick-feature {
        flex: 1;
        min-width: 0;
        padding: var(--space-sm);
    }

    .quick-feature span {
        font-size: 11px;
        line-height: 1.2;
    }
}

/* MOBILE OPTIMIZATION */

@media (max-width: 768px) {
    .usage-steps-horizontal {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        justify-items: center;
    }

    .usage-step {
        text-align: center;
        align-items: center;
    }

    .step-arrow {
        display: none;
    }

    .step-icon {
        width: 56px;
        height: 56px;
    }

    .step-icon i {
        font-size: 1.25rem;
    }

    .usage-step h4 {
        font-size: var(--font-size-sm);
    }

    .usage-step p {
        font-size: var(--font-size-xs);
    }

    .quick-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .quick-feature {
        min-width: 0;
        padding: var(--space-sm);
    }

    .quick-feature span {
        font-size: 11px;
        line-height: 1.2;
    }
}

@media (max-width: 768px) {
    body {
        background: linear-gradient(180deg, #05204b 0%, #031127 100%);
    }

    .page-layout {
        padding: 0 var(--space-md);
        padding-bottom: 60px;
        transform: none;
    }

    .main-content {
        transform: none;
        contain: none;
        will-change: auto;
        background: radial-gradient(circle at 15% 10%, rgb(255 77 41 / 0%) -2%, transparent 30%),
                    radial-gradient(circle at 70% 85%, rgba(0, 85, 164, 0.12) 0%, transparent 55%);
    }

    .tool-container {
        padding: 0 var(--space-sm);
    }

    .hero {
        padding: var(--space-xs) var(--space-sm);
        margin-bottom: var(--space-md);
        transform: none;
        contain: none;
    }

    .tool-tabs {
        display: flex;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 56px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 0 var(--space-sm);
        background:
            linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%),
            linear-gradient(135deg, rgba(5,20,45,0.95) 0%, rgba(3,16,36,0.92) 50%, rgba(10,25,50,0.95) 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: none;
        z-index: 1000;
    }

    .tool-tab {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-md);
        border: 1px solid rgba(255, 255, 255, 0.15);
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
        pointer-events: auto;
        flex-shrink: 0;
    }

    .tool-tab:active {
        background: rgba(255, 255, 255, 0.15);
    }

    .tool-tab i {
        font-size: 16px;
    }

    .tool-tab:focus,
    .tool-tab:focus-visible {
        outline: none;
        border-color: rgba(255, 255, 255, 0.15);
    }

    .mobile-action-btn:focus,
    .mobile-action-btn:focus-visible {
        outline: none;
    }

    .mobile-action-btn:hover {
        border-color: rgba(255, 255, 255, 0.15);
    }

    .mobile-action-btn:hover i {
        color: rgba(255, 255, 255, 0.9);
    }

    .mobile-action-group {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .mobile-group-label {
        display: block;
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: rgba(255, 255, 255, 0.5);
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
    }

    .mobile-input-actions .mobile-group-label {
        color: rgba(0, 122, 255, 0.8);
    }

    .mobile-output-actions .mobile-group-label {
        color: rgba(39, 174, 96, 0.8);
    }

    .mobile-divider {
        display: block;
        flex-shrink: 0;
        width: 1px;
        min-width: 1px;
        height: 32px;
        background: rgba(255, 255, 255, 0.2);
        margin: 0 4px;
    }

    .mobile-action-btn[data-action="clear"] {
        background: rgba(231, 76, 60, 0.12);
        border: 1px solid rgba(231, 76, 60, 0.15);
    }

    .mobile-action-btn[data-action="clear"] i {
        color: rgba(231, 76, 60, 0.9);
    }

    .mobile-action-btn[data-action="clear"]:active {
        background: rgba(231, 76, 60, 0.2);
    }

    .mobile-action-btn[data-action="clear"]:hover i {
        color: rgba(231, 76, 60, 0.9);
    }

    .mobile-action-btn[data-action="download"] {
        background: rgba(52, 152, 219, 0.12);
        border: 1px solid rgba(52, 152, 219, 0.15);
    }

    .mobile-action-btn[data-action="download"] i {
        color: rgba(52, 152, 219, 0.9);
    }

    .mobile-action-btn[data-action="download"]:active {
        background: rgba(52, 152, 219, 0.2);
    }

    .mobile-action-btn[data-action="download"]:hover i {
        color: rgba(52, 152, 219, 0.9);
    }

    .section-actions {
        display: none;
    }

    .mode-label {
        font-size: 14px;
    }

    .section-label {
        font-size: 12px;
    }

    .bottom-bar {
        display: none;
    }

    .stat-badge {
        display: none;
    }

    .code-editor,
    .text-input {
        min-height: 300px;
        max-height: 300px;
        height: 300px;
    }

    .textarea-container {
        min-height: 300px;
        max-height: 300px;
        height: 300px;
    }

    .watermark-content {
        min-height: 200px;
    }

    .watermark-content i {
        font-size: 2rem;
        margin-bottom: var(--space-md);
    }

    .watermark-content h3 {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-xs);
    }

    .supported-formats {
        margin-top: var(--space-xs);
    }

    .usage-steps-horizontal {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        justify-items: center;
    }

    .usage-step {
        align-items: center;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    .usage-step p {
        margin: 0;
        line-height: 1.3;
    }

    .hero-title {
        font-size: var(--font-size-base);
    }

    .hero-description {
        font-size: var(--font-size-xs);
        max-width: 100%;
    }

    .content-wrapper {
        padding: var(--space-lg);
        border-radius: var(--radius-md);
    }

    .mode-buttons-integrated {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .mode-btn-integrated {
        flex: 1 1 calc(50% - var(--space-sm) / 2);
        min-width: calc(50% - var(--space-sm) / 2);
        max-width: none;
        padding: var(--space-sm) var(--space-md);
        min-height: 44px;
    }

    .mode-icon-integrated {
        width: 36px;
        height: 36px;
    }

    .mode-icon-integrated i {
        font-size: 14px;
    }

    .mode-title-integrated {
        font-size: var(--font-size-xs);
    }

    .mode-desc-integrated {
        font-size: 10px;
    }

    .section-header {
        margin-bottom: var(--space-md);
    }

    .section-header h2 {
        font-size: var(--font-size-sm);
    }

    .section-header p {
        font-size: var(--font-size-xs);
    }

    .docs-link-btn {
        height: 28px;
        padding: 0 var(--space-sm);
        font-size: 10px;
        border-radius: var(--radius-md);
    }

    .docs-link-full {
        display: none;
    }

    .docs-link-short {
        display: inline;
    }

    .analytics-header {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        align-items: center;
    }

    .analytics-header h4 {
        font-size: var(--font-size-sm);
    }

    .reset-stats-btn {
        width: auto;
        height: 28px;
        padding: 0 var(--space-sm);
        font-size: var(--font-size-xs);
        border-radius: var(--radius-md);
    }

    .analytics-card {
        padding: var(--space-sm);
    }

    .analytics-icon {
        width: 36px;
        height: 36px;
    }

    .analytics-icon i {
        font-size: var(--font-size-sm);
    }

    .analytics-value {
        font-size: var(--font-size-base);
    }

    .analytics-label {
        font-size: 9px;
    }

    .usage-compact {
        margin-top: var(--space-sm);
        gap: var(--space-sm);
    }

    .usage-steps-horizontal {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
        justify-items: center;
    }

    .usage-step {
        align-items: center;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    .step-arrow {
        display: none;
    }

    .step-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 4px;
    }

    .step-icon i {
        font-size: 0.9rem;
    }

    .usage-step h4 {
        font-size: 11px;
        margin-bottom: 0;
    }

    .usage-step p {
        font-size: 10px;
        margin: 0;
        line-height: 1.2;
    }

    .quick-features {
        display: flex;
        flex-wrap: nowrap;
        gap: var(--space-xs);
        margin-top: var(--space-xs);
    }

    .quick-feature {
        flex: 1;
        padding: var(--space-xs);
        flex-direction: column;
        text-align: center;
    }

    .quick-feature i {
        font-size: var(--font-size-sm);
    }

    .quick-feature span {
        font-size: 9px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .feature-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 0 var(--space-md);
        text-align: left;
        padding: var(--space-md);
        align-items: start;
    }

    .feature-icon {
        grid-row: 1 / 3;
        align-self: center;
        width: 44px;
        height: 44px;
    }

    .feature-card h3 {
        grid-column: 2;
        grid-row: 1;
        font-size: var(--font-size-sm);
        margin-bottom: 0;
    }

    .feature-card p {
        grid-column: 2;
        grid-row: 2;
        font-size: var(--font-size-xs);
        margin: 0;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .faq-question {
        min-height: 44px;
    }

    .faq-question h3 {
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 480px) {
    .page-layout {
        padding: 0 var(--space-sm);
    }

    .tool-container {
        padding: 0 var(--space-xs);
    }

    .hero {
        padding: 0 var(--space-xs);
        margin-bottom: var(--space-md);
    }

    .hero-title {
        font-size: var(--font-size-sm);
        font-weight: 800;
    }

    .hero-description {
        font-size: 11px;
        line-height: 1.4;
    }

    .content-wrapper {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .mode-buttons-integrated {
        gap: var(--space-xs);
    }

    .mode-btn-integrated {
        flex: 1 1 calc(50% - var(--space-xs) / 2);
        min-width: calc(50% - var(--space-xs) / 2);
        padding: var(--space-xs) var(--space-sm);
    }

    .mode-icon-integrated {
        width: 32px;
        height: 32px;
    }

    .mode-icon-integrated i {
        font-size: 12px;
    }

    .mode-title-integrated {
        font-size: 11px;
    }

    .mode-desc-integrated {
        font-size: 9px;
    }

    .tool-tab {
        width: 36px;
        height: 36px;
    }

    .tool-tab i {
        font-size: 14px;
    }

    .section-header h2 {
        font-size: var(--font-size-sm);
    }

    .section-header p {
        font-size: 11px;
    }

    .analytics-header h4 {
        font-size: var(--font-size-xs);
    }

    .reset-stats-btn {
        height: 24px;
        padding: 0 var(--space-xs);
        font-size: 10px;
        border-radius: var(--radius-md);
    }

    .analytics-icon {
        width: 32px;
        height: 32px;
    }

    .analytics-icon i {
        font-size: var(--font-size-xs);
    }

    .analytics-value {
        font-size: var(--font-size-sm);
    }

    .analytics-label {
        font-size: 8px;
    }

    .usage-compact {
        margin-top: var(--space-md);
    }

    .usage-steps-horizontal {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        justify-items: center;
    }

    .step-icon {
        width: 48px;
        height: 48px;
    }

    .step-icon i {
        font-size: 1rem;
    }

    .usage-step h4 {
        font-size: var(--font-size-xs);
    }

    .usage-step p {
        font-size: 10px;
    }

    .quick-feature {
        padding: var(--space-xs);
    }

    .quick-feature i {
        font-size: var(--font-size-xs);
    }

    .quick-feature span {
        font-size: 8px;
    }

    .features-grid {
        gap: var(--space-xs);
    }

    .feature-card {
        padding: var(--space-sm) var(--space-md);
        gap: 0 var(--space-sm);
    }

    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .feature-card h3 {
        font-size: var(--font-size-xs);
        margin-bottom: 0;
    }

    .feature-card p {
        font-size: 11px;
        line-height: 1.3;
    }

    .faq-question {
        padding: var(--space-md);
    }

    .faq-question h3 {
        font-size: var(--font-size-xs);
    }

    .faq-answer-content {
        padding: 0 var(--space-md) var(--space-md);
    }

    .faq-answer-content p {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 375px) {
    .page-layout {
        padding: 0 var(--space-xs);
    }

    .tool-container {
        padding: 0;
    }

    .hero {
        margin-bottom: var(--space-sm);
    }

    .hero-title {
        font-size: var(--font-size-xs);
    }

    .hero-description {
        font-size: 10px;
    }

    .content-wrapper {
        padding: var(--space-sm);
    }

    .mode-buttons-integrated {
        gap: 4px;
    }

    .mode-btn-integrated {
        padding: var(--space-xs);
    }

    .mode-icon-integrated {
        width: 28px;
        height: 28px;
    }

    .mode-icon-integrated i {
        font-size: 11px;
    }

    .mode-title-integrated {
        font-size: 10px;
    }

    .mode-desc-integrated {
        display: none;
    }

    .tool-tabs {
        gap: var(--space-xs);
    }

    .tool-tab {
        width: 32px;
        height: 32px;
    }

    .tool-tab i {
        font-size: 12px;
    }

    .section-header h2 {
        font-size: var(--font-size-xs);
    }

    .section-header p {
        font-size: 10px;
    }

    .analytics-header h4 {
        font-size: 11px;
    }

    .reset-stats-btn {
        height: 22px;
        font-size: 9px;
        border-radius: var(--radius-md);
    }

    .analytics-icon {
        width: 28px;
        height: 28px;
    }

    .analytics-value {
        font-size: var(--font-size-xs);
    }

    .analytics-label {
        font-size: 7px;
    }

    .usage-compact {
        margin-top: var(--space-sm);
    }

    .step-icon {
        width: 40px;
        height: 40px;
    }

    .step-icon i {
        font-size: 0.875rem;
    }

    .usage-step h4 {
        font-size: 11px;
    }

    .usage-step p {
        font-size: 9px;
    }

    .quick-feature span {
        font-size: 7px;
    }

    .feature-card {
        padding: var(--space-xs) var(--space-sm);
    }

    .feature-icon {
        width: 32px;
        height: 32px;
    }

    .feature-card h3 {
        font-size: 11px;
    }

    .feature-card p {
        font-size: 10px;
    }

    .faq-question h3 {
        font-size: 11px;
    }

    .faq-answer-content p {
        font-size: 11px;
    }
}
