/*
* MORELESS CSV ↔ JSON Converter - Main Stylesheet
* Professional bidirectional data conversion tool
* Mobile-first responsive design optimized for performance
*/

/* Enhanced CSS Variables */
:root {
    
    --color-dark: #031024;
    --color-dark-accent: #051e3e;
    --color-dark-light: #0a1a35;
    --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: #1e884ac7;
    --color-success-light: rgba(39, 174, 96, 0.1);
    --color-warning: #F39C12;
    --color-warning-light: rgba(243, 156, 18, 0.1);
    --color-error: #E74C3C;
    --color-error-light: rgba(231, 76, 60, 0.1);
    --color-info: #3498DB;
    --color-info-light: rgba(52, 152, 219, 0.1);
    --color-purple: #9B59B6;
    --color-purple-light: rgba(155, 89, 182, 0.1);

    
    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.75);
    
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.875rem;
    --font-size-3xl: 2.25rem;
    --font-size-4xl: 3rem;
    --font-size-5xl: 3.75rem;
    --font-size-6xl: 4.5rem;
    
    
    --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;
    
    
    --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;
    
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    
    --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);
    
    
    --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.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px) saturate(120%);
    --glass-blur-light: blur(8px) saturate(120%);

    
    --z-behind: -1;
    --z-normal: 0;
    --z-above: 1;
    --z-sticky: 10;
    --z-fixed: 100;
    --z-watermark: 0;
    --z-textarea: 1;
    --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(0, 0, 0, 0.8);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
}

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

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

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

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

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

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

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

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

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

.main-content *,
.main-content *::before,
.main-content *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

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

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


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

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

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

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

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

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

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

/* Main content */
.main-content {
    opacity: 0;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: var(--space-md) 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    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%);
    z-index: 2;
}

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

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

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

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

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

/* Content Wrapper */
.content-wrapper {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    position: relative;
    z-index: 10;
    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);
    box-sizing: border-box;
    width: 100%;
}

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


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

/* 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) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
}

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

.btn-secondary {
    background: var(--glass-bg);
    color: var(--color-white);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px) scale(1.01);
}

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

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-md);
}

.btn-primary::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 0.5s;
}

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

/* Action Buttons */
.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;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

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

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

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

.section-actions .action-btn-inline::before {
    transform: scaleX(0);
}

.section-actions .action-btn-inline:hover::before {
    transform: scaleX(0);
}

.action-btn-inline#downloadBtn {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.15);
    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;
}

.action-btn-inline#clearBtn {
    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 {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
}

/* Checkboxes */
.option-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.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-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);
    pointer-events: auto;
    opacity: 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;
}

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

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

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

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

/* Textareas */
.converter-textarea {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg-secondary);
    color: var(--color-white);
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    outline: none;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    resize: none;
    min-height: 360px;
    max-height: 800px;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    z-index: var(--z-textarea);
}

.converter-textarea.text-input {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-white);
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    outline: none;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: none;
    min-height: 360px;
    max-height: 800px;
    box-sizing: border-box;
    width: 100%;
    line-height: 1.6;
    position: relative;
    opacity: 0;
    cursor: pointer;
}

.converter-textarea.text-input:placeholder-shown {
    opacity: 0;
    cursor: pointer;
}

.converter-textarea.text-input:focus,
.converter-textarea.text-input:not(:placeholder-shown) {
    opacity: 1;
    background: rgba(8, 22, 50, 0.55);
    cursor: text;
}

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

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

.converter-textarea:focus {
    border-color: var(--color-primary);
}

.converter-textarea::placeholder {
    color: var(--color-gray);
}

#outputText.converter-textarea {
    font-family: var(--font-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    opacity: 1;
    background: rgba(8, 22, 50, 0.55);
}

/* Stats Badges */
.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;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

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

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

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

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

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

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

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

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


/* Features Section */
.features-section {
    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-md);
    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);
}

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

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

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

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

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

