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

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-text {
    color: #0066cc;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

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

body.dark-mode .page-loader {
    background: rgba(26, 26, 26, 0.95);
}

body.dark-mode .loader-spinner {
    border-color: #404040;
    border-top-color: #0066cc;
}

body.dark-mode .loader-text {
    color: #6bb6ff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
header {
    background: #ffffff;
    color: #333;
    padding: 24px 30px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}
/* Hide header button on mobile, show footer button */
@media (max-width: 768px) {
    .dark-mode-toggle {
        display: none !important;
    }
    .shortcuts-btn-tabs {
        display: none !important;
    }
}
.dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 25px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 11px;
    color: white;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    backdrop-filter: blur(10px);
}
.dark-mode-toggle::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #e0e0e0, transparent);
}
.dark-mode-toggle:hover {
    background: linear-gradient(135deg, #0052a3 0%, #0066cc 100%);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.dark-mode-toggle:active {
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}
.dark-mode-toggle .icon {
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: brightness(1.2);
}
.dark-mode-toggle #darkModeText {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
}
header h1 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    letter-spacing: -0.3px;
}
header p {
    font-size: 11px;
    color: #666;
    margin: 0;
    font-weight: 400;
}
header p.header-description {
    display: block;
}
/* Hide description on mobile */
@media (max-width: 768px) {
    header p.header-description {
        display: none !important;
    }
}
.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 0 10px;
}
.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tabs-left {
    display: flex;
}
.tabs-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.shortcuts-btn-tabs {
    padding: 0px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    color: black;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    text-decoration: none;
}
.shortcuts-btn-tabs:hover {
    color: #0066cc;
}
.shortcuts-btn-tabs:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    border-radius: 2px;
}
body.dark-mode .shortcuts-btn-tabs {
    color: #b0b0b0;
}
body.dark-mode .shortcuts-btn-tabs:hover {
    color: #6bb6ff;
}
.goto-line-btn-tabs {
    padding: 0px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    color: black;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    text-decoration: none;
}
.goto-line-btn-tabs:hover {
    color: #0066cc;
}
.goto-line-btn-tabs:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    border-radius: 2px;
}
body.dark-mode .goto-line-btn-tabs {
    color: #b0b0b0;
}
body.dark-mode .goto-line-btn-tabs:hover {
    color: #6bb6ff;
}
.tab {
    padding: 9px 28px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
    display: inline-block;
}

a.tab {
    color: #6b7280;
}

