/*
* MORELESS Base64 Converter - Main Stylesheet
* Compact single-screen design optimized for instant use
* Performance optimized for 60fps on all devices
* ENHANCED: with How to Use section styles
*/

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

/* Glass Morphism Design Variables - Apple Inspired */
:root {
    /* Glass Morphism Core - UNIFIED WITH WORD COUNTER */
    --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 (Consistent with Word Counter) */
    --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%;
    /* REMOVED backdrop-filter for performance - Modal Fake Blur Effect (1:1 from pdf-merger) */
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 77, 41, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 85, 164, 0.10) 0%, transparent 50%),
        linear-gradient(135deg, rgba(3, 16, 36, 0.97) 0%, rgba(5, 30, 62, 0.98) 50%, rgba(3, 16, 36, 0.99) 100%);
    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;
}

/* Remove orange gradient on tablet and mobile */
@media (max-width: 900px) {
    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;
}

/* Main content specific resets */
.main-content *,
.main-content *::before,
.main-content *::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;
    contain: layout;
    will-change: transform;

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

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

    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(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;
    white-space: nowrap;
}

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

/* Content wrapper */
.content-wrapper {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    /* REMOVED backdrop-filter for performance */
    position: relative;
    z-index: 10;
    overflow: hidden;
    contain: layout;
    will-change: transform;
    transition: transform 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 - Unified to match project standard (.section) */
.content-wrapper.stats-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);
}
.content-wrapper.cheat-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);
}

/* Cheat sheet wrapper */
.cheat-wrapper {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    overflow: visible;
}

/* 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);
}

/* Collapsed state - minimal spacing */
.mode-selector-row.collapsed {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
}

/* Mode Header (with collapse button) */
.mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.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 {
    font-size: var(--font-size-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Collapsible Content */
.mode-collapsible-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    margin-top: var(--space-md);
}

.mode-selector-row.collapsed .mode-collapsible-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.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 - 3 TABS) */

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

/* Options Row */
.options-row {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    justify-content: flex-start; /* LEFT ALIGNED FOR DESKTOP */
}

.mode-btn {
    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::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:hover {
    transform: translateX(4px);
    border-color: rgba(255, 77, 41, 0.4);
    background: rgba(255, 77, 41, 0.08);
}

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

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

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

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

.mode-icon {
    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;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mode-title {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    color: #ffffff;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-desc {
    font-family: var(--font-primary);
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* 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);
}

.output-badge {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    margin-left: var(--space-sm);
}

.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);
    position: relative;
    font-size: var(--font-size-sm);
    overflow: hidden;
    contain: layout style;
    flex-shrink: 0;

    /* GPU acceleration */
    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);
}

/* Clear buttons - red styling (1:1 from case-converter) */
#clearBtn,
#clearModifiedBtn {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.18);
    color: rgba(231, 76, 60, 0.9);
}

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

/* Input Fullscreen button - orange gradient like .diff-fullscreen-btn */
#inputFullscreenBtn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: var(--color-white);
}

#inputFullscreenBtn:hover {
    transform: scale3d(1.05, 1.05, 1);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: var(--color-white);
}

#downloadBtn {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.15);
    color: rgba(52, 152, 219, 0.9);
    /* REMOVED backdrop-filter for performance */
}

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

/* Action Separator (divider between button groups) */
.action-separator {
    width: 1px;
    height: 24px;
    background: var(--color-gray);
    opacity: 0.3;
    margin: 0 var(--space-sm);
    align-self: center;
}

/* Toggle Button Styles */
.action-btn-inline.toggle-btn {
    transition: transform 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);
}

/* Textarea Wrapper */
.textarea-wrapper {
    position: relative;
    margin-bottom: var(--space-lg);
}

/* 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);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    cursor: text;
    z-index: 0;
}

/* Textarea container states */
.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;
    position: relative;
    z-index: 2;
}

.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;
    font-family: var(--font-primary);
}

.watermark-content p {
    color: var(--color-gray);
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-sm);
}

.supported-formats {
    margin-top: var(--space-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-sm);
    justify-content: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.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;
}

/* Textarea styling */
.text-input {
    width: 100%;
    height: 224.5px;
    min-height: 224.5px;
    padding: var(--space-md);
    background: rgba(8, 22, 50, 0.55);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-primary);
    resize: none;
    max-height: 400px;
    outline: none;
    /* REMOVED backdrop-filter for performance */
    position: relative;
    z-index: 1;
    line-height: 1.4;
    box-sizing: border-box;
}

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

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