.step-icon:hover {
    transform: scale(1.05);
}

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

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

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

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

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

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

.quick-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    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;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

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

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

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

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

.faq-grid {
    display: grid;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto var(--space-3xl) 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);
    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: var(--space-xl) var(--space-xl) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 100px;
}

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

/* CSV ⇄ JSON Specific Styles */

/* Conversion Steps */
.conversion-step {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-dark-gray);
}

.conversion-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-label {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-weight: 700;
    color: var(--color-white);
    font-size: var(--font-size-md);
    margin-bottom: var(--space-xl);
    margin-top: 0;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 900;
    flex-shrink: 0;
}

.step-label i {
    color: var(--color-primary);
    font-size: var(--font-size-lg);
}

/* Upload Zone */
.upload-zone {
    display: flex;
    gap: var(--space-xl);
    align-items: stretch;
    min-height: 200px;
}

.drop-area {
    flex: 1;
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    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);
    background: rgba(8, 22, 50, 0.35);
    position: relative;
    text-align: center;
}

.drop-area:hover {
    border-color: var(--color-primary);
    background: var(--glass-bg-hover);
    transform: translateY(-2px) scale(1.01);
}

.drop-area.drag-over {
    border-color: var(--color-success);
    background: rgba(39, 174, 96, 0.1);
    transform: scale(1.02);
}

.drop-area i {
    font-size: var(--font-size-4xl);
    color: var(--color-primary);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.drop-area h3 {
    font-size: var(--font-size-lg);
    color: var(--color-white);
    margin: 0;
}

.drop-area p {
    color: var(--color-light-gray);
    margin: 0;
}

.file-info {
    font-size: var(--font-size-xs);
    color: var(--color-gray);
    margin-top: var(--space-sm);
}

/* Divider OR */
.divider-or {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-md);
}

.divider-or span {
    background: var(--glass-bg);
    color: var(--color-gray);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

/* Text Input Area */
.text-input-area {
    flex: 1;
    position: relative;
}

.text-input-area .converter-textarea {
    min-height: 200px;
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
}

.input-actions {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    gap: var(--space-xs);
}

/* File Status */
.file-status {
    margin-top: var(--space-lg);
    background: var(--glass-bg);
    border: 1px solid var(--color-success);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.file-status-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.file-status i {
    font-size: var(--font-size-xl);
    color: var(--color-success);
}

.file-details {
    flex: 1;
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.file-name {
    font-weight: 600;
    color: var(--color-white);
}

.file-size,
.file-rows {
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
}

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

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

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

.setting-label i {
    color: var(--color-primary);
}

.setting-select {
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.setting-input {
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-white);
    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);
}

.setting-input:focus {
    border-color: var(--color-primary);
    border-width: 2px;
    outline: none;
}

.delimiter-select,
.nested-select {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(8, 22, 50, 0.45);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: var(--font-size-xs);
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    margin-right: var(--space-sm);
}

.delimiter-select:hover,
.delimiter-select:focus,
.nested-select:hover,
.nested-select:focus {
    border-color: var(--color-primary);
    border-width: 2px;
    background: var(--glass-bg-hover);
    outline: none;
}

.delimiter-select option,
.nested-select option {
    background: var(--color-dark);
    color: var(--color-white);
    padding: var(--space-xs);
}

.hidden {
    display: none !important;
}

.nested-select.hidden {
    display: none;
}



.format-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

.format-btn {
    padding: var(--space-md);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-light-gray);
    font-size: var(--font-size-xs);
    font-weight: 600;
    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);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    text-align: center;
}

.format-btn i {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
}

.format-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px) scale(1.01);
}

.format-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.format-btn.active i {
    color: var(--color-white);
}

.advanced-toggle {
    margin-top: var(--space-xl);
    text-align: center;
}

.advanced-toggle .btn {
    min-width: 200px;
}

