/*
* MORELESS JSON Formatter - Main Stylesheet
* Professional JSON editor with advanced features
* Performance optimized for real-time processing
*/
/* Glass Morphism Design Variables - Apple Inspired */
:root {
    /* Glass Morphism Core */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 77, 41, 0.15);
    --glass-bg-secondary: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(20px) saturate(120%);
    --glass-blur-light: blur(8px) saturate(110%);
    /* Text Colors */
    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.75);
    /* 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);
    /* JSON Specific Colors */
    --json-key: #66D9EF;
    --json-string: #A6E22E;
    --json-number: #AE81FF;
    --json-boolean: #F92672;
    --json-null: #75715E;
    --json-bracket: #F8F8F2;
    --json-error-bg: rgba(231, 76, 60, 0.1);
    --json-diff-add: rgba(39, 174, 96, 0.2);
    --json-diff-remove: rgba(231, 76, 60, 0.2);
    --json-diff-modify: rgba(243, 156, 18, 0.2);
    /* 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;
    /* 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 cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-fire: 0 0 12px rgba(255, 77, 41, 0.3);
    --shadow-fire-lg: 0 0 20px rgba(255, 77, 41, 0.4);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.1);
    /* Z-Index Scale */
    --z-behind: -1;
    --z-normal: 0;
    --z-above: 1;
    --z-sticky: 10;
    --z-fixed: 100;
    --z-overlay: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
    --z-tooltip: 4000;
    --z-confetti: 5000;
}
/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 16, 36, 0.95);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-dark-gray);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}
/* Global resets */
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    background: radial-gradient(ellipse at top left, #05204b 25%, #031127 60%);
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    position: relative;
    opacity: 1;
}

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

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

body::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 77, 41, 0.15), transparent 60%);
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-dark-gray);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: background var(--transition-normal);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}
/* Selection Styling */
::selection {
    background: var(--color-primary);
    color: var(--color-white);
}
/* Layout */
.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%;
}
.main-column {
    min-width: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.tool-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
}
.tool-container .content-wrapper {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}
.wide-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
.wide-container .content-wrapper {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}
.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;
}
/* Hero section */
.hero {
    text-align: center;
    margin-bottom: var(--space-md);
    padding: var(--space-xs) 0;
}
.hero-title {
    font-size: var(--font-size-xl);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-description {
    font-size: var(--font-size-base);
    color: var(--color-light-gray);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.3;
}
/* 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.18);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
}
/* Spacing between content wrappers - 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);
}
.compact-converter .content-wrapper {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}
/* Mode selector */
.mode-selector-row {
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-dark-gray);
    transition: padding-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mode-selector-row.collapsed {
    padding-bottom: var(--space-sm);
}
.mode-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    margin: 0;
}
.mode-label i {
    color: var(--color-primary);
    font-size: 16px;
}
/* MODE TABS - ICON-INTEGRATED CARDS (2 ROWS: 4+4 TABS) */
.mode-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 8px;
    max-width: 100%;
    margin: 0 auto;
}
.mode-btn {
    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: 'Inter', sans-serif;
    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: 'Inter', sans-serif;
    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;
}
/* ============================================
   MODE COLLAPSE/EXPAND FUNCTIONALITY
   ============================================ */
/* Mode header row (collapse button + label) */
.mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}
/* Collapse button */
.mode-collapse-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mode-collapse-btn:hover {
    background: rgba(255, 77, 41, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}
.mode-collapse-btn i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Collapsible content wrapper */
.mode-collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 1200px;
    opacity: 1;
}
/* Collapsed state */
.mode-selector-row.collapsed .mode-collapsible-content {
    max-height: 0;
    opacity: 0;
}
.mode-selector-row.collapsed .mode-collapse-btn i {
    transform: rotate(180deg);
}
/* Options row */
/* ═══════════════════════════════════════════════════════════════
   FORMAT SETTINGS PANEL - NESTED WRAPPERS PATTERN
   ═══════════════════════════════════════════════════════════════ */