#outputText {
    font-family: var(--font-primary);
}

/* Text Output Wrapper - wraps outputText + error overlay (like image-preview-area) */
.text-output-wrapper {
    position: relative;
    flex: 1;
    display: flex;
}

.text-output-wrapper #outputText {
    flex: 1;
    width: 100%;
}

.text-output-wrapper .image-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    /* REMOVED backdrop-filter for performance */
    z-index: 20;
}

/* Image Preview Areas */
.image-preview-area {
    flex: 1;
    min-height: 180px;
    max-height: 400px;
    height: 180px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    /* REMOVED backdrop-filter for performance */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    resize: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    width: 100%;
}

/* Image preview area contains textarea-container for consistent styling */
.image-preview-area .textarea-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
}

/* IMAGE ENCODE - Uses same styling as IMAGE DECODE (textarea-container) */

.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
}

.image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    color: var(--color-error);
}

.image-error i {
    font-size: var(--font-size-3xl);
}

.image-error p {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin: 0;
}

/* 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;

    /* GPU acceleration */
    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 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);
    position: relative;
    font-size: var(--font-size-lg);
    /* REMOVED backdrop-filter for performance */
    overflow: hidden;
    contain: layout style;
    flex-shrink: 0;

    /* GPU acceleration */
    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: rgba(255, 255, 255, 0.12)
}

.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);
}

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

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

.option-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
    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);
}

.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);
}

.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.77px;
    contain: layout style;

    /* GPU acceleration */
    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);
}

/* Image Statistics - specific styling for image modes */
.image-stats {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.image-stats .stat-badge {
    min-width: 80px;
    flex: 1;

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

/* Special styling for resolution badge */
.image-stats .stat-badge:first-child {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.image-stats .stat-badge:first-child .stat-label {
    color: var(--color-white);
}

/* Mobile responsive for image stats */
@media (max-width: 768px) {
    .image-stats {
        gap: var(--space-sm);
    }

    .image-stats .stat-badge {
        min-width: 65px;
        padding: var(--space-xs);
    
    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
}

/* Cheat Sheet */
.cheat-sheet-header {
    padding: 0 0 var(--space-lg) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
}

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

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

.cheat-sheet-description {
    padding: 0 0 var(--space-lg) 0;
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
    text-align: center;
    contain: layout style;
    will-change: contents;

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

.cheat-table-wrapper {
    padding: 0;
    overflow-x: auto;
}

.cheat-grid {
    display: flex;
    gap: var(--space-xl);
    font-size: var(--font-size-xs);
    overflow-x: auto;
}

.cheat-group {
    flex: 1;
    min-width: 150px;
}

.cheat-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 2px;
}

.cheat-th {
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-dark-gray);
    border: 1px solid var(--color-dark-gray);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.cheat-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 2px;
}

.cheat-cell {
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
    border: 1px solid var(--color-dark-gray);
    color: var(--color-light-gray);
    font-family: var(--font-primary);
    white-space: nowrap;
    font-size: 11px;
}

.cheat-cell.char {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.cheat-row:hover .cheat-cell {
    background: var(--color-dark-gray);
}

.cheat-row:hover .cheat-cell.char {
    background: var(--color-primary);
    color: var(--color-white);
}

.cheat-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--font-size-xs);
}

.cheat-table thead {
    background: var(--color-dark-gray);
}

.cheat-table th {
    padding: var(--space-sm);
    text-align: center;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-dark-gray);
    border: 1px solid var(--color-dark-gray);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cheat-table td {
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
    border: 1px solid var(--color-dark-gray);
    color: var(--color-light-gray);
    font-family: var(--font-primary);
}

.cheat-table td.char {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.cheat-table tr:hover td {
    background: var(--color-dark-gray);
}

.cheat-table tr:hover td.char {
    background: var(--color-primary);
    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.12);
    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);
    /* REMOVED backdrop-filter for performance - parent has it */
    
    
    cursor: pointer;

    /* GPU acceleration */
    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;
    /* REMOVED box-shadow for performance */
}

.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;
    /* REMOVED box-shadow for performance */
}

.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 - BANGER STYLE */
.how-to-use-section {
    margin-bottom: var(--space-2xl);
}