a.tab:hover {
    text-decoration: none;
    color: #0066cc;
    margin-bottom: -1px;
    border-radius: 0;
    height: auto;
    line-height: normal;
    box-shadow: none;
}
.tab:hover {
    background: #f5f5f5;
    color: #0066cc;
    transform: none;
}
.tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    background: white;
    font-weight: 600;
}
/* Removed .tab.has-data - no longer used */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}
.tab:active {
    transform: none;
    box-shadow: none;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 750px;
}
.input-section {
    padding: 15px;
    border-right: 1px solid #e5e7eb;
    background: #fafafa;
    overflow: visible;
}
.text-tab-input {
    border-right: none;
    max-width: 100%;
    overflow: visible;
}
.viewer-tab-content {
    padding: 20px;
}
.viewer-container {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
    height: 70vh;
    min-height: 400px;
    max-height: 80vh;
}
.tree-view, .table-view {
    padding: 20px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    font-size: 14px;
    line-height: 1.8;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.tree-view {
    overflow-y: auto;
    overflow-x: auto;
    flex: 0 0 70%;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 0;
    width: 100%;
    /* Custom scrollbar styling */
    scrollbar-width: auto;
    scrollbar-color: #0066cc #f0f0f0;
}
/* Webkit scrollbar for tree-view - always visible */
.tree-view::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}
.tree-view::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 6px;
}
.tree-view::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 6px;
    border: 2px solid #f0f0f0;
    min-height: 20px;
    min-width: 20px;
}
.tree-view::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}
.tree-view::-webkit-scrollbar-corner {
    background: #f0f0f0;
}
.resizer {
    width: 4px;
    background: #e5e7eb;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.resizer:hover {
    background: #0066cc;
}
.resizer.active {
    background: #0066cc;
}
.table-view {
    flex: 0 0 30%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    height: 100%;
    min-height: 0;
}
.table-view .table-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    padding: 18px;
    min-height: 0;
    min-width: 0;
    width: 100%;
    /* Custom scrollbar styling */
    scrollbar-width: auto;
    scrollbar-color: #0066cc #f0f0f0;
}
.tree-node {
    margin: 4px 0;
    cursor: pointer;
    user-select: none;
    min-width: max-content;
    width: max-content;
    transition: background 0.15s ease;
    border-radius: 4px;
    width: 100%;
}
.tree-node:hover {
    background: #f0f7ff;
    border-radius: 4px;
}
.tree-content {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    line-height: 1.6;
    white-space: nowrap;
    min-width: max-content;
    width: max-content;
    transition: padding 0.15s ease;
}
.tree-toggle {
    background: rgba(0, 102, 204, 0.1);
    border-radius: 3px;
    transition: all 0.15s ease;
    padding: 0px 5px 0px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
}
.tree-toggle:hover {
    background: rgba(0, 102, 204, 0.2);
}
.tree-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    font-size: 12px;
    color: #0066cc;
    flex-shrink: 0;
}
.tree-children {
    margin-left: 20px;
    display: none;
}
.tree-node.expanded > .tree-children {
    display: block;
}
.tree-key {
    color: #881391;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding-right: 8px;
}
.tree-value {
    margin-left: 8px;
    white-space: nowrap;
    overflow: visible;
    color: #0b5394;
    font-weight: 400;
}
.table-view table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: auto;
    min-width: max-content;
}
.table-view {
    padding: 0;
}
.table-view .table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 18px;
    min-height: 0;
    /* Custom scrollbar styling for better visibility */
    scrollbar-width: thin;
    scrollbar-color: #0066cc #f0f0f0;
    /* Enable smooth scrolling */
    -webkit-overflow-scrolling: touch;
}
.table-view .table-wrapper.dragging {
    cursor: grabbing !important;
    user-select: none;
}
.table-view .table-wrapper.dragging * {
    user-select: none;
    pointer-events: none;
}
/* Webkit browsers (Chrome, Safari, Edge) */
.table-view .table-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
.table-view .table-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 6px;
}
.table-view .table-wrapper::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 6px;
    border: 2px solid #f0f0f0;
    min-height: 20px;
    min-width: 20px;
}
.table-view .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}
.table-view .table-wrapper::-webkit-scrollbar-corner {
    background: #f0f0f0;
}
.table-view th {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 2px 6px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #0052a3;
    font-size: 13px;
}
.table-view td {
    padding: 4px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    max-width: none;
    transition: background 0.15s ease;
}
.table-view tr:nth-child(even) {
    background: #fafbfc;
}
.table-view tr:hover {
    background: #f0f7ff;
    transform: scale(1.001);
    box-shadow: 0 1px 3px rgba(0, 102, 204, 0.1);
}
.table-view tr.search-highlight {
    background: #fff3cd !important;
    border: 2px solid #ffc107;
}
.table-view tr.search-highlight:hover {
    background: #ffe69c !important;
}
.json-key {
    color: #a31515;
    font-weight: 600;
}
.json-string {
    color: #0b5394;
}
.json-number {
    color: #28a745;
}
.json-boolean {
    color: #0e0eff;
}
.json-null {
    color: #808080;
}
.json-bracket {
    color: #000000;
    font-weight: bold;
}
.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    overflow: visible;
}
.button-group-top {
    margin-bottom: 12px;
}
.button-group-bottom {
    margin-top: 12px;
}
/* Mobile button organization */
@media (max-width: 768px) {
    .button-group-bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 10px;
    }
    .button-group-bottom button {
        width: 100%;
        padding: 8px 12px;
        font-size: 12px;
    }
    .button-group-bottom .download-menu-container {
        grid-column: 1 / -1;
        width: 100%;
    }
    .button-group-bottom .download-icon-btn {
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .button-group-bottom {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 8px;
    }
    .button-group-bottom button {
        padding: 10px 12px;
        font-size: 13px;
        width: 100%;
    }
    .button-group-bottom .download-menu-container {
        grid-column: 1;
    }
}
.top-message-container {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10000;
    overflow: visible;
    align-items: flex-end;
}
.top-message {
    padding: 8px 12px;
    padding-top: 28px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: normal;
    width: fit-content;
    max-width: 500px;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
    z-index: 10001;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.top-message-text {
    flex: 0 1 auto;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-right: 15px;
}
.top-message-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 0px;
    right: 6px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    text-decoration: none;
}
.top-message-close:hover {
    opacity: 1;
}
.top-message.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.top-message.success {
    background: #28a745;
    color: white;
}
.top-message.error {
    background: #dc3545;
    color: white;
}
.viewer-prompt {
    margin-bottom: 12px;
}
.viewer-prompt.hidden {
    display: none;
}
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #e6f3ff;
    border: 1px solid #0066cc;
    border-radius: 6px;
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 12px;
}
.privacy-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.privacy-text {
    color: #0066cc;
    line-height: 1.4;
}
body.dark-mode .privacy-notice {
    background: #1e3a5f;
    border-color: #0066cc;
}
body.dark-mode .privacy-text {
    color: #6bb6ff;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.viewer-prompt:not(.hidden) {
    animation: slideDown 0.3s ease;
}
.textarea-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    background: white;
    border-radius: 10px;
    min-height: 300px;
}
/* Ace Editor Container */
#jsonEditor {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    min-height: 300px;
    background: white;
    z-index: 2;
    /* font-size is controlled by Ace Editor options, not CSS */
    line-height: 1.7 !important;
}

/* Ace Editor Base Styling */
.ace_editor {
    font-family: 'Courier New', Courier, monospace !important;
    /* font-size is controlled by Ace Editor options, not CSS */
    border-radius: 10px;
}

/* Ensure Ace Editor content is visible - fix for first character being cut off */
#jsonEditor .ace_scroller {
    padding-left: 4px !important;
}
#jsonEditor .ace_content {
    padding-left: 4px !important;
}
#jsonEditor .ace_text-input {
    padding-left: 4px !important;
}