#advancedIcon {
    transition: transform var(--transition-normal);
}

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

.advanced-panel {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

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

.advanced-section h5 {
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indent-select {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.indent-select label {
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
}

.mapping-container {
    margin-bottom: var(--space-xl);
}

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

.mapping-header h5 {
    color: var(--color-white);
    font-size: var(--font-size-md);
    font-weight: 700;
    margin: 0;
}

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

.mapping-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg-secondary);
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.mapping-table thead {
    background: var(--glass-bg);
}

.mapping-table th {
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--color-white);
    border-bottom: 1px solid var(--color-dark-gray);
}

.mapping-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-dark-gray);
    color: var(--color-light-gray);
}

.mapping-table tbody tr:hover {
    background: var(--glass-bg-hover);
}

.mapping-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mapping-table input[type="text"] {
    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-size: var(--font-size-sm);
}

.mapping-table input[type="text"]:focus {
    border-color: var(--color-primary);
    outline: none;
}

.mapping-table select {
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    cursor: pointer;
}

.transform-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.filters-container {
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

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

.filters-header h5 {
    color: var(--color-white);
    font-size: var(--font-size-md);
    font-weight: 700;
    margin: 0;
}

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

.filter-item {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.filter-item select,
.filter-item input {
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-size: var(--font-size-sm);
}

.filter-remove {
    width: 32px;
    height: 32px;
    background: var(--color-error-light);
    border: 1px solid var(--color-error);
    border-radius: var(--radius-md);
    color: var(--color-error);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: 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);
}

.filter-remove:hover {
    background: var(--color-error);
    color: var(--color-white);
    transform: scale(1.1);
}

/* Convert Action */
.convert-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-dark-gray);
}

.convert-stats {
    display: flex;
    gap: var(--space-xl);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
}

.stat-item i {
    color: var(--color-primary);
}

/* Progress Container */
.progress-container {
    margin-top: var(--space-xl);
}

.progress-bar {
    height: 8px;
    background: var(--color-dark-gray);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
    width: 0%;
}

.progress-text {
    text-align: center;
    color: var(--color-light-gray);
    font-size: var(--font-size-sm);
    margin-top: var(--space-sm);
}

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

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

.output-label i {
    color: var(--color-primary);
}

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

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

/* JSON Output */
.json-output-wrapper {
    position: relative;
    max-height: 500px;
    overflow: auto;
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.json-output {
    margin: 0;
    padding: var(--space-lg);
    color: var(--color-white);
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* JSON Syntax Highlighting */
.json-key {
    color: #79c0ff;
}

.json-string {
    color: #a5d6ff;
}

.json-number {
    color: #79c0ff;
}

.json-boolean {
    color: #ff7b72;
}

.json-null {
    color: #8b949e;
}

/* Output Stats */
.output-stats {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-dark-gray);
}

/* Fullscreen Mode */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 16, 36, 0.95);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
}

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

.fullscreen-content {
    flex: 1;
    overflow: auto;
    padding: var(--space-lg);
}

.fullscreen-close {
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-white);
    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);
}

.fullscreen-close:hover {
    background: var(--color-primary-dark);
}

/* Modal Styles - Glass Morphism */
/* MODAL OVERLAY - 1:1 Copy from PDF Merger */
.modal-overlay,
.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%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

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