/* Settings Panel Wrapper (Outer) - 2-Column Grid Layout */
.settings-panel {
    margin-top: var(--space-md);
    padding: var(--space-lg) var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-lg);
}
/* Setting Group (Inner) */
.setting-group {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}
/* Checkbox Group - 3 Column Layout with Vertical Dividers */
.checkbox-group-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-md);
}
.checkbox-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-right: var(--space-lg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.checkbox-column:last-child {
    border-right: none;
    padding-right: 0;
}
/* Checkbox Group - Inline Layout (for DIFF fullscreen) */
.checkbox-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}
/* Checkboxes - Custom Styled */
.option-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-normal);
}
.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),
                box-shadow 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);
}
.checkbox-label {
    font-size: var(--font-size-xs); /* 12px - matches MORELESS pattern */
}
/* Disabled checkbox state */
.option-checkbox.checkbox-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
/* Setting Labels (Section Headers) */
.setting-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}
.setting-label i {
    color: var(--color-primary);
    font-size: var(--font-size-base);
}
/* Indentation Buttons - 1:1 Copy from Mode Tabs (Icon-Integrated) */
.indent-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
}
.indent-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    min-height: 36px;
    flex: 1;
}
.indent-btn:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    color: var(--color-white);
}
.indent-btn.active {
    background: rgba(25, 111, 61, 0.5);
    color: var(--color-white);
}
.indent-btn.active:hover {
    background: rgba(25, 111, 61, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}
.indent-btn i {
    color: var(--color-primary);
}
/* JSONPath row */
.jsonpath-row {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-sizing: border-box;
}
.jsonpath-input-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.jsonpath-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: rgba(8, 22, 50, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-sm);
    outline: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}
.jsonpath-input:focus {
    border-color: var(--color-primary);
    background: var(--glass-bg-hover);
}
.jsonpath-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
}
/* Fix: Remove margin-bottom for inline labels (JSONPath & Transform) */
.jsonpath-input-group .setting-label,
.transform-selector .setting-label {
    margin-bottom: 0;
}
/* Transform options */
.transform-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-sizing: border-box;
}
.transform-selector {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.transform-buttons {
    display: flex;
    gap: var(--space-sm);
}
/* Transform buttons - 1:1 design from indent-btn */
.transform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    min-height: 36px;
    flex: 1;
    white-space: nowrap; /* Prevent text wrapping on two lines */
    min-width: 110px; /* Ensure kebab-case fits on one line */
}
.transform-btn:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    color: var(--color-white);
}
.transform-btn.active {
    background: rgba(25, 111, 61, 0.5);
    color: var(--color-white);
}
.transform-btn.active:hover {
    background: rgba(25, 111, 61, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}
.transform-btn i {
    color: var(--color-primary);
}
/* JSON Editor Grid */
.json-editor-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-xl);
    align-items: stretch;
    margin-bottom: var(--space-lg);
    padding-top: var(--space-md);
}
.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    height: auto;
    min-width: 0; /* CRITICAL: Allow grid items to shrink below content width */
}
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}
/* Tree View Header - Exact same layout as section-header-row */
.tree-view-header {
    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);
}
.validation-status {
    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);
}
.validation-status.valid {
    background: var(--color-success);
    color: var(--color-white);
}
.validation-status.invalid {
    background: var(--color-error);
    color: var(--color-white);
}
.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;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-sizing: border-box;
    /* 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/Delete Button - Red (COPIED FROM HTML ENTITY CONVERTER) */
