/* CSS Custom Properties for theming */
:root {
    /* Dark theme colors */
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d30;
    --bg-tertiary: #3c3c3c;
    --bg-hover: #4a4a4a;
    --bg-active: #5a5a5a;
    
    --text-primary: #d4d4d4;
    --text-secondary: #858585;
    --text-muted: #6a6a6a;
    
    --border-primary: #3e3e42;
    --border-secondary: #5a5a5a;
    --border-hover: #6a6a6a;
    
    --accent-primary: #9cdcfe;
    --accent-secondary: #6a6a6a;
    --accent-hover: #7a7a7a;
    
    --syntax-key: #9cdcfe;
    --syntax-string: #ce9178;
    --syntax-number: #b5cea8;
    --syntax-boolean: #569cd6;
    --syntax-null: #569cd6;
    --syntax-object: #858585;
    --syntax-array: #858585;
    
    --error-bg: #6a1b1b;
    --error-border: #f48771;
    --error-text: #f48771;
    
    --success-bg: #1e3a1e;
    --success-border: #4a7c4a;
    --success-text: #4a7c4a;
    
    --selection-bg: #094771;
    --modal-overlay: rgba(0, 0, 0, 0.7);
}

/* Light theme colors */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f0f0f0;
    --bg-tertiary: #e8e8e8;
    --bg-hover: #e0e0e0;
    --bg-active: #d0d0d0;
    
    --text-primary: #1e1e1e;
    --text-secondary: #6a6a6a;
    --text-muted: #858585;
    
    --border-primary: #d4d4d4;
    --border-secondary: #b4b4b4;
    --border-hover: #9e9e9e;
    
    --accent-primary: #0066cc;
    --accent-secondary: #4a4a4a;
    --accent-hover: #5a5a5a;
    
    --syntax-key: #0066cc;
    --syntax-string: #d73a49;
    --syntax-number: #005cc5;
    --syntax-boolean: #28a745;
    --syntax-null: #005cc5;
    --syntax-object: #6a6a6a;
    --syntax-array: #6a6a6a;
    
    --error-bg: #ffeaea;
    --error-border: #d73a49;
    --error-text: #d73a49;
    
    --success-bg: #e6ffed;
    --success-border: #28a745;
    --success-text: #28a745;
    
    --selection-bg: #b3d4fc;
    --modal-overlay: rgba(0, 0, 0, 0.3);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 16px;
    line-height: 1.5;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* SEO Header Styles - Hidden but accessible for SEO */
.seo-header {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
}

.seo-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.seo-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
}