.how-to-wrapper {
    background: rgba(15, 30, 55, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: visible;
}


@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.how-to-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.step-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    /* REMOVED backdrop-filter for performance */
}

.step-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 200%;
    border-radius: var(--radius-md);
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

.step-card:hover {
    background: var(--glass-bg-hover);
}

.step-number {
    position: absolute;
    top: -15px;
    left: var(--space-xl);
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: var(--font-size-sm);
    color: white;
    /* REMOVED box-shadow for performance */
}

.step-content h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    margin-top: var(--space-sm);
}

.step-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

.step-content strong {
    color: var(--color-primary);
    font-weight: 600;
}

.pro-tips {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.pro-tips h3 {
    color: var(--color-success);
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.pro-tips i {
    font-size: var(--font-size-md);
}

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

.tip-item {
    background: rgba(15, 30, 55, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: var(--space-md);
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.tip-item strong {
    color: var(--color-success);
    font-weight: 600;
}

/* 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),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* REMOVED backdrop-filter for performance */
}

.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;
    /* REMOVED box-shadow for performance */
}

.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);
    /* REMOVED box-shadow for performance */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    /* REMOVED box-shadow for performance */
}

.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.05);
    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),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* REMOVED backdrop-filter for performance */
}

.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;
    /* REMOVED box-shadow for performance */
}

.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: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    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);
    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);
    /* REMOVED box-shadow for performance */
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    /* transform: translateY(-1px); */
    /* REMOVED box-shadow for performance */
    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-secondary {
    background: rgba(15, 30, 55, 0.3);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(15, 30, 55, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
    /* transform: translateY(-1px); */
    color: rgba(255, 255, 255, 0.92);
    /* REMOVED box-shadow for performance */
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
}

/* Optimized shine effect - Runs only on hover */
.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%;
    }
}

/* Export Modal Styles (1:1 from case-converter) */
.tool-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 77, 41, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 85, 164, 0.10) 0%, transparent 50%),
        linear-gradient(135deg, rgba(3, 16, 36, 0.97) 0%, rgba(5, 30, 62, 0.98) 50%, rgba(3, 16, 36, 0.99) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001; /* Higher than fullscreen modal (10000) to show over it */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.tool-modal.show {
    opacity: 1;
    visibility: visible;
}

.tool-modal-content {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-modal.show .tool-modal-content {
    transform: scale(1) translateY(0);
}

.tool-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--color-dark-gray);
}

.tool-modal-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-white);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
    font-family: var(--font-primary);
}

.tool-modal-title i {
    color: var(--color-primary);
    font-size: var(--font-size-lg);
}

.tool-modal-close {
    width: 36px;
    height: 36px;
    background: var(--color-dark-gray);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-light-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-modal-close:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.tool-modal-body {
    padding: var(--space-xl);
}


/* Export Option Groups (1:1 from case-converter) */
.export-option-group {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-dark-gray);
}

.export-option-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.export-option-group h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.export-option-group h4 i {
    color: var(--color-primary);
}

.export-format-buttons {
    display: flex;
    gap: var(--space-md);
}

.export-format-buttons .btn {
    flex: 1;
}

.export-option-group .btn-primary {
    width: 100%;
    justify-content: center;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.sample-options {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.sample-btn {
    background: var(--color-dark-gray);
    border: 1px solid var(--color-gray);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: left;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-white);
}

.sample-btn:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    /* transform: translateY(-1px); */
}

.sample-btn strong {
    display: block;
    color: var(--color-white);
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-md);
}

.sample-btn small {
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
}

/* 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;
}

/* Performance Optimizations */
.will-change-transform { will-change: transform; }
.will-change-opacity { will-change: opacity; }
.will-change-auto { will-change: auto; }

/* Container layout */
.page-layout,
.main-column,
.tool-container,
.wide-container {
    min-height: 0;
}