/* Ace Editor Dark Mode Container */
body.dark-mode #jsonEditor {
    border-color: #404040;
    background: #1a1a1a;
}

/* Ace Editor Line Numbers (Gutter) Styling */
.ace_gutter {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-right: 1.5px solid #e5e7eb !important;
    width: 50px !important;
}
.ace_gutter-layer {
    width: 50px !important;
}
.ace_gutter-cell {
    padding-right: 15px !important;
}

/* Ace Editor Dark Mode Gutter */
body.dark-mode .ace_gutter {
    background: #252525 !important;
    color: #888 !important;
    border-right-color: #404040 !important;
}
.fullscreen-view-btn-tabs {
    padding: 0px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    color: black;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    text-decoration: none;
}
.fullscreen-view-btn-tabs:hover {
    color: #0066cc;
}
.fullscreen-view-btn-tabs:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    border-radius: 2px;
}
body.dark-mode .fullscreen-view-btn-tabs {
    color: #b0b0b0;
}
body.dark-mode .fullscreen-view-btn-tabs:hover {
    color: #6bb6ff;
}
.line-numbers {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    padding: 15px 8px;
    background: #f8f9fa;
    border: 1.5px solid #e5e7eb;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #6c757d;
    text-align: right;
    user-select: none;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.line-numbers div {
    min-height: 1.7em;
}
textarea {
    width: 100%;
    padding: 15px 15px 15px 70px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    resize: none;
    overflow-y: auto;
    overflow-x: auto;
    background: white;
    line-height: 1.7;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    box-sizing: border-box;
    position: relative;
    z-index: 3;
    color: #333;
    caret-color: #333;
    font-family: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1), 0 2px 8px rgba(0,0,0,0.08);
}
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 12px;
}
.editor-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
    color: #6c757d;
    border: 1px solid #e5e7eb;
    flex: 1;
}
.editor-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
}
.font-size-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}
.font-size-icon:hover {
    color: #0066cc;
}
.font-size-icon:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 2px;
}
.font-size-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
}
.word-wrap-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.word-wrap-toggle:hover {
    background: #e9ecef;
    border-color: #0066cc;
    color: white;
}
.word-wrap-toggle:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}
.word-wrap-toggle.active {
    background: #0066cc;
    border-color: #0066cc;
    color: white;
}
.word-wrap-toggle.active:hover {
    background: #0052a3;
}
body.dark-mode .word-wrap-toggle {
    background: #2d2d2d;
    border-color: #404040;
    color: #b0b0b0;
}
body.dark-mode .word-wrap-toggle:hover {
    background: #404040;
    border-color: #0066cc;
    color: #6bb6ff;
}
body.dark-mode .word-wrap-toggle.active {
    background: #0066cc;
    border-color: #0066cc;
    color: white;
}
body.dark-mode .word-wrap-toggle.active:hover {
    background: #0052a3;
}
body.dark-mode .font-size-controls {
    background: #2d2d2d;
    border-color: #404040;
}
body.dark-mode .font-size-icon {
    color: #b0b0b0;
}
body.dark-mode .font-size-icon:hover {
    color: #6bb6ff;
}
body.dark-mode .font-size-display {
    color: #b0b0b0;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-label {
    font-weight: 500;
    color: #495057;
}
.stat-value {
    font-weight: 600;
    color: #0066cc;
    font-family: 'Courier New', Courier, monospace;
}
body.dark-mode .editor-stats {
    background: #2d2d2d;
    border-color: #404040;
    color: #b0b0b0;
}
body.dark-mode .stat-label {
    color: #b0b0b0;
}
body.dark-mode .stat-value {
    color: #6bb6ff;
}
@media (max-width: 768px) {
    .editor-stats {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 11px;
    }
}
@media (max-width: 480px) {
    .editor-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
/* Keyboard Shortcuts Modal Styles */
/* Shortcuts Modal Specific Styles */
.shortcuts-modal {
    max-width: 800px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.shortcuts-modal-content {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(90vh - 140px);
}

.shortcuts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .shortcuts-list {
        grid-template-columns: 1fr;
    }
    .shortcuts-modal {
        max-width: 95% !important;
    }
}

.shortcuts-category {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcuts-category-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
    padding-bottom: 6px;
    border-bottom: 2px solid #e5e7eb;
}

.shortcuts-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.shortcut-item:last-child {
    border-bottom: none;
}
.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.shortcut-key {
    display: inline-block;
    padding: 3px 6px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-width: 20px;
    text-align: center;
    white-space: nowrap;
}
.shortcut-plus {
    color: #6c757d;
    font-size: 14px;
    margin: 0 2px;
}
.shortcut-separator {
    color: #6c757d;
    font-size: 12px;
    margin: 0 8px;
    font-style: italic;
}
.shortcut-description {
    color: #495057;
    font-size: 13px;
    text-align: right;
    flex: 1;
    min-width: 0;
}
body.dark-mode .shortcuts-modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .shortcuts-category-title {
    color: #6bb6ff;
    border-bottom-color: #404040;
}

body.dark-mode .shortcut-item {
    border-bottom-color: #404040;
}

body.dark-mode .shortcut-key {
    background: #2d2d2d;
    border-color: #404040;
    color: #b0b0b0;
}

body.dark-mode .shortcut-plus,
body.dark-mode .shortcut-separator {
    color: #888;
}

body.dark-mode .shortcut-description {
    color: #b0b0b0;
}
@media (max-width: 768px) {
    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .shortcut-description {
        text-align: left;
        margin-left: 0;
    }
}

.output-section {
    background: white;
}
.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #dc3545;
    font-size: 12px;
}
.success {
    color: white;
    background: #0066cc;
    padding: 4px 12px;
    border-radius: 4px;
    border-left: 4px solid #0066cc;
}
.hidden {
    display: none !important;
}
button:not(.tab) {
    padding: 0px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    background: #0066cc;
    color: white;
    height: 25px;
}
button:not(.tab):hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
button:not(.tab):active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
/* Keyboard focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}
.tab:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: -3px;
}
button:not(.tab).secondary {
    background: #6c757d;
}
button:not(.tab).secondary:hover {
    background: #5a6268;
}
button:not(.tab).success {
    background: #28a745;
}
button:not(.tab).success:hover {
    background: #218838;
}
button:not(.tab).danger {
    background: #dc3545;
}
button:not(.tab).danger:hover {
    background: #c82333;
}
button:not(.tab).warning {
    background: #dea705;
    /* color: #333; */
}
button:not(.tab).warning:hover {
    background: #e0a800;
    color: white;
}
button:not(.tab).primary {
    background: #0066cc;
}
button:not(.tab).primary:hover {
    background: #0052a3;
}
.btn-action {
    padding: 0px 17px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 28px;
    line-height: 28px;
}
.btn-action:hover {
    background: #0052a3;
}
.btn-action.danger {
    background: #dc3545;
}
.btn-action.danger:hover {
background: #c82333;
}
button:not(.tab).warning {
    background: #dea705;
    /* color: #333; */
}
.download-menu-container {
    position: relative;
    display: inline-block;
    margin-left: auto;
    overflow: visible;
    z-index: 1000;
}
.download-icon-btn {
    padding: 0px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    background: #0066cc;
    color: white;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    gap: 4px;
}
.download-icon-btn:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.download-icon-btn:active {
    transform: translateY(0);
}
.download-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 5px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 10000;
    overflow: visible;
}
.download-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}
.download-menu-item:last-child {
    border-bottom: none;
}
.download-menu-item:hover {
    background: #f5f5f5;
    color: #0066cc;
}
.download-menu-item span {
    margin-right: 8px;
    font-size: 14px;
}
.download-menu.hidden {
    display: none;
}
.search-bar {
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
    padding: 16px;
    border-top: 2px solid #e5e7eb;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    z-index: 10;
    visibility: visible;
    min-height: fit-content;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}