.action-btn-inline#clearBtn,
.action-btn-inline#diffLeftClearBtn,
.action-btn-inline#diffRightClearBtn {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.15);
    color: rgba(231, 76, 60, 0.9);
}
.action-btn-inline#clearBtn:hover,
.action-btn-inline#diffLeftClearBtn:hover,
.action-btn-inline#diffRightClearBtn:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
}
/* Fullscreen Button - Orange (COPIED FROM CASE CONVERTER) */
.action-btn-inline#fullscreenBtn {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.action-btn-inline#fullscreenBtn:hover {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transform: scale3d(1.05, 1.05, 1);
}
/* Tree View Fullscreen Button - Orange (1:1 from fullscreenBtn) */
.action-btn-inline#treeViewFullscreenBtn {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.action-btn-inline#treeViewFullscreenBtn:hover {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transform: scale3d(1.05, 1.05, 1);
}
/* Diff Fullscreen Button - Orange (1:1 from fullscreenBtn) */
.action-btn-inline#diffFullscreenBtn {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.action-btn-inline#diffFullscreenBtn:hover {
    background: linear-gradient(135deg, #FF4D29 0%, #e64024 100%);
    border-color: #FF4D29;
    color: white;
    transform: scale3d(1.05, 1.05, 1);
}
/* Download Button - Blue (copied from csv-to-json) */
.action-btn-inline#downloadBtn {
    background: rgba(52, 152, 219, 0.12);
    border-color: rgba(52, 152, 219, 0.18);
    color: rgba(52, 152, 219, 0.9);
}
.action-btn-inline#downloadBtn:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.25);
    color: #3498db;
}
/* Editor container */
.editor-container {
    flex: 1 1 50%; /* Equal flex split - maintain width */
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden; /* Hide overflow - textareas handle scroll internally */
    height: 500px;
    min-height: 500px;
    max-height: 500px;
    min-width: 0; /* Allow flex item to shrink below content width */
    box-sizing: border-box;
}
.line-numbers {
    width: 50px;
    padding: var(--space-md) var(--space-sm);
    background: var(--color-dark-accent);
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-mono);  /* MUST MATCH textarea for vertical alignment! */
    font-size: var(--font-size-sm);
    line-height: 1.5;
    text-align: right;
    user-select: none;
    border-right: 1px solid var(--color-dark-gray);
    white-space: pre;
    height: 100%;
    overflow-y: hidden;
    overflow-x: hidden;
    box-sizing: border-box;
}
/* Line number items for highlighting support (classic DIFF mode) */
.line-number-item {
    line-height: 1.5;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.line-number-item.active {
    background-color: rgba(255, 193, 7, 0.25);  /* Yellow highlight */
    color: rgba(255, 193, 7, 1);  /* Bright yellow text */
    font-weight: 600;
    border-radius: var(--radius-xs);
    padding: 0 4px;
}
.json-textarea {
    flex: 1;
    padding: var(--space-md);
    border: none;
    background: rgba(8, 22, 50, 0.55);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-family: var(--font-mono);
    outline: none;
    resize: none;
    height: 100%;
    width: 100%;
    line-height: 1.5;
    tab-size: 4;
    overflow-y: auto;
    overflow-x: auto;
    box-sizing: border-box;
    white-space: pre; /* Preserve whitespace for indentation */
    word-wrap: normal; /* Override default textarea word wrapping */
    overflow-wrap: normal; /* Prevent word breaking */
    word-break: normal; /* No word breaking */
}
.json-textarea.with-lines {
    padding-left: var(--space-md);
}
/* DIFF mode - disable word wrap, enable horizontal scroll */
#diffLeft,
#diffRight {
    white-space: nowrap;
}
.json-textarea:focus {
}
.json-textarea::placeholder {
    color: var(--color-gray);
    font-family: 'Inter', sans-serif;
}
/* Error Banner (JSON Input errors) - ABSOLUTE OVERLAY */
.error-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.95) 0%, rgba(192, 57, 43, 0.95) 100%);
    border: 1px solid rgba(231, 76, 60, 0.5);
    border-left: 4px solid #e74c3c;
    border-radius: var(--radius-md);
    margin: var(--space-md);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.error-content {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}
.error-content > i {
    color: #ffffff;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 2px;
}
.error-text {
    flex: 1;
    min-width: 0;
}
.error-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-xs);
}
.error-message {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
}
.error-dismiss {
    width: 28px;
    height: 28px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius-md);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.error-dismiss:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.05);
}
/* Tree view */
.tree-view-container {
    flex: 1 1 50%; /* Equal flex split with input section */
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    overflow: auto;
    min-height: 400px;
    max-height: 500px;
    min-width: 0; /* Allow flex item to shrink below content width */
    box-sizing: border-box;
}
/* Tree view expand/collapse buttons - wider with text labels */
.tree-expand-btn,
.tree-collapse-btn {
    width: auto !important; /* Override 36px from .action-btn-inline */
    padding: var(--space-xs) var(--space-md) !important; /* Add padding for text */
    gap: var(--space-xs); /* Space between icon and text */
    white-space: nowrap; /* Keep text on one line */
}
.tree-expand-btn span,
.tree-collapse-btn span {
    display: inline;
    font-size: var(--font-size-xs);
    font-weight: 600;
}
.tree-view {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    overflow-x: auto; /* Enable horizontal scroll for long values */
    width: 100%; /* Prevent expanding beyond container */
    max-width: 100%; /* Enforce width constraint */
}
.tree-node {
    margin-left: var(--space-lg);
    line-height: 1.8;
    white-space: nowrap; /* Keep text on single line - enable horizontal scroll */
}
.tree-toggle {
    cursor: pointer;
    user-select: none;
    margin-right: var(--space-xs);
    color: var(--color-gray);
    transition: transform var(--transition-normal);
}
.tree-toggle.collapsed {
    transform: rotate(-90deg);
}
.tree-key {
    color: var(--json-key);
    font-weight: 600;
}
.tree-value-string {
    color: var(--json-string);
}
.tree-value-number {
    color: var(--json-number);
}
.tree-value-boolean {
    color: var(--json-boolean);
}
.tree-value-null {
    color: var(--json-null);
}
/* Diff toolbar sections in transform-options-row */
.diff-toolbar-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.diff-navigation-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}
/* Mobile navigation - hidden on desktop */
.diff-navigation-mobile {
    display: none;
}
.diff-navigation-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.diff-nav-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}
.diff-nav-btn:hover {
    transform: translateY(-2px) translateZ(0);
}
.diff-nav-btn:active {
    transform: translateY(0) translateZ(0);
}
.diff-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}
.diff-nav-btn:disabled:hover {
    transform: none;
}
.diff-counter {
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    transition: opacity 0.3s ease;
}
.diff-counter.inactive {
    opacity: 0.3;
    color: var(--color-gray);
}
/* Diff mode */
.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
}
.diff-panel {
    display: flex;
    flex-direction: column;
}
/* Add more spacing below header in DIFF panels */
.diff-panel .section-header-row {
    margin-bottom: var(--space-md);
}
.diff-result {
    grid-column: 1 / -1;
    margin-top: var(--space-xl);
}
.diff-output {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    max-height: 400px;
    overflow: auto;
    box-sizing: border-box;
}
.diff-line {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin: 2px 0;
}
.diff-add {
    background: var(--json-diff-add);
    color: var(--color-success);
}
.diff-remove {
    background: var(--json-diff-remove);
    color: var(--color-error);
}
.diff-modify {
    background: var(--json-diff-modify);
    color: var(--color-warning);
}
/* 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;
}
/* Bottom bar */
.bottom-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-dark-gray);
}
.stats-group {
    display: flex;
    gap: var(--space-md);
}
.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    min-width: 60px;
    /* 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);
}
/* Analytics section */
/* 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);
}
/* Analytics Section - BASE64 CONVERTER 1:1 COPY */
.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),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    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;
}
.analytics-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}
.analytics-data {
    flex: 1;
}
.analytics-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-white);
    font-family: var(--font-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}