/* 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;
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
    }

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

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

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

    .analytics-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .page-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: 0 var(--space-md);
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    .main-column {
        order: 1;
        max-width: 100%;
    }
    
    .mode-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Desktop alignment reset for tablets */
    .options-row {
        justify-content: center;
    }
    
    .bottom-bar {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .options-group {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-sm) var(--space-lg);
        justify-content: flex-start;
    }

    .stats-group {
        display: flex;
        gap: var(--space-sm);
        margin-left: auto;
    }

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

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

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

    .bottom-bar {
        flex-direction: column;
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .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);
    }
    
    .converter-textarea {
        min-height: 150px;
        max-height: 300px;
        font-size: var(--font-size-sm);
    }
    
    .image-preview-area {
        min-height: 150px;
        max-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: repeat(2, 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;
    
    /* GPU acceleration */
    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;
        font-family: var(--font-primary);
        font-weight: 700;
    }

    .mode-desc {
        font-size: 11px;
        font-family: var(--font-primary);
        font-weight: 400;
    }
    
    /* Options on mobile */
    .options-row {
        flex-direction: column;
        gap: var(--space-sm);
        margin-top: var(--space-md);
        justify-content: flex-start;
    }
    
    /* Hide desktop elements on mobile */
    .desktop-only {
        display: none;
    }
    
    /* Grid layout for mobile */
    .converter-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    /* Force auto-convert on mobile */
    #autoUpdate {
        pointer-events: none;
        opacity: 0.7;
    }
    
    #autoUpdate:checked {
        pointer-events: none;
    }
    
    .tool-modal-content {
        width: 95%;
    }
    
    .modal-header,
    .tool-modal-body {
        padding: var(--space-lg);
    }
    
    .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);
    }
    
    .cheat-table-wrapper {
        padding: 0;
        overflow-x: auto;
    }

    .cheat-grid {
        flex-direction: row;
        min-width: 800px;
        gap: var(--space-md);
    }

    .cheat-group {
        min-width: 150px;
    }

    .cheat-th,
    .cheat-cell {
        padding: 4px 6px;
        font-size: 10px;
    }

    .cheat-cell.char {
        font-size: 12px;
    }

    .cheat-table {
        min-width: 600px;
        display: block;
    }

    .cheat-table th,
    .cheat-table td {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .cheat-table td.char {
        font-size: var(--font-size-xs);
    }
    
    /* How to Use Section - Mobile */
    .how-to-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: var(--font-size-xs);
        top: -12px;
        left: var(--space-lg);
    }
    
    .bottom-bar {
        padding-top: var(--space-md);
        justify-content: flex-start;
    }
    
    .stats-group {
        gap: var(--space-sm);
    }
    
    .stat-badge {
        min-width: 50px;
    
    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
}

@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);
    }
    
    .converter-textarea,
    .image-preview-area {
        padding: var(--space-sm);
        font-size: var(--font-size-xs);
        min-height: 120px;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-card {
        padding: var(--space-sm);
    
    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
    
    .action-btn-inline {
        width: 28px;
        height: 28px;
        font-size: var(--font-size-xs);
    
    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
    
    .modal-header,
    .tool-modal-body {
        padding: var(--space-md);
    }
    
    .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);
    }
}

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

/* ============================================
   FAVORITE TAB (vyčnívající srdíčko)
   ============================================ */

.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.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    /* REMOVED backdrop-filter for performance */
    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;
}

/* Print Styles */
@media print {
    .tool-modal,
    .btn,
    .faq-section,
    .input-actions,
    .output-actions {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper,
    .feature-tabs-wrapper,
    .stat-item,
    .format-card,
    .analytics-item,
    .feature-card {
        border: 1px solid #ccc;
        background: white;
        color: black;
        break-inside: avoid;
    }
    
    .hero-title,
    .section-header h2 {
        color: black;
    }
    
    .stat-value,
    .analytics-value,
    .format-title {
        color: #333;
    }
}

/* ========================================
   HOW TO USE SECTION - COMPACT STYLES
   ======================================== */

.usage-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl, 2rem);
}

/* Horizontal Steps Flow */
.usage-steps-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg, 1.5rem);
    flex-wrap: nowrap;
    margin-bottom: var(--space-2xl, 2rem);
}

.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, #FF4D29), #ff6b47);
    border-radius: 50%;
    margin-bottom: var(--space-md, 1rem);
    /* REMOVED box-shadow for performance */
    transition: all 0.3s ease;
}

.step-icon:hover {
    transform: scale3d(1.05, 1.05, 1);
    will-change: transform;
    /* REMOVED box-shadow for performance */
}

.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, #031024);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 800;
    border: 2px solid var(--color-primary, #FF4D29);
}

.usage-step h4 {
    font-size: var(--font-size-lg, 1.25rem);
    font-weight: 700;
    color: var(--text-primary, rgba(255, 255, 255, 0.92));
    margin-bottom: var(--space-sm, 0.5rem);
}