.search-bar label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}
.search-bar input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: #fafbfc;
}
.search-bar button {
    padding: 0px 10px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-bar button:hover {
    background: linear-gradient(135deg, #0052a3 0%, #004080 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}
.search-bar button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}
.search-nav {
    display: flex;
    gap: 10px;
}
.search-nav a {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid transparent;
}
.search-nav a:hover {
    background: #e6f3ff;
    border-color: #0066cc;
    transform: translateY(-1px);
}
.viewer-guidance {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    margin: 20px;
}
.viewer-guidance.invalid {
    color: #721c24;
    background: #f8d7da;
    border: 2px solid #dc3545;
}
.viewer-guidance h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}
.viewer-guidance.invalid h3 {
    color: #721c24;
}
.viewer-guidance p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}
.viewer-guidance.invalid p {
    color: #721c24;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.modal-overlay.hidden {
    display: none !important;
}
.modal {
    background: white;
    border-radius: 12px;
    padding: 28px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 10px 30px rgba(0,0,0,0.15);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.modal h3 {
    margin: 0;
    color: #0066cc;
    font-size: 1.3em;
}
.modal-close {
    background: white;
    border: none;
    font-size: 24px;
    color: #000;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s ease;
}
.modal-close:hover {
    background: #f5f5f5;
    color: #000;
}
.modal p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}
.modal-input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}
.modal-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
.modal-input.error {
    border-color: #dc3545;
}
.modal-hint {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-bottom: 15px !important;
}
.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.modal-buttons button {
    padding: 0px 13px;
    font-size: 12px;
}
/* Fullscreen Modal Styles */
.fullscreen-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}
.fullscreen-modal-overlay.hidden {
    display: none !important;
}
.fullscreen-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.fullscreen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1.5px solid #e5e7eb;
    flex-shrink: 0;
}
.fullscreen-modal-header h3 {
    margin: 0;
    color: #0066cc;
    font-size: 1.4em;
}
.fullscreen-modal-close {
    background: white;
    border: none;
    font-size: 24px;
    color: #000;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 4px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}
.fullscreen-modal-close:hover {
    background: #f5f5f5;
    color: #000;
}
.fullscreen-modal-close:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}
.fullscreen-modal-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fullscreen-textarea-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
}
#fullscreenEditor {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
/* Ace Editor fullscreen styling */
#fullscreenEditor .ace_editor {
    border-radius: 8px;
}
#fullscreenEditor .ace_gutter {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-right: 1.5px solid #e5e7eb !important;
    width: 50px !important;
}
#fullscreenEditor .ace_gutter-layer {
    width: 50px !important;
}
#fullscreenEditor .ace_gutter-cell {
    padding-right: 15px !important;
}
.fullscreen-modal-footer {
    padding: 16px 24px;
    border-top: 1.5px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}