/* MODAL CONTENT - 1:1 Copy from PDF Merger */
.modal-content,
.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: 500px;
    transform: translate3d(0, 30px, 0) scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-size-lg);
    }
    
    .hero-description {
        font-size: var(--font-size-xs);
    }
    
    .content-wrapper {
        padding: var(--space-md);
    }
    
    .upload-zone {
        flex-direction: column;
    }
    
    .divider-or {
        margin: var(--space-md) 0;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .format-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advanced-grid {
        grid-template-columns: 1fr;
    }
    
    .mapping-table {
        font-size: var(--font-size-xs);
    }
    
    .mapping-table th,
    .mapping-table td {
        padding: var(--space-xs);
    }
    
    .filter-item {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }
    
    .convert-action {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .convert-stats {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
    
    .transform-actions {
        justify-content: center;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--space-xs) 0;
        margin-bottom: var(--space-sm);
    }
    
    .hero-title {
        font-size: var(--font-size-md);
    }
    
    .content-wrapper {
        padding: var(--space-sm);
    }
    
    .step-label {
        font-size: var(--font-size-sm);
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: var(--font-size-xs);
    }
    
    .drop-area {
        padding: var(--space-lg);
    }
    
    .drop-area i {
        font-size: var(--font-size-2xl);
    }
    
    .drop-area h3 {
        font-size: var(--font-size-md);
    }
    
    .format-buttons {
        grid-template-columns: 1fr;
    }
    
    .json-output {
        font-size: var(--font-size-xs);
        padding: var(--space-md);
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-card {
        padding: var(--space-sm);
    
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
    
    .feature-card {
        padding: var(--space-lg);
    }
    
    .faq-question {
        padding: var(--space-md);
    }
    
    .faq-question h3 {
        font-size: var(--font-size-sm);
    }
}

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

/* ===========================
   FAVORITES TAB (behind content)
   =========================== */
.tool-tabs {
    position: absolute;
    top: -44px;
    right: 64px;
    display: flex;
    gap: var(--space-sm);
    z-index: 5;
}

.mobile-action-group,
.mobile-divider {
    display: none;
}

.tool-tab {
    position: relative;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.10);
    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;
}

/* Print Styles */
@media print {
    .tool-modal,
    .btn,
    .faq-section,
    .input-actions,
    .output-actions {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .content-wrapper,
    .feature-card {
        border: 1px solid #ccc;
        background: white;
        color: black;
        break-inside: avoid;
    }
}

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

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

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

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

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

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


    cursor: pointer;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

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

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

.analytics-data {
    flex: 1;
}

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

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

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

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

.mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

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

.mode-collapsible-content {
    max-height: 200px;
    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);
    opacity: 1;
}

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

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

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

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

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

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

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

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

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

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

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

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

.mode-btn-integrated.active .mode-title-integrated {
    color: #ffffff;
}

.mode-btn-integrated.active .mode-desc-integrated {
    color: rgba(255, 255, 255, 0.8);
}

.mode-icon-integrated {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FF4D29, #ff6b47);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mode-title-integrated {
    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-integrated {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Input/Output Sections */
.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Drag & Drop Functionality - Base64 Style */
.textarea-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    height: 360px;
}

.textarea-wrapper {
    position: relative;
}

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

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

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

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

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

.convert-btn {
    writing-mode: horizontal-tb;
    white-space: nowrap;
    min-width: 100px;
}

.swap-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-md);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.swap-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: var(--radius-md);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

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

.swap-btn:hover::before {
    transform: scaleX(0);
}

.swap-btn:disabled,
.swap-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    transform: none;
}

.swap-btn:disabled:hover,
.swap-btn.disabled:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    transform: none;
}

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

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

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


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

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

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

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

/* Converter Main Styles */
.converter-main {
    margin-bottom: var(--space-3xl);
}

/* Upload Section Styles */
.upload-section {
    margin-bottom: var(--space-3xl);
}

.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(8, 22, 50, 0.35);
    padding: var(--space-3xl) var(--space-2xl);
    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);
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 0.05;
}

.drop-zone-content {
    position: relative;
    z-index: 1;
}

.drop-icon {
    font-size: var(--font-size-4xl);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    animation: bounce 2s infinite;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drop-title {
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-white);
    font-size: var(--font-size-md);
    font-weight: 600;
}

.drop-subtitle {
    color: var(--text-secondary);
    margin: 0 0 var(--space-md) 0;
    font-size: var(--font-size-sm);
}