.usage-step p {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
    line-height: 1.5;
}

.step-arrow {
    color: var(--color-primary, #FF4D29);
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Quick Features Row */
.quick-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 1.5rem);
}

.quick-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm, 0.5rem);
    padding: var(--space-lg, 1.5rem);
    background: rgba(255, 255, 255, 0.12);
    /* REMOVED backdrop-filter for performance */
    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),
                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;
    /* REMOVED box-shadow for performance */
}

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

.quick-feature span {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .usage-steps-horizontal {
        flex-direction: column;
        gap: var(--space-lg, 1.5rem);
    }

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

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

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

@media (max-width: 480px) {
    .step-icon {
        width: 60px;
        height: 60px;
    }

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

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

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

/* Drag & Drop Functionality */
.textarea-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    /* Height must match .text-input height for watermark alignment */
    min-height: 224.5px;
    max-height: 400px;
    height: 224.5px;
    box-sizing: border-box;
    width: 100%;
    flex: 1;
}

/* Fullscreen Image Preview Modal */
.image-modal-content {
    background: linear-gradient(135deg, var(--color-dark-accent) 0%, var(--color-dark-light) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-dark-gray);
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
    animation: toolModalSlideIn 0.3s ease-out;
    /* Let content determine size, but add sensible limits */
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-dark-gray);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.image-modal-header h3 {
    color: var(--color-white);
    font-size: var(--font-size-lg);
    margin: 0;
}

.image-modal-body {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.modal-fullscreen-image {
    /* Image determines the modal size */
    max-width: calc(100vw - 120px); /* Account for modal padding + margins */
    max-height: calc(100vh - 160px); /* Account for header + padding + margins */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    /* REMOVED box-shadow for performance */
    display: block;
}

/* ============================================
   DIFF VIEWER STYLES - Text Diff Checker
   ============================================ */

/* Diff Containers */
.diff-split-view,
.diff-unified-view {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    background: rgba(255, 255, 255, 0.05);  /* Same as mode button background */
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.diff-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, 0.1); /* Separator line */
}

.diff-unified-view {
    background: rgba(255, 255, 255, 0.05);
}

.diff-column {
    background: rgba(255, 255, 255, 0.03);
}

.diff-column-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.16);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.diff-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

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

/* Diff Fullscreen Button - 1:1 match with duplicate word finder */
.diff-fullscreen-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: var(--color-white);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.diff-fullscreen-btn i {
    color: var(--color-white);
}

.diff-fullscreen-btn:hover {
    transform: scale3d(1.05, 1.05, 1);
    will-change: transform;
    /* REMOVED box-shadow for performance */
}

.diff-content {
    padding: var(--space-md);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    font-weight: 400;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    letter-spacing: normal;
}

/* Custom scrollbar for diff content */
.diff-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.diff-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.diff-content::-webkit-scrollbar-thumb {
    background: rgba(255, 77, 41, 0.3);
    border-radius: 4px;
}

.diff-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 77, 41, 0.5);
}

/* Diff Lines */
.diff-line {
    padding: 2px var(--space-sm);
    margin: 1px 0;
    border-radius: 3px;
    display: flex;
    align-items: flex-start;
    min-height: 24px;
    transition: background-color 0.15s ease;
}

.diff-line-number {
    display: inline-block;
    min-width: 50px;
    text-align: right;
    margin-right: var(--space-md);
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
    flex-shrink: 0;
}