.fullscreen-modal-footer button {
    padding: 0px 13px;
    font-size: 12px;
    /* height: auto; */
}
body.dark-mode .fullscreen-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
}
body.dark-mode .fullscreen-modal {
    background: #1a1a1a;
    border-color: #404040;
}
body.dark-mode .fullscreen-modal-header {
    border-bottom-color: #404040;
}
body.dark-mode .fullscreen-modal-header h3 {
    color: #6bb6ff;
}
body.dark-mode .fullscreen-modal-close {
    background: #2d2d2d;
    color: #e0e0e0;
}
body.dark-mode .fullscreen-modal-close:hover {
    background: #404040;
}
body.dark-mode .fullscreen-textarea-wrapper {
    background: #1a1a1a;
    border-color: #404040;
}
body.dark-mode #fullscreenEditor .ace_gutter {
    background: #252525 !important;
    color: #888 !important;
    border-right-color: #404040 !important;
}
body.dark-mode .fullscreen-modal-footer {
    border-top-color: #404040;
}
/* Responsive height adjustments for different devices */
@media (max-width: 480px) {
    /* Mobile devices */
    header {
        padding: 20px 20px 20px 20px;
    }
    header h1 {
        font-size: 16px;
        line-height: 1.3;
        max-width: 100%;
    }
    header p {
        font-size: 9px;
        line-height: 1.4;
        max-width: 100%;
    }
    header p.header-description {
        display: none !important;
    }
    /* Header button hidden on mobile */
    .dark-mode-toggle {
        display: none !important;
    }
    /* Smaller mobile button */
    .dark-mode-toggle-mobile {
        padding: 8px 16px;
        font-size: 11px;
    }
    .dark-mode-toggle-mobile .icon {
        font-size: 14px;
    }
    .dark-mode-toggle-mobile #darkModeTextMobile {
        font-size: 11px;
    }
    .dark-mode-toggle .icon {
        font-size: 11px;
    }
    .dark-mode-toggle #darkModeText {
        font-size: 9px;
    }
    .viewer-container {
        height: 50vh;
        min-height: 300px;
        max-height: 60vh;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    /* Tablets */
    .viewer-container {
        height: 60vh;
        min-height: 400px;
        max-height: 70vh;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Small laptops */
    .viewer-container {
        height: 65vh;
        min-height: 450px;
        max-height: 75vh;
    }
}

@media (min-width: 1025px) {
    /* Desktop and larger screens */
    .viewer-container {
        height: 70vh;
        min-height: 500px;
        max-height: 80vh;
    }
}

@media (max-width: 768px) {
    header {
        padding-right: 30px;
    }
    header h1 {
        font-size: 18px;
        padding-right: 0;
        max-width: 100%;
    }
    header p {
        font-size: 10px;
        max-width: 100%;
    }
    header p.header-description {
        display: none !important;
    }
    /* Header button hidden on mobile */
    .dark-mode-toggle {
        display: none !important;
    }
    .dark-mode-toggle .icon {
        font-size: 12px;
    }
    .dark-mode-toggle #darkModeText {
        font-size: 10px;
    }
    .main-content {
        grid-template-columns: 1fr;
    }
    .input-section {
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
    }
    .viewer-container {
        flex-direction: column;
    }
    .resizer {
        display: none;
    }
    .tree-view, .table-view {
        flex: 1 1 100% !important;
    }
    .tree-view {
        border-right: 1.5px solid #e5e7eb;
        border-bottom: none;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }
    .table-view {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    /* Enhanced mobile touch targets */
    button:not(.tab) {
        min-height: 44px;
        min-width: 44px;
    }
    .tab {
        min-height: 44px;
        padding: 12px 20px;
    }
    /* Better mobile scrolling */
    .tree-view, .table-view .table-wrapper {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}
/* Dark Mode Styles */
body.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}
body.dark-mode .container {
    background: #2d2d2d;
    border-color: #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
body.dark-mode header {
    background: #2d2d2d;
    color: #e0e0e0;
    border-bottom-color: #404040;
}
body.dark-mode header h1 {
    color: #e0e0e0;
}
body.dark-mode header p {
    color: #b0b0b0;
}
body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
}
body.dark-mode .dark-mode-toggle:hover {
    background: linear-gradient(135deg, #0052a3 0%, #0066cc 100%);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}
body.dark-mode .dark-mode-toggle:active {
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}
body.dark-mode .dark-mode-toggle::before {
    background: linear-gradient(to bottom, transparent, #404040, transparent);
}
body.dark-mode .dark-mode-toggle .icon {
    filter: brightness(1.3);
}
body.dark-mode .tabs {
    background: #2d2d2d;
    border-bottom-color: #404040;
}
body.dark-mode .tab {
    color: #b0b0b0;
}
body.dark-mode .tab:hover {
    background: #404040;
    color: #0066cc;
}
body.dark-mode .tab.active {
    color: #0066cc;
    background: #2d2d2d;
}
body.dark-mode .input-section {
    background: #252525;
    border-right-color: #404040;
}
body.dark-mode textarea {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
    caret-color: #e0e0e0;
}
body.dark-mode textarea:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
body.dark-mode .textarea-wrapper {
    background: #1a1a1a;
}
body.dark-mode .line-numbers {
    background: #252525;
    border-color: #404040;
    border-right: none;
    color: #888;
}
body.dark-mode .tree-view,
body.dark-mode .table-view {
    background: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}
body.dark-mode .tree-view {
    scrollbar-color: #0066cc #2d2d2d;
}
body.dark-mode .tree-view::-webkit-scrollbar-track {
    background: #2d2d2d;
}
body.dark-mode .tree-view::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-color: #2d2d2d;
}
body.dark-mode .tree-view::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}
body.dark-mode .tree-view::-webkit-scrollbar-corner {
    background: #2d2d2d;
}
body.dark-mode .table-view .table-wrapper {
    scrollbar-color: #0066cc #2d2d2d;
}
body.dark-mode .table-view .table-wrapper::-webkit-scrollbar-track {
    background: #2d2d2d;
}
body.dark-mode .table-view .table-wrapper::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-color: #2d2d2d;
}
body.dark-mode .table-view .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}
body.dark-mode .table-view .table-wrapper::-webkit-scrollbar-corner {
    background: #2d2d2d;
}
body.dark-mode .tree-node:hover {
    background: #2d3a4d;
}
body.dark-mode .tree-key {
    color: #9d4edd;
}
body.dark-mode .tree-value {
    color: #6bb6ff;
}
body.dark-mode .tree-toggle {
    background: rgba(0, 102, 204, 0.2);
}
body.dark-mode .tree-toggle:hover {
    background: rgba(0, 102, 204, 0.3);
}
body.dark-mode .table-view th {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border-color: #0052a3;
}
body.dark-mode .table-view td {
    border-color: #404040;
}
body.dark-mode .table-view tr:nth-child(even) {
    background: #252525;
}
body.dark-mode .table-view tr:hover {
    background: #2d3a4d;
    box-shadow: 0 1px 3px rgba(0, 102, 204, 0.2);
}
body.dark-mode .table-view tr.search-highlight {
    background: #4a3d1f !important;
    border-color: #ffc107;
}
body.dark-mode .table-view tr.search-highlight:hover {
    background: #5a4d2f !important;
}
body.dark-mode .json-string {
    color: #6bb6ff;
}
body.dark-mode .json-number {
    color: #9d7fff;
}
body.dark-mode .json-boolean {
    color: #4fc3f7;
}
body.dark-mode .json-null {
    color: #999;
}
body.dark-mode .json-bracket {
    color: #e0e0e0;
}
body.dark-mode .resizer {
    background: #404040;
}
body.dark-mode .resizer:hover,
body.dark-mode .resizer.active {
    background: #0066cc;
}
body.dark-mode .viewer-guidance {
    background: #2d2d2d;
    border-color: #404040;
    color: #b0b0b0;
}
body.dark-mode .viewer-guidance h3 {
    color: #e0e0e0;
}
body.dark-mode .viewer-guidance.invalid {
    background: #3d1f1f;
    border-color: #dc3545;
    color: #f8d7da;
}
body.dark-mode .viewer-guidance.invalid h3,
body.dark-mode .viewer-guidance.invalid p {
    color: #f8d7da;
}
body.dark-mode .viewer-prompt {
    background: #1e3a5f;
    border-left-color: #0066cc;
}
body.dark-mode .viewer-prompt span {
    color: #b3d9ff;
}
body.dark-mode .top-message.success {
    background: #1e4620;
    color: #90ee90;
    border-left-color: #28a745;
}
body.dark-mode .top-message.error {
    background: #3d1f1f;
    color: #ffb3b3;
    border-left-color: #dc3545;
}
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}
body.dark-mode .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}
body.dark-mode .modal-close {
    background: #404040;
    color: #e0e0e0;
}
body.dark-mode .modal-close:hover {
    background: #555;
}
body.dark-mode .modal-buttons button {
    background: #0066cc;
    color: white;
}
body.dark-mode .modal-buttons button:hover {
    background: #0052a3;
}
body.dark-mode input[type="text"] {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}
body.dark-mode input[type="text"]:focus {
    border-color: #0066cc;
}
body.dark-mode textarea {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}
body.dark-mode textarea:focus {
    border-color: #0066cc;
}
body.dark-mode .search-bar {
    background: linear-gradient(to bottom, #2d2d2d 0%, #1a1a1a 100%);
    border-color: #404040;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}
body.dark-mode .search-bar label {
    color: #e0e0e0;
}
body.dark-mode .search-bar input {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}
body.dark-mode .search-bar input:focus {
    background: #252525;
    border-color: #0066cc;
}
body.dark-mode .search-nav a {
    color: #6bb6ff;
}
body.dark-mode .search-nav a:hover {
    background: #2d3a4d;
    border-color: #0066cc;
}
body.dark-mode .search-bar button {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
}
body.dark-mode .search-bar button:hover {
    background: linear-gradient(135deg, #0052a3 0%, #004080 100%);
}
body.dark-mode footer {
    background: #2d2d2d;
    color: #b0b0b0;
    border-top-color: #404040;
}

/* Publisher Content Section (Above the Fold for AdSense) */
.publisher-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.publisher-content h1 {
    color: #0066cc;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
}

.publisher-content h2 {
    color: #0066cc;
    font-size: 22px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
}

.publisher-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 15px;
}

.publisher-content ul {
    margin: 15px 0 20px 30px;
    padding: 0;
}

.publisher-content ul li {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 10px;
}

body.dark-mode .publisher-content {
    background: #1a1a1a;
    border-bottom-color: #404040;
}

body.dark-mode .publisher-content h1,
body.dark-mode .publisher-content h2 {
    color: #6bb6ff;
}

body.dark-mode .publisher-content p,
body.dark-mode .publisher-content ul li {
    color: #e0e0e0;
}

@media (max-width: 768px) {
    .publisher-content {
        padding: 20px 15px;
    }
    
    .publisher-content h1 {
        font-size: 24px;
    }
    
    .publisher-content h2 {
        font-size: 20px;
    }
    
    .publisher-content p,
    .publisher-content ul li {
        font-size: 14px;
    }
}

/* Tool CTA Section */
.tool-cta {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
    text-align: center;
    background: #f0f7ff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.tool-cta p {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.tool-cta p strong {
    color: #0066cc;
    font-weight: 600;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.cta-button:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}

body.dark-mode .tool-cta {
    background: #1a2332;
    border-top-color: #404040;
    border-bottom-color: #404040;
}

body.dark-mode .tool-cta p {
    color: #e0e0e0;
}

body.dark-mode .tool-cta p strong {
    color: #6bb6ff;
}

body.dark-mode .cta-button {
    background: #0066cc;
}

body.dark-mode .cta-button:hover {
    background: #0052a3;
}

@media (max-width: 768px) {
    .tool-cta {
        padding: 20px 15px;
    }
    
    .tool-cta p {
        font-size: 15px;
    }
    
    .cta-button {
        padding: 10px 24px;
        font-size: 15px;
    }
}

/* SEO Content Section */
.seo-content-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.seo-content-section h2 {
    color: #0066cc;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.seo-intro {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.seo-feature {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.seo-feature h3 {
    color: #0066cc;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.seo-feature p {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.seo-use-cases {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.seo-use-cases h3 {
    color: #0066cc;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.seo-use-cases p {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.use-case-item {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.use-case-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.15);
}

.use-case-item h4 {
    color: #0066cc;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.use-case-item p {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

body.dark-mode .seo-content-section {
    background: #1a1a1a;
    border-top-color: #404040;
}

body.dark-mode .seo-content-section h2 {
    color: #6bb6ff;
}

body.dark-mode .seo-intro {
    color: #e0e0e0;
}

body.dark-mode .seo-feature {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .seo-feature h3 {
    color: #6bb6ff;
}

body.dark-mode .seo-feature p {
    color: #b0b0b0;
}

body.dark-mode .seo-use-cases {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .seo-use-cases h3 {
    color: #6bb6ff;
}

body.dark-mode .seo-use-cases p {
    color: #b0b0b0;
}

body.dark-mode .use-case-item {
    background: #2d2d2d;
    border-left-color: #0066cc;
}

body.dark-mode .use-case-item h4 {
    color: #6bb6ff;
}

body.dark-mode .use-case-item p {
    color: #b0b0b0;
}

@media (max-width: 768px) {
    .seo-content-section {
        padding: 30px 15px;
    }
    
    .seo-content-section h2 {
        font-size: 20px;
    }
    
    .seo-intro {
        font-size: 14px;
    }
    
    .seo-features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .seo-feature {
        padding: 15px;
    }
    
    .seo-use-cases {
        padding: 20px;
    }
}

/* Mobile Dark Mode Toggle in Footer */
.dark-mode-toggle-mobile {
    display: none;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    /* padding: 10px 20px; */
    cursor: pointer;
    font-size: 12px;
    color: white;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    /* margin: 15px auto 0; */
    justify-content: center;
}
.dark-mode-toggle-mobile:hover {
    background: linear-gradient(135deg, #0052a3 0%, #0066cc 100%);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.dark-mode-toggle-mobile:active {
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}
.dark-mode-toggle-mobile .icon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: brightness(1.2);
}
.dark-mode-toggle-mobile #darkModeTextMobile {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}
/* Show mobile button on mobile devices */
@media (max-width: 768px) {
    .dark-mode-toggle-mobile {
        display: flex;
    }
    header {
        padding-right: 30px;
    }
    header h1 {
        max-width: 100%;
    }
    header p {
        max-width: 100%;
    }
}
body.dark-mode .dark-mode-toggle-mobile {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    /* border: 2px solid rgba(255, 255, 255, 0.3); */
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}
body.dark-mode .dark-mode-toggle-mobile:hover {
    background: linear-gradient(135deg, #0052a3 0%, #0066cc 100%);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Footer Styles */
footer {
    margin-top: 30px;
    border-top: 1px solid #e5e7eb;
    color: #666;
    font-size: 12px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: left;
}

.footer-section h3 {
    color: #0066cc;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-section h4 {
    color: #333;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-section p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #666;
}

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

.footer-section ul li {
    padding: 4px 0;
    color: #666;
    line-height: 1.5;
}

.footer-section ul li:before {
    content: "✓ ";
    color: #0066cc;
    font-weight: bold;
    margin-right: 6px;
}

.footer-tools-links {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-tools-links a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    line-height: 1.6;
}

.footer-tools-links a:hover {
    color: #0052a3;
    text-decoration: underline;
}

body.dark-mode .footer-tools-links a {
    color: #6bb6ff;
}

body.dark-mode .footer-tools-links a:hover {
    color: #8cc8ff;
}

.footer-keywords {
    font-size: 11px;
    line-height: 1.8;
    color: #666;
}
.privacy-note {
    font-size: 12px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}
.privacy-note strong {
    color: #0066cc;
    font-weight: 600;
}
body.dark-mode .privacy-note {
    color: #b0b0b0;
}
body.dark-mode .privacy-note strong {
    color: #6bb6ff;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.footer-bottom p {
    margin: 0 0 15px 0;
}
.footer-bottom > div:last-child {
    display: none !important;
}

/* Override: Ensure footer-links are always visible */
.footer-bottom > div.footer-links {
    display: flex !important;
}

/* Footer Tools/Features Links */
.footer-tools {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}
.footer-tools a {
    color: #0066cc !important;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
}
.footer-tools a:hover {
    color: #0052a3 !important;
    text-decoration: underline;
}
body.dark-mode .footer-tools a {
    color: #6bb6ff;
}
body.dark-mode .footer-tools a:hover {
    color: #8cc8ff;
}

/* Footer Legal/Info Links */
.footer-links {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 12px;
    flex-wrap: wrap;
}
.footer-links a {
    color: #0066cc !important;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.footer-links a:hover {
    color: #0052a3 !important;
    text-decoration: underline;
}
.footer-separator {
    color: #999;
    margin: 0 4px;
}
body.dark-mode .footer-links a {
    color: #6bb6ff;
}
body.dark-mode .footer-links a:hover {
    color: #8cc8ff;
}
body.dark-mode .footer-separator {
    color: #666;
}

body.dark-mode footer {
    border-top-color: #404040;
    background: #1a1a1a;
}

body.dark-mode .footer-content {
    background: #1a1a1a;
}

body.dark-mode .footer-section h3 {
    color: #6bb6ff;
}

body.dark-mode .footer-section h4 {
    color: #e0e0e0;
}

body.dark-mode .footer-section p,
body.dark-mode .footer-section ul li {
    color: #b0b0b0;
}

body.dark-mode .footer-section ul li:before {
    color: #6bb6ff;
}

body.dark-mode .footer-keywords {
    color: #b0b0b0;
}

body.dark-mode .footer-bottom {
    background: #252525;
    border-top-color: #404040;
}

/* Legal Pages Styles */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 30px;
    line-height: 1.8;
    color: #333;
}

.legal-content h2 {
    color: #0066cc;
    font-size: 22px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal-content h2:first-of-type {
    margin-top: 20px;
}

.legal-content h3 {
    color: #0066cc;
    font-size: 22px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal-content p {
    margin-bottom: 15px;
    font-size: 15px;
}

.legal-content ul {
    margin: 15px 0 15px 30px;
    padding: 0;
}

.legal-content ul li {
    margin-bottom: 8px;
    font-size: 15px;
}

.legal-content strong {
    color: #0066cc;
    font-weight: 600;
}

.back-link {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.back-link a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.back-link a:hover {
    color: #0052a3;
    text-decoration: underline;
}

body.dark-mode .legal-content {
    color: #e0e0e0;
}

body.dark-mode .legal-content h2 {
    color: #6bb6ff;
}

body.dark-mode .legal-content h3 {
    color: #6bb6ff;
}

body.dark-mode .legal-content strong {
    color: #6bb6ff;
}

body.dark-mode .back-link {
    border-top-color: #404040;
}

body.dark-mode .back-link a {
    color: #6bb6ff;
}

body.dark-mode .back-link a:hover {
    color: #8cc8ff;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 30px 20px;
    }
    
    .legal-content h2 {
        font-size: 20px;
    }
    
    .legal-content p,
    .legal-content ul li {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section ul {
        text-align: left;
        display: inline-block;
    }
    
    .footer-bottom > div:last-child {
        display: flex !important;
    }
    
    /* Override: Ensure footer-links are always visible on mobile */
    .footer-bottom > div.footer-links {
        display: flex !important;
    }
}