.analytics-label {
    font-size: var(--font-size-xs);
    color: var(--color-light-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
/* Reference section */
.cheat-wrapper {
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
}
.cheat-sheet-header {
    padding: 0 0 var(--space-md) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cheat-sheet-header h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.cheat-sheet-header i {
    color: var(--color-primary);
    font-size: 16px;
}
.reference-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}
.reference-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-sizing: border-box;
}
.reference-card h5 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin: 0 0 var(--space-md) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.reference-card h5 i {
    color: var(--color-primary);
    font-size: var(--font-size-md);
}
.reference-card code {
    display: block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    color: var(--color-light-gray);
    line-height: 1.6;
}
.path-examples {
    list-style: none;
    margin: 0;
    padding: 0;
}
.path-examples li {
    margin-bottom: var(--space-xs);
    color: var(--color-light-gray);
    font-size: var(--font-size-xs);
}
.path-examples code {
    display: inline;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--glass-border);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--json-key);
}
.pattern-list {
    font-size: var(--font-size-xs);
    color: var(--color-light-gray);
}
.pattern-list div {
    margin-top: var(--space-sm);
    font-weight: 600;
    color: var(--color-white);
}
.pattern-list code {
    margin-top: var(--space-xs);
}
/* Features Section */
.features-section {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-2xl);
}
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.section-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}
.section-header p {
    font-size: var(--font-size-md);
    color: var(--color-light-gray);
    max-width: 600px;
    margin: 0 auto;
}

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

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

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

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

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

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

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}
.feature-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}
.feature-card:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}
.feature-card:hover::before {
    transform: scaleX(1);
}
.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--font-size-xl);
    color: var(--color-white);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}
.feature-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}
.feature-card p {
    color: var(--color-light-gray);
    line-height: 1.6;
}
/* FAQ Section */
.faq-section {
    margin-bottom: var(--space-3xl);
}
.faq-grid {
    display: grid;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}
.faq-question {
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 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%;
}
/* ========================================
   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);
    transition: all 0.3s ease;
}
.step-icon:hover {
    transform: scale3d(1.05, 1.05, 1);
    will-change: transform;
}
.step-icon i {
    font-size: 1.5rem;
    color: white;
}
.step-num {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--color-dark, #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 {
    margin: 0 0 var(--space-xs) 0;
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--color-white);
}
.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 {
    display: flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 30px;
    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);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 72px;
    text-align: center;
}
.quick-feature:hover {
    background: rgba(255, 77, 41, 0.15);
    border-color: var(--color-primary);
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    will-change: transform;
}
.quick-feature i {
    font-size: 1.25rem;
    color: var(--color-primary, #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;
}
/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--font-size-sm);
    text-decoration: none;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-sizing: border-box;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    border: 1px solid rgba(255, 77, 41, 0.3);
    position: relative;
    z-index: 1;
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}
.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%;
    }
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border);
    transform: translateY(-2px) scale(1.01);
}
.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
}
/* Desktop only elements */
.desktop-only {
    display: flex;
}
/* Mobile auto-convert hidden */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .auto-format-option {
        display: none;
    }
}
/* Responsive design */
@media (max-width: 1200px) {
    .analytics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .json-editor-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .center-actions {
        flex-direction: row;
        padding: var(--space-md) 0;
    }
    .mode-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    .reference-grid {
        grid-template-columns: 1fr;
    }
    .diff-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}