/* Diff States */
.diff-line.unchanged {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.diff-line.added {
    background: rgba(39, 174, 96, 0.15);
    border-left: 3px solid rgba(39, 174, 96, 0.6);
    padding-left: calc(var(--space-sm) - 3px);
}

.diff-line.removed {
    background: rgba(231, 76, 60, 0.15);
    border-left: 3px solid rgba(231, 76, 60, 0.6);
    padding-left: calc(var(--space-sm) - 3px);
}

.diff-line.modified {
    background: rgba(243, 156, 18, 0.15);
    border-left: 3px solid rgba(243, 156, 18, 0.6);
    padding-left: calc(var(--space-sm) - 3px);
}

/* Inline diff marks (for word/character mode) */
.diff-mark {
    display: inline;
    padding: 1px 2px;
    border-radius: 2px;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: normal;
    white-space: pre-wrap;
}

.diff-mark.added {
    background: rgba(39, 174, 96, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.diff-mark.removed {
    background: rgba(231, 76, 60, 0.3);
    color: rgba(255, 255, 255, 0.95);
    text-decoration: line-through;
}

.unchanged {
    display: inline;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: normal;
    white-space: pre-wrap;
    color: rgba(255, 255, 255, 0.7);
}

/* Empty state */
.diff-content:empty::before {
    content: '';
    display: block;
    padding: var(--space-3xl) var(--space-lg);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .diff-split-view {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .diff-content {
        max-height: 400px;
        font-size: 12px;
    }
    
    .diff-line-number {
        min-width: 35px;
        margin-right: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .diff-content {
        max-height: 300px;
        padding: var(--space-sm);
        font-size: 11px;
    }

    .diff-line {
        padding: 1px var(--space-xs);
    }

    .diff-line-number {
        min-width: 30px;
        font-size: 10px;
    }
}

/* ============================================
   INPUT FULLSCREEN MODAL (1:1 from case-converter)
   ============================================ */

.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-dark);
    z-index: 9999;
    display: none;
    flex-direction: column;
}

/* Disable body scroll when fullscreen is active */
body.fullscreen-active {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-dark-accent);
    border-bottom: 1px solid var(--color-dark-gray);
    position: relative;
    z-index: 2;
}

.fullscreen-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
    min-height: 48px;
}

.fullscreen-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.fullscreen-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.fullscreen-title i {
    color: var(--color-primary);
}

.fullscreen-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-md);
    min-width: auto;
}

/* Tool Buttons (1:1 from case-converter) */
.text-tool-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    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);
}

.text-tool-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
}

.text-tool-btn.paste-btn {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.15);
    color: rgba(52, 152, 219, 0.9);
}

.text-tool-btn.paste-btn:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.25);
    color: #3498db;
}

.text-tool-btn.special {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    margin-left: auto;
}

.text-tool-btn.special:hover {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transform: scale3d(1.05, 1.05, 1);
}

/* Fullscreen Content (1:1 from case-converter) */
.fullscreen-content {
    flex: 1;
    padding: var(--space-xl);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.fullscreen-text-areas {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: var(--space-lg);
    height: 100%;
}

.fs-text-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 0;
}

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

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

.fs-section-label i {
    color: #FF4D29;
}

/* Fullscreen Drag & Drop (1:1 from case-converter) */
.fs-textarea-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fs-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);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

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

.fs-textarea-wrapper.dragging .fs-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: none;
}

.fs-text-input {
    flex: 1;
    width: 100%;
    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);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-primary);
    line-height: 1.4;
    resize: none;
    outline: none;
    position: relative;
    z-index: 1;
}

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

/* Responsive Fullscreen (1:1 from case-converter) */
@media (max-width: 768px) {
    .fullscreen-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .fullscreen-header-left,
    .fullscreen-header-right {
        justify-content: center;
    }

    .fullscreen-content {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .fullscreen-header {
        padding: var(--space-xs) var(--space-sm);
    }

    .text-tool-btn {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   DIFF FULLSCREEN MODAL
   ============================================ */

.diff-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-dark);
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.diff-fullscreen-modal.active {
    display: flex;
}

/* Diff Fullscreen Header (1:1 from input fullscreen) */
.diff-fullscreen-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-dark-accent);
    border-bottom: 1px solid var(--color-dark-gray);
    position: relative;
    z-index: 2;
}

.diff-fullscreen-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
    min-height: 48px;
}

.diff-fullscreen-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.diff-fullscreen-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-md);
    min-width: auto;
}