.drop-features {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.feature-badge {
    background: var(--glass-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Divider Section */
.divider-section {
    display: flex;
    align-items: center;
    margin: var(--space-2xl) 0;
    gap: var(--space-lg);
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider-text {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 var(--space-sm);
}

/* Text Input Section */
.text-input-section {
    margin: var(--space-xl) 0;
}

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

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

.input-actions {
    display: flex;
    gap: var(--space-sm);
}

.input-textarea {
    width: 100%;
    min-height: 300px;
    padding: var(--space-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    resize: 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);
}

.input-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.input-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* File Status Styles */
.file-status {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.file-status-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

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

.file-size {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* Options Section */
.options-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-2xl) 0;
}


.option-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.option-label {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
    min-width: 80px;
}

.option-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    flex: 1;
    max-width: 200px;
}

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

/* Convert Section */
.convert-section {
    text-align: center;
    margin: var(--space-2xl) 0;
    padding-top: var(--space-xl);
}

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

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

.output-actions {
    display: flex;
    gap: var(--space-sm);
}

.output-wrapper {
    position: relative;
}

.output-textarea {
    width: 100%;
    min-height: 400px;
    padding: var(--space-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 0;
}

/* Statistics Section Styles */
.stats-section {
    margin-top: var(--space-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
}

.stat-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
}



/* Minify Toggle Button */
.minify-toggle-btn {
    width: auto !important;
    min-width: 60px !important;
    padding: 0 var(--space-sm) !important;
    font-size: var(--font-size-xs) !important;
    font-weight: 500;
    white-space: nowrap;
}

.minify-toggle-btn[data-state="minified"] {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.25);
    color: #ffc107;
}

.minify-toggle-btn[data-state="minified"]:hover {
    background: rgba(255, 193, 7, 0.25);
    border-color: rgba(255, 193, 7, 0.35);
}

/* Hide minify button in JSON to CSV mode */
[data-mode="json-to-csv"] .minify-toggle-btn {
    display: none !important;
}

/* 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: 900px) {
    .converter-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

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

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

    .usage-steps-horizontal {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: var(--space-lg);
    }

    .usage-step {
        flex: 0 1 auto;
        text-align: center;
        align-items: center;
    }

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

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

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

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

    .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:focus,
    .mobile-action-btn:focus-visible {
        outline: none;
    }

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

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

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

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

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

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

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

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

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

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

    .mobile-action-btn[data-action="minify"].active {
        background: rgba(255, 193, 7, 0.15);
        border: 1px solid rgba(255, 193, 7, 0.25);
    }

    .mobile-action-btn[data-action="minify"].active i {
        color: #ffc107;
    }

    .section-actions .action-btn-inline {
        display: none;
    }

    [data-mode="json-to-csv"] .mobile-action-btn[data-action="minify"] {
        display: none;
    }

    .center-actions.desktop-only {
        display: none;
    }

    .bottom-bar .options-group {
        display: none;
    }

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

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

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

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

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

    .converter-textarea,
    .converter-textarea.text-input,
    #outputText.converter-textarea {
        font-size: 12px;
        min-height: 280px;
        height: 280px;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .usage-step:nth-child(5) {
        grid-column: 1 / -1;
        justify-self: center;
        margin-top: var(--space-lg);
    }

    .step-arrow {
        display: none;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .textarea-container {
        height: 280px;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .textarea-container {
        height: 220px;
    }

    .converter-textarea,
    .converter-textarea.text-input,
    #outputText.converter-textarea {
        font-size: 11px;
        min-height: 220px;
        height: 220px;
    }

    .action-btn-inline {
        width: 32px;
        height: 32px;
    }
}

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

    .tool-container {
        padding: 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .textarea-container {
        height: 180px;
    }

    .converter-textarea,
    .converter-textarea.text-input,
    #outputText.converter-textarea {
        font-size: 10px;
        min-height: 180px;
        height: 180px;
    }
}