@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);
    }
    .json-textarea {
        font-size: var(--font-size-xs);
        height: 100%;
    }
    .editor-container {
        height: 400px;
        min-height: 400px;
        max-height: 400px;
    }
    .line-numbers {
        width: 40px;
        font-size: var(--font-size-xs);
    }
    .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-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;
    }
    .options-row {
        flex-direction: column;
        gap: var(--space-sm);
        margin-top: var(--space-md);
    }
    .format-options-row,
    .jsonpath-row,
    .transform-options-row {
        padding: var(--space-sm);
    }
    .indent-selector,
    .transform-selector {
        flex-direction: column;
        gap: var(--space-sm);
    }
    .indent-buttons,
    .transform-buttons {
        flex-wrap: wrap;
    }
    .jsonpath-input-group {
        flex-direction: column;
    }
    .desktop-only {
        display: none;
    }
    .json-editor-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    #autoFormat {
        pointer-events: none;
        opacity: 0.7;
    }
    .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);
    }
    .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;
    }
    .quick-features {
        grid-template-columns: 1fr;
        gap: var(--space-md, 1rem);
    }
    .quick-feature {
        padding: var(--space-md, 1rem);
    }
    .reference-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .reference-card {
        padding: var(--space-md);
    }
    .faq-question {
        padding: var(--space-lg);
    }
    .faq-answer-content {
        padding: 0 var(--space-lg) var(--space-lg);
    }
    .bottom-bar {
        padding-top: var(--space-md);
        justify-content: center;
    }
    .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);
    }
    .json-textarea {
        padding: var(--space-sm);
        font-size: 11px;
        height: 100%;
    }
    .editor-container {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }
    .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);
}
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .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);
    }
    .faq-question {
        padding: var(--space-md);
    }
    .faq-question h3 {
        font-size: var(--font-size-sm);
    }
}
/* WORD COUNTER IDENTICAL STYLES - COPIED 1:1 */
/* The above sections (.content-wrapper, .features-section, .faq-section, .usage-compact) and their responsive styles are identical copies from word-counter/main.css */
/* ============================================
   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;
    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;
}
@media (max-width: 768px) {
    .tool-tabs {
        top: -38px;
        right: 48px;
    }
    .tool-tab {
        width: 38px;
        height: 38px;
    }
    .tool-tab i {
        font-size: 16px;
    }
}
/* ═══════════════════════════════════════════════════════════════
   FULLSCREEN FOCUS MODE (COPIED FROM CASE CONVERTER)
   ═══════════════════════════════════════════════════════════════ */