.diff-fullscreen-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Diff Fullscreen Content (1:1 from input fullscreen) */
.diff-fullscreen-content {
    flex: 1;
    padding: var(--space-xl);
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Content wrapper for diff views */
.diff-fullscreen-content-wrapper {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: auto;
}

/* Cloned Diff Views in Fullscreen */
.diff-fullscreen-content .diff-split-view,
.diff-fullscreen-content .diff-unified-view {
    display: flex !important;
    min-height: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.diff-fullscreen-content .diff-split-view {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.diff-fullscreen-content .diff-column {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: auto;
    background: rgba(3, 16, 36, 0.8);
}

.diff-fullscreen-content .diff-content {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    height: auto;
    min-height: 0;  /* Allow flex child to shrink/scroll properly */
    background: rgba(255, 255, 255, 0.12);
}

/* Hide fullscreen buttons in cloned views */
.diff-fullscreen-content .diff-fullscreen-btn {
    display: none;
}

/* Responsive - Tablet (1:1 from input fullscreen) */
@media (max-width: 900px) {
    .diff-fullscreen-title {
        font-size: var(--font-size-lg);
    }
}

/* Responsive - Mobile (1:1 from input fullscreen) */
@media (max-width: 768px) {
    .diff-fullscreen-header-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-sm);
    }

    .diff-fullscreen-header-left {
        justify-content: flex-start;
    }

    .diff-fullscreen-header-right {
        justify-content: flex-end;
    }

    .diff-fullscreen-title {
        font-size: var(--font-size-sm);
    }

    .diff-fullscreen-content {
        padding: var(--space-md);
    }

    /* Stack split view columns on mobile */
    .diff-fullscreen-content .diff-split-view {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .diff-fullscreen-header {
        padding: var(--space-xs) var(--space-sm);
    }

    .diff-fullscreen-title {
        font-size: var(--font-size-sm);
    }
}

/* MOBILE OPTIMIZATION */

/* Mobile Action Buttons - Base (hidden on desktop) */
.mobile-action-group {
    display: none;
}

.mobile-divider {
    display: none;
}

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

/* TABLET OPTIMIZATION (769px - 900px) */
@media (min-width: 769px) and (max-width: 900px) {
    /* Mode buttons - 4 in one row */
    .mode-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: var(--space-sm);
    }

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

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

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

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

    /* Checkboxes 2x2 grid left, stat badges right */
    .bottom-bar {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .options-group {
        display: grid;
        grid-template-columns: repeat(2, auto);
        gap: var(--space-xs) var(--space-md);
        justify-content: flex-start;
    }

    .stats-row {
        display: flex;
        gap: var(--space-sm);
        margin-left: auto;
    }

    /* How to use - 3 steps in one row */
    .usage-steps-horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
        gap: var(--space-lg);
    }

    .step-arrow {
        display: flex;
        align-items: center;
        margin-top: 28px;
    }

    .usage-step {
        flex: 0 0 auto;
        max-width: 160px;
        text-align: center;
    }

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

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

@media (max-width: 900px) {
    .hero {
        padding: var(--space-xs) var(--space-md);
    }

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

    .hero-description {
        font-size: var(--font-size-sm);
    }

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

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

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

    .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;
    }

    .tool-tabs {
        right: 48px;
        top: -40px;
    }

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

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

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

    .quick-feature {
        flex: 1;
        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: 52px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: var(--space-md);
        padding: 0 var(--space-md);
        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;
    }

    .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);
    }

    .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);
    }

    .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-lg);
    }

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

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

    .step-arrow {
        display: none;
    }

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

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

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

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

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

    .quick-feature {
        flex: 1;
        padding: var(--space-sm);
        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);
    }

    /* Comparison mode title - 14px */
    .mode-label {
        font-size: 14px;
    }

    /* Section labels - 12px */
    .section-label {
        font-size: 12px;
    }

    /* Mode buttons - 2 columns like lorem-ipsum */
    .mode-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .mode-btn {
        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-btn:hover {
        transform: none;
    }

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

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

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

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

    /* Hide format badges on mobile */
    .supported-formats {
        display: none;
    }

    /* Watermark text smaller on mobile */
    .drop-zone-watermark {
        padding: var(--space-sm);
    }

    .watermark-content i {
        font-size: 32px;
        margin-bottom: var(--space-xs);
    }

    .watermark-content h3 {
        font-size: 14px;
        white-space: nowrap;
    }

    /* Hide stat badges on mobile */
    .stat-badge,
    .image-stats {
        display: none;
    }

    /* Bottom bar - checkboxes left aligned */
    .bottom-bar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: var(--space-sm);
    }

    /* Checkboxes - vertical stack */
    .options-group {
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
        align-items: flex-start;
        width: 100%;
    }

    /* How to use - step 3 centered */
    .usage-step:nth-child(5) {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 160px;
    }

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

    .usage-steps-horizontal {
        margin-bottom: 0;
    }

    .quick-features {
        margin-top: 0;
    }

    /* Hide section actions on mobile */
    .section-actions {
        display: none;
    }

    /* Mobile action buttons */
    .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;
    }

    .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-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);
    }
}

@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);
    }

    .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);
    }

    .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;
    }
}