/* SEO Footer Styles - Hidden but accessible for SEO */
.seo-footer {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: 40px 20px;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content h2 {
    font-size: 1.8rem;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

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

.feature {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature h3 {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

.footer-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
    border-top: 1px solid var(--border-primary);
    padding-top: 20px;
    margin-top: 20px;
}

/* Responsive adjustments for SEO elements */
@media (max-width: 768px) {
    .seo-header h1 {
        font-size: 1.8rem;
    }
    
    .seo-subtitle {
        font-size: 1rem;
    }
    
    .footer-content h2 {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature {
        padding: 20px;
    }
    
    .feature h3 {
        font-size: 1.2rem;
    }
}

/* Tabs */
.tabs {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 0 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tab-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tab-buttons {
    display: flex;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

/* Theme toggle and About button styling to match the theme */
#themeToggleBtn,
#aboutBtn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#themeToggleBtn {
    font-size: 16px;
    padding: 8px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

#themeToggleBtn:hover {
    color: var(--text-primary);
}

#aboutBtn {
    font-size: 12px;
    padding: 8px 16px;
    min-width: auto;
}

#themeToggleBtn:hover,
#aboutBtn:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

#themeToggleBtn:active,
#aboutBtn:active {
    background: var(--bg-active);
}

/* Buy Me a Coffee button styling to match other buttons */
.tab-actions a[href*="buymeacoffee"] {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
}

.tab-actions a[href*="buymeacoffee"] img {
    height: 36px !important;
    width: auto !important;
    display: block;
}

.tab-btn:hover {
    background: var(--bg-tertiary);
}

.tab-btn.active {
    border-bottom-color: var(--accent-primary);
    color: var(--text-primary);
    font-weight: 600;
}

/* Main content */
.main-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.tab-content {
    display: none;
    height: 100%;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Viewer layout */
.viewer-layout {
    display: flex;
    position: relative;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.tree-panel {
    width: 65%;
    min-width: 300px;
    max-width: 85%;
    height: 100%;
    overflow: auto;
    background: var(--bg-primary);
    flex-shrink: 0;
    transition: width 0.1s ease, background-color 0.3s ease;
}

.resizer {
    width: 6px;
    background: var(--border-primary);
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
    margin: 0 -1px;
    user-select: none;
}

.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 20px;
    background: var(--border-secondary);
    border-radius: 1px;
}

.resizer:hover {
    background: var(--accent-secondary);
    box-shadow: 0 0 0 1px var(--accent-secondary);
}

.resizer:hover::before {
    background: var(--text-primary);
}

.resizer.dragging {
    background: var(--accent-secondary);
    box-shadow: 0 0 0 1px var(--accent-secondary);
}

.resizer.dragging::before {
    background: var(--text-primary);
}

.details-panel {
    flex: 1;
    min-width: 350px;
    height: 100%;
    overflow: auto;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

/* JSON Tree */
.json-tree {
    padding: 12px 12px 24px 12px;
    font-size: 11px;
    line-height: 1.4;
}

.tree-node {
    margin: 2px 0;
    cursor: pointer;
    user-select: none;
}

.tree-node:hover {
    background: var(--bg-primary);
}

.tree-node.selected {
    background: var(--bg-secondary);
    border-radius: 2px;
    position: relative;
}

.tree-node.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-secondary);
    border-radius: 2px 0 0 2px;
}

.tree-toggle {
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    margin-right: 4px;
    font-weight: bold;
    color: var(--text-secondary);
}

.tree-toggle.expanded::before {
    content: '-';
}

.tree-toggle.collapsed::before {
    content: '+';
}

.tree-toggle.leaf {
    visibility: hidden;
    width: 16px;
}

.tree-key {
    color: var(--syntax-key);
    font-weight: 600;
}

.tree-value {
    color: var(--text-primary);
    margin-left: 4px;
}

.tree-value.string {
    color: var(--syntax-string);
}

.tree-value.number {
    color: var(--syntax-number);
}

.tree-value.boolean {
    color: var(--syntax-boolean);
}

.tree-value.null {
    color: var(--syntax-null);
}

.tree-value.object {
    color: var(--syntax-object);
    font-style: italic;
    font-size: 11px;
}

.tree-value.array {
    color: var(--syntax-array);
    font-style: italic;
    font-size: 11px;
}

.tree-child {
    margin-left: 20px;
}

/* Node details */
.node-details {
    padding: 16px 16px 32px 16px;
    background: var(--bg-secondary);
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

.node-details .placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-top: 20px;
    font-size: 10px;
}

.node-details-title {
    color: var(--syntax-key);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-primary);
}

.detail-field {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    position: relative;
    transition: background-color 0.3s ease;
}

.detail-key {
    color: var(--syntax-key);
    font-weight: 500;
    font-size: 11px;
    margin-right: 8px;
    flex-shrink: 0;
    width: 180px; /* Increased width to prevent text overlapping */
}

.detail-value {
    flex: 1;
    color: var(--syntax-string);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    margin-right: 8px;
    min-width: 0;
}

.detail-value.string {
    color: var(--syntax-string);
}

.detail-value.number {
    color: var(--syntax-number);
}

.detail-value.boolean {
    color: var(--syntax-boolean);
}

.detail-value.null {
    color: var(--syntax-null);
}

.detail-value.object {
    color: var(--syntax-object);
    font-style: italic;
}

.detail-value.array {
    color: var(--syntax-array);
    font-style: italic;
}

.copy-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.copy-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.copy-btn:active {
    background: var(--bg-active);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Legacy styles for backward compatibility */
.detail-row {
    display: flex;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.detail-label {
    font-weight: 600;
    color: var(--syntax-key);
    width: 80px;
    flex-shrink: 0;
}

/* Text view */
.text-actions {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 4px 8px;
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Viewer actions */
.viewer-actions {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 4px 8px;
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 10;
}

.text-actions button,
.viewer-actions button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 3px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-actions button:hover,
.viewer-actions button:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.text-actions button:active,
.viewer-actions button:active {
    background: var(--bg-active);
}

.text-container {
    flex: 1;
    overflow: hidden;
    padding: 16px;
    position: relative;
    display: flex;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.line-numbers {
    font-family: inherit;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    padding: 0 6px;
    text-align: right;
    user-select: none;
    flex-shrink: 0;
    /* Let JS determine width based on number of lines; fall back to content width */
    width: max-content;
    min-width: 3ch;
    /* Must not be 'visible' vertically, otherwise scrollTop has no effect */
    overflow-y: hidden;
    overflow-x: visible;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.line-number {
    padding: 0 1px;
    border-radius: 1px;
    transition: background-color 0.2s ease;
}

.line-number.error {
    background: var(--error-bg);
    color: var(--error-text);
    font-weight: 500;
}

.json-textarea {
    font-family: inherit;
    font-size: 11px;
    line-height: 1.4;
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text-primary);
    padding: 0 0 0 4px;
    margin: 0;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    caret-color: var(--text-primary);
    transition: color 0.3s ease;
}

.json-textarea:focus {
    background: transparent;
}

.json-text {
    display: none;
}

/* Drag & drop visual affordance (removed in revert) */

/* Selection styling */
.json-textarea::selection {
    background: var(--selection-bg);
    color: var(--text-primary);
}

.json-textarea::-moz-selection {
    background: var(--selection-bg);
    color: var(--text-primary);
}

/* Error styling for dark theme */
.json-error {
    background: var(--error-bg);
    border-bottom: 2px solid var(--error-border);
    color: var(--error-text);
}

.json-error-line {
    background: var(--error-bg);
    border-left: 2px solid var(--error-border);
    padding-left: 4px;
}

.json-error-char {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 0 1px;
    border-radius: 1px;
    border-bottom: 1px solid var(--error-border);
}

.json-error-marker {
    background: var(--error-text);
    color: var(--bg-primary);
    padding: 0 1px;
    border-radius: 1px;
    font-weight: bold;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow: auto;
    border: 1px solid var(--border-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-primary);
    transition: border-color 0.3s ease;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.modal-body li {
    margin-bottom: 4px;
}

/* About Modal Specific Styles */


.modal-body h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Contact link styling */
.contact-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.contact-link:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent-primary);
    text-decoration: none;
}

.contact-link:active {
    background-color: var(--bg-active);
    transform: translateY(1px);
}

/* About section formatting */
.about-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-secondary);
}

.about-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.about-intro {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.about-intro:last-child {
    margin-bottom: 0;
}

.privacy-list {
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 12px 0;
    border-left: 3px solid var(--accent-primary);
}

.privacy-list li {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary);
}

.privacy-list li:last-child {
    margin-bottom: 0;
}

/* Enhanced modal body spacing */
.modal-body {
    padding: 24px 28px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.modal-body p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-body h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-secondary);
    padding-bottom: 10px;
}

.modal-body h3:first-child {
    margin-top: 0;
}



/* Fullscreen mode - ensure toolbar is always visible */
@media (display-mode: fullscreen) {
    .tabs {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-primary);
    }
    
    .main-content {
        height: calc(100vh - 60px); /* Adjust for toolbar height */
    }
}

/* Webkit fullscreen support */
@media (-webkit-full-screen) {
    .tabs {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-primary);
    }
    
    .main-content {
        height: calc(100vh - 60px);
    }
}