/* Fullscreen Modal Container */
.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;
}
.fullscreen-modal.active {
    display: flex;
}
/* Fullscreen Header */
.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 rgba(255, 255, 255, 0.1);
    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;
}
.fullscreen-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
}
.fullscreen-title i {
    color: var(--color-primary);
}
.fullscreen-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.fs-action-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 var(--space-xs);
}
/* Fullscreen Settings Panel */
.fs-settings-panel {
    margin-top: 0;  /* fullscreen-header already has gap */
}
/* Fullscreen Download Button - Blue */
.action-btn-inline#fsDownloadBtn {
    background: rgba(52, 152, 219, 0.12);
    border-color: rgba(52, 152, 219, 0.18);
    color: rgba(52, 152, 219, 0.9);
}
.action-btn-inline#fsDownloadBtn:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.25);
    color: #3498db;
}
/* DIFF Fullscreen Download Button - Blue (1:1 from fsDownloadBtn) */
.action-btn-inline#fsDiffDownloadBtn {
    background: rgba(52, 152, 219, 0.12);
    border-color: rgba(52, 152, 219, 0.18);
    color: rgba(52, 152, 219, 0.9);
}
.action-btn-inline#fsDiffDownloadBtn:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.25);
    color: #3498db;
}
.fullscreen-exit-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    border: none !important;
    color: var(--color-white) !important;
}
.fullscreen-exit-btn:hover {
    transform: scale(1.1);
}
/* Fullscreen Content */
.fullscreen-content {
    flex: 1;
    padding: var(--space-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fullscreen-text-areas {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    overflow: hidden;
}
.fs-text-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}
.fs-section-header {
    margin-bottom: var(--space-md);
}
.fs-section-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fs-section-label i {
    color: var(--color-primary);
}
.fs-editor-container {
    flex: 1;
    position: relative;
    display: flex;
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.fs-editor-container .line-numbers {
    padding: var(--space-md);
    padding-right: var(--space-sm);
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    user-select: none;
    text-align: right;
    min-width: 40px;
    overflow-y: hidden;  /* Hide scrollbar - scroll controlled by JS */
    overflow-x: hidden;
    white-space: pre;
}
/* Fullscreen line number items for highlighting support */
.fs-editor-container .line-number-item {
    line-height: 1.5;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.fs-editor-container .line-number-item.active {
    background-color: rgba(255, 193, 7, 0.25);  /* Yellow highlight */
    color: rgba(255, 193, 7, 1);  /* Bright yellow text */
    font-weight: 600;
    border-radius: var(--radius-xs);
    padding: 0 4px;
}
.fs-text-input,
.fs-text-output {
    flex: 1;
    padding: var(--space-md);
    border: none;
    background: rgba(8, 22, 50, 0.55);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-family: var(--font-mono);
    outline: none;
    resize: none;
    height: 100%;
    width: 100%;
    line-height: 1.5;
    tab-size: 4;
    white-space: pre; /* Preserve whitespace for indentation */
    word-wrap: normal; /* Override default textarea word wrapping */
    overflow-wrap: normal; /* Prevent word breaking */
    word-break: normal; /* No word breaking */
    overflow-x: auto; /* Enable horizontal scroll */
    overflow-y: auto; /* Enable vertical scroll */
}
.fs-text-input:focus,
.fs-text-output:focus {
    outline: none;
}
.fs-text-input::placeholder {
    color: var(--color-gray);
    font-family: 'Inter', sans-serif;
}
/* DIFF Fullscreen - textarea-container wrapper for highlighting */
.fs-editor-container .textarea-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.fs-editor-container .textarea-container .json-textarea {
    width: 100%;
    height: 100%;
    padding: var(--space-md);
    border: none;
    background: rgba(8, 22, 50, 0.55);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-family: var(--font-mono);
    outline: none;
    resize: none;
    line-height: 1.5;
    tab-size: 4;
    position: relative;
    z-index: 2;
    white-space: pre;  /* Preserve whitespace for indentation */
    word-wrap: normal; /* Override default textarea word wrapping */
    overflow-wrap: normal; /* Prevent word breaking */
    word-break: normal; /* No word breaking */
    overflow-x: auto;
}
/* DIFF fullscreen - disable word wrap for side-by-side comparison */
#fsDiffLeft,
#fsDiffRight {
    white-space: nowrap;
}
.fs-editor-container .textarea-container .json-textarea:focus {
    outline: none;
}
/* Responsive Fullscreen */
@media (max-width: 1024px) {
    .fullscreen-text-areas {
        grid-template-columns: 1fr;
    }
    .fullscreen-header {
        padding: var(--space-md);
    }
    .fullscreen-content {
        padding: var(--space-md);
    }
}
@media (max-width: 768px) {
    .fullscreen-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    .fullscreen-header-left,
    .fullscreen-header-right {
        width: 100%;
        justify-content: center;
    }
    .fs-action-separator {
        display: none;
    }
}
/* Tree View Fullscreen Specific Styles */
.fs-tree-view-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-left: auto;
}
.fs-tree-view-container {
    flex: 1;
    overflow: auto;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}
/* Disabled state for indentation buttons in tree view fullscreen */
.indent-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
/* Print styles */
@media print {
    .btn,
    .mode-buttons,
    .options-row,
    .section-actions,
    .center-actions,
    .loading-spinner {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .json-textarea {
        border: 1px solid #ccc;
        color: black;
    }
}
/* Quick Feature and Usage Step Styles */
.quick-feature span {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
    font-weight: 500;
}
.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;
}
/* Modal Styles - COPIED 1:1 FROM HTML ENTITY 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: var(--z-modal);
    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: 400px;
    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);
}
/* Disable body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}
.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/Sample Option Groups */
.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);
}
.sample-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.sample-buttons .btn {
    width: 100%;
    justify-content: center;
}
/* Drag & Drop Watermark Functionality (1:1 from base64-converter) */
.textarea-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    min-height: 180px;
}
/* Main input textarea-container inside editor-container needs flex */
.editor-container .textarea-container {
    flex: 1;
    min-height: unset;
    border-radius: 0;
}
/* Main input textarea inside textarea-container */
.editor-container .textarea-container .json-textarea {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}
/* Diff mode editor-container (same as main input) */
.diff-panel .editor-container {
    flex: 1;
}
/* Inline diff highlighting for line numbers - MUST MATCH .line-numbers exactly! */
.line-num {
    padding: 0 var(--space-sm);  /* Horizontal padding only - vertical handled by line-height */
    text-align: right;
    font-family: var(--font-mono);  /* MUST MATCH .line-numbers! */
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
    line-height: 1.5;  /* MUST MATCH .line-numbers AND textarea! */
}
.line-num.diff-removed {
    background: rgba(231, 76, 60, 0.25);
    color: rgba(231, 76, 60, 0.95);
    font-weight: 600;
}
.line-num.diff-added {
    background: rgba(39, 174, 96, 0.25);
    color: rgba(39, 174, 96, 0.95);
    font-weight: 600;
}
/* Diff highlight overlay - full line highlighting */
.diff-highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
    padding: var(--space-md);  /* MUST MATCH textarea padding! */
}
/* Inner wrapper for highlights - moves with scroll via transform */
.diff-highlight-inner {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);  /* MUST MATCH textarea! 0.875rem = 14px */
    line-height: 1.5;                 /* MUST MATCH textarea! */
    will-change: transform;           /* GPU optimization */
    transition: none;                 /* No transition for instant scroll */
}
.diff-highlight-line {
    height: 1.5em;  /* MUST MATCH line-height! */
    width: 100%;
}
.diff-highlight-line.removed {
    background: rgba(231, 76, 60, 0.15);
    border-left: 3px solid rgba(231, 76, 60, 0.6);
}
.diff-highlight-line.added {
    background: rgba(39, 174, 96, 0.15);
    border-left: 3px solid rgba(39, 174, 96, 0.6);
}
/* Diff mode textarea-container inside editor-container */
.diff-panel .editor-container .textarea-container {
    flex: 1;
    min-height: unset;
    border-radius: 0;
}
/* Diff mode textareas inside textarea-container need proper positioning */
.diff-panel .editor-container .textarea-container .json-textarea {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}
.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);
    z-index: 1;
    pointer-events: auto;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: text;
}
.textarea-container.has-content .drop-zone-watermark {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.textarea-container.dragging .drop-zone-watermark {
    opacity: 1;
    visibility: visible;
    background: linear-gradient(135deg, rgba(255, 77, 41, 0.1) 0%, rgba(255, 77, 41, 0.05) 100%);
    border: 2px dashed var(--color-primary);
    pointer-events: all;
}
.watermark-content {
    text-align: center;
    color: var(--color-gray);
    pointer-events: none;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    contain: layout style;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
.watermark-content i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    opacity: 0.6;
}
.watermark-content h3 {
    font-size: var(--font-size-lg);
    color: var(--color-light-gray);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}
.supported-formats {
    margin-top: var(--space-xs);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
    max-width: 260px;
}
.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;
}
/* ============================================ */
/* DIFF MODE - Split View Highlighting */
/* ============================================ */
/* Split view container (1:1 from text-diff-checker) */
.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-column {
    background: rgba(255, 255, 255, 0.03);
}
.diff-column-header {
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    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 from text-diff-checker */
.diff-fullscreen-btn {
    width: 32px;
    height: 32px;
    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),
                box-shadow 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;
}
.diff-content {
    padding: var(--space-md);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--font-size-sm);
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
}
/* 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 {
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}
.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 {
    color: rgba(255, 255, 255, 0.7);
}
/* Empty state */
.diff-content:empty::before {
    content: 'No differences to display';
    display: block;
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}
/* ============================================
   DIFF FULLSCREEN MODAL
   ============================================ */