/* URL Modal Styles */
.url-input-group {
    margin-bottom: 20px;
}

.url-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.url-input-group input {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.url-input-group input:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 2px rgba(106, 106, 106, 0.2);
}

.url-input-group input::placeholder {
    color: var(--text-secondary);
}

.url-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.url-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-secondary);
}

.url-actions .primary-btn {
    background: var(--accent-secondary);
    color: #ffffff;
    border-color: var(--accent-secondary);
}

.url-actions .primary-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.url-actions button:not(.primary-btn) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.url-actions button:not(.primary-btn):hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.url-status {
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 12px;
}

.url-status.success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.url-status.error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.url-status.warning {
    background: var(--warning-bg, #4a1b1b);
    border: 1px solid var(--warning-border, #f48771);
    color: var(--warning-text, #f48771);
}

.url-status.loading {
    background: transparent;
    border: none;
    color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top: 2px solid var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom scrollbar styling */
.json-textarea::-webkit-scrollbar {
    width: 12px;
}

.json-textarea::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
}

.json-textarea::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

.json-textarea::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.json-textarea::-webkit-scrollbar-thumb:active {
    background: var(--accent-secondary);
}

/* Firefox scrollbar styling */
.json-textarea {
    scrollbar-width: thin;
    scrollbar-color: var(--border-secondary) var(--bg-secondary);
}

/* Scrollbar styling for tree panel and details panel */
.tree-panel::-webkit-scrollbar,
.details-panel::-webkit-scrollbar,
.node-details::-webkit-scrollbar {
    width: 16px;
    -webkit-appearance: none;
}

.tree-panel::-webkit-scrollbar-track,
.details-panel::-webkit-scrollbar-track,
.node-details::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
}

.tree-panel::-webkit-scrollbar-thumb,
.details-panel::-webkit-scrollbar-thumb,
.node-details::-webkit-scrollbar-thumb {
    background: var(--accent-secondary);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

.tree-panel::-webkit-scrollbar-thumb:hover,
.details-panel::-webkit-scrollbar-thumb:hover,
.node-details::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.tree-panel::-webkit-scrollbar-thumb:active,
.details-panel::-webkit-scrollbar-thumb:active,
.node-details::-webkit-scrollbar-thumb:active {
    background: var(--accent-secondary);
}

.tree-panel,
.details-panel,
.node-details {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-secondary) var(--bg-secondary);
    /* Force scrollbar to be visible */
    overflow-y: scroll;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .viewer-layout {
        flex-direction: column;
    }
    
    .tree-panel,
    .details-panel {
        width: 100%;
    }
    
    .tree-panel {
        height: 40%;
        border-right: none;
        border-bottom: 1px solid var(--border-primary);
    }
    
    .details-panel {
        height: 60%;
    }
    
    .tabs {
        flex-direction: column;
        gap: 8px;
        padding: 8px 12px;
    }
    
    .text-actions {
        flex-wrap: wrap;
    }
    
    .text-actions button {
        flex: 1;
        min-width: 80px;
    }
} 