.diff-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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: 10000;
    display: none;
    flex-direction: column;
    padding: var(--space-2xl);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.diff-fullscreen-modal.active {
    display: flex;
    opacity: 1;
}
/* Fullscreen Header */
.diff-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.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);
    font-size: 1.75rem;
}
/* Close Button - solid orange like fullscreen btn */
.diff-fullscreen-close {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.diff-fullscreen-close:hover {
    transform: scale(1.1);
}
/* Fullscreen Content */
.diff-fullscreen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}
/* Cloned Diff Views in Fullscreen */
.diff-fullscreen-content .diff-split-view,
.diff-fullscreen-content .diff-unified-view {
    display: flex !important;
    min-height: 100%;  /* Allow growth if content is larger */
    height: auto;      /* Auto height for proper scrolling */
    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%;  /* Allow growth beyond viewport */
    height: auto;      /* Auto height for proper scrolling */
    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 */
}
/* Hide fullscreen buttons in cloned views */
.diff-fullscreen-content .diff-fullscreen-btn {
    display: none;
}
/* Prevent body scroll when fullscreen is active */
body.fullscreen-active {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}
/* 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;
    }
}
/* Responsive - Tablet */
@media (max-width: 1024px) {
    .diff-fullscreen-modal {
        padding: var(--space-xl);
    }
    .diff-fullscreen-title {
        font-size: var(--font-size-lg);
    }
    .diff-fullscreen-title i {
        font-size: 1.5rem;
    }
}
/* Responsive - Mobile */
@media (max-width: 768px) {
    .diff-fullscreen-modal {
        padding: var(--space-lg);
    }
    .diff-fullscreen-header {
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-md);
    }
    .diff-fullscreen-title {
        font-size: var(--font-size-base);
        gap: var(--space-sm);
    }
    .diff-fullscreen-title i {
        font-size: 1.25rem;
    }
    .diff-fullscreen-close {
        width: 36px;
        height: 36px;
        font-size: var(--font-size-base);
    }
    /* 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-modal {
        padding: var(--space-md);
    }
    .diff-fullscreen-header {
        margin-bottom: var(--space-md);
    }
    .diff-fullscreen-title {
        font-size: var(--font-size-sm);
    }
    .diff-fullscreen-close {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-sm);
    }
}

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

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

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

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

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

/* MOBILE OPTIMIZATION */

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

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

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

.mobile-divider {
    display: none;
}

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

/* SMALLER DESKTOP (1024px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .mode-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
    }

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

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

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

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

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

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

/* TABLET OPTIMIZATION (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .mode-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
    }

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

    .checkbox-group-columns {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .checkbox-column {
        display: contents;
    }

    .option-checkbox {
        flex: 0 0 calc(33.33% - var(--space-sm));
        min-width: 0;
        gap: var(--space-xs);
    }

    .checkbox-label {
        font-size: 11px;
    }

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

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

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

    .stats-group {
        margin-left: auto;
    }
}

@media (max-width: 1024px) {
    .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);
    }

    .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: 56px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 0 var(--space-sm);
        background:
            linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%),
            linear-gradient(135deg, rgba(5,20,45,0.95) 0%, rgba(3,16,36,0.92) 50%, rgba(10,25,50,0.95) 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: none;
        z-index: 1000;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .section-actions {
        display: none;
    }

    .bottom-bar {
        display: none;
    }

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

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

    /* Quick reference title - 14px */
    .cheat-sheet-header h4 {
        font-size: 14px;
    }

    /* Reference card labels - 12px */
    .reference-card h5,
    .reference-card h5 span {
        font-size: 12px;
    }

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

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

    /* Checkboxes layout - 3 per row, 2 rows total */
    .settings-panel {
        grid-template-columns: 1fr !important;
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .setting-group {
        padding: var(--space-sm);
    }

    .checkbox-group-columns {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .checkbox-column {
        display: contents;
    }

    .option-checkbox {
        flex: 0 0 calc(33.33% - var(--space-sm));
        min-width: 0;
        gap: var(--space-xs);
    }

    .checkbox-custom {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .checkbox-custom::after {
        font-size: 10px;
    }

    .checkbox-label {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    /* DIFF mode - hide fullscreen button on mobile */
    .diff-fullscreen-btn,
    #diffFullscreenBtn {
        display: none !important;
    }

    /* DIFF mode - hide navigation bar above panels (will be shown after Original JSON via JS) */
    #diffOptionsRow .diff-navigation-section {
        display: none;
    }

    .diff-navigation-controls {
        gap: var(--space-xs);
    }

    .diff-nav-btn {
        width: 32px;
        height: 32px;
    }

    .diff-counter {
        font-size: 12px;
        min-width: 60px;
    }

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

    .diff-panel {
        width: 100%;
    }

    .diff-panel .editor-container {
        min-height: 200px;
        max-height: 300px;
    }

    /* Mobile navigation bar after Original JSON panel */
    .diff-navigation-mobile {
        display: block;
    }

    .diff-navigation-mobile .diff-navigation-section {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm);
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
    }

    .diff-navigation-mobile .setting-label {
        font-size: 12px;
        justify-content: center;
    }

    .diff-navigation-mobile .diff-navigation-controls {
        justify-content: center;
    }

    .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);
        gap: var(--space-sm);
    }

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

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

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

    .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);
        margin-top: 0;
    }

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

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