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

:root {
    --bg-primary: #0D0D0D;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --text-primary: #ffffff;
    --text-muted: #9ca3af;
    --text-secondary: #d1d5db;
    --accent-blue: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #333333;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #e5e7eb;
    --text-primary: #1f2937;
    --text-muted: #6b7280;
    --text-secondary: #374151;
    --accent-blue: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #d1d5db;
    --success-color: #059669;
    --error-color: #dc2626;
    --warning-color: #d97706;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    overflow-y: auto !important;
    height: auto !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.feature-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.logo-icon {
    width: 48px;
    height: 48px;
    animation: float 3s ease-in-out infinite;
}

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

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: inline-block;
    white-space: nowrap;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 32px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--accent-blue);
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--accent-blue);
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(28px);
}

/* Main Layout */
.main-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem 20px;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 6rem;
    height: fit-content;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-blue);
}

.tool-list {
    list-style: none;
}

.tool-list li {
    margin-bottom: 0.25rem;
}

.tool-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.tool-list a:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
    border-left-color: var(--accent-blue);
}

.tool-list a.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-hover));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

/* Main Content */
.main-content {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tool-content {
    display: none;
}

.tool-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    margin-bottom: 2rem;
}

.tool-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Editor */
.editor-wrapper {
    margin-bottom: 1.5rem;
}

.json-editor {
    width: 100%;
    min-height: 400px;
    padding: 1.25rem;
    background-color: var(--bg-tertiary);
    border: 2px solid rgba(99, 120, 160, 0.45);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: text;
}

.json-editor:hover {
    border-color: rgba(99, 130, 200, 0.7);
}

.json-editor:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.json-editor::placeholder {
    color: rgba(156, 163, 175, 0.6);
    font-style: italic;
}

.json-editor.small {
    min-height: 300px;
}

.json-editor::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-hover));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

.btn-secondary:active {
    transform: translateY(0);
}

/* Result Area */
.result-area {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 100px;
    max-height: 600px;
    overflow: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.result-area:empty::before {
    content: 'Results will appear here...';
    color: var(--text-muted);
}

.result-area.success {
    border-color: var(--success-color);
}

.result-area.error {
    border-color: var(--error-color);
}

.result-area pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    color: var(--text-muted);
    margin: 0;
}

/* JSON Syntax Highlighting */
.json-key {
    color: #0066cc;
    font-weight: 500;
}

.json-string {
    color: #22863a;
}

.json-number {
    color: #005cc5;
}

.json-boolean {
    color: #d73a49;
    font-weight: 500;
}

.json-null {
    color: #6f42c1;
    font-weight: 500;
}

/* Dark theme syntax highlighting */
[data-theme="dark"] .json-key {
    color: #79b8ff;
}

[data-theme="dark"] .json-string {
    color: #9ecbff;
}

[data-theme="dark"] .json-number {
    color: #79b8ff;
}

[data-theme="dark"] .json-boolean {
    color: #ffab70;
}

[data-theme="dark"] .json-null {
    color: #f97583;
}

/* Copy button for outputs */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.copy-output-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-output-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.export-buttons .copy-output-btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
}

/* Real-time Validation Status */
.validation-status {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.validation-status.valid {
    display: flex;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.validation-status.invalid {
    display: flex;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.validation-status-icon {
    font-size: 1rem;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.success-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInDown 0.3s ease;
}

.success-icon {
    display: inline-block;
    animation: checkmark 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance Badge */
.perf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
}

/* Quick Actions Toolbar */
.quick-actions-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    user-select: none;
}

.quick-action:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.quick-action:hover .quick-action-icon,
.quick-action:hover .quick-action-label {
    color: white;
}

.quick-action:active {
    transform: translateY(0);
}

.quick-action-icon {
    font-size: 1.25rem;
}

.quick-action-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .quick-action {
        min-width: 50px;
        padding: 0.75rem 0.5rem;
    }

    .quick-action-label {
        display: none;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        top: 0;
        margin-bottom: 1.5rem;
    }

    .sidebar-section h3 {
        font-size: 0.8rem;
    }

    .tool-list a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .hero-section h2 {
        font-size: 1.25rem;
    }

    .hero-section p {
        font-size: 0.875rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .quick-actions-toolbar {
        padding: 0.75rem;
        gap: 0.375rem;
    }
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
}

[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(-12px);
}

/* Keyboard Shortcuts Modal */
.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.shortcut-section h3 {
    color: var(--accent-blue);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.shortcut-item:hover {
    background: var(--bg-primary);
    transform: translateX(4px);
}

.shortcut-item kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    box-shadow: 0 2px 0 var(--border-color);
    margin: 0 0.25rem;
}

.shortcut-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
    text-align: right;
}

/* Fullscreen Mode */
.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: var(--bg-primary);
}

.fullscreen-mode .sidebar {
    display: none;
}

.fullscreen-mode .hero-section,
.fullscreen-mode header,
.fullscreen-mode .ad-container {
    display: none;
}

.fullscreen-mode .main-content {
    width: 100%;
    max-width: 100%;
    padding: 2rem;
}

.fullscreen-mode .editor-wrapper {
    height: calc(100vh - 300px);
}

.fullscreen-exit-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.fullscreen-exit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Enhanced Stats Display */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    font-family: 'Monaco', 'Menlo', monospace;
}

.stat-value.fast {
    color: var(--success-color);
}

.stat-value.large {
    color: #f59e0b;
}

/* Complexity Warnings */
.complexity-warnings {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    animation: slideInDown 0.3s ease;
}

.complexity-warnings h4 {
    margin: 0 0 0.75rem 0;
    color: #f59e0b;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.complexity-warnings ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.complexity-warnings li {
    margin: 0.5rem 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Tree View */
.tree-toggle {
    cursor: pointer;
    user-select: none;
    color: var(--accent-blue);
    font-weight: bold;
    margin-right: 0.25rem;
    display: inline-block;
    width: 1rem;
    transition: transform 0.2s ease;
}

.tree-toggle:hover {
    transform: scale(1.2);
}

.tree-children {
    margin-left: 1.5rem;
    border-left: 1px dashed var(--border-color);
    padding-left: 0.75rem;
    margin-top: 0.25rem;
}

.json-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-left: 0.5rem;
}

.json-bracket {
    color: var(--text-muted);
    font-weight: bold;
}

/* View Toggle Buttons */
.view-toggle-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.view-toggle-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.json-view {
    transition: opacity 0.3s ease;
}

/* Format Options */
.format-options-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Inline Path Tester */
.inline-path-tester {
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.path-tester-header {
    padding: 1rem;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.path-tester-header:hover {
    background: var(--bg-tertiary);
}

.toggle-icon {
    color: var(--accent-blue);
    font-weight: bold;
    transition: transform 0.2s ease;
}

.path-tester-content {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

#pathTestResult pre {
    margin: 0;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 4px;
}

/* Compression Comparison */
.compression-comparison {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.compression-comparison h4 {
    margin: 0 0 1rem 0;
    color: var(--accent-blue);
    font-size: 0.95rem;
    font-weight: 600;
}

.compression-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compression-bar {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    align-items: center;
}

.bar-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.bar-wrapper {
    position: relative;
    background: var(--bg-primary);
    border-radius: 20px;
    height: 28px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bar-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 20px;
    opacity: 0.8;
}

.bar-value {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Lint Results */
.lint-results {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid #8b5cf6;
    border-left: 4px solid #8b5cf6;
    border-radius: 8px;
}

.lint-results h4 {
    margin: 0 0 1rem 0;
    color: #8b5cf6;
    font-size: 0.95rem;
    font-weight: 600;
}

.lint-section {
    margin-bottom: 1rem;
}

.lint-section:last-child {
    margin-bottom: 0;
}

.lint-section strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.lint-section ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.lint-section li {
    margin: 0.375rem 0;
    line-height: 1.6;
    font-size: 0.85rem;
}

.lint-section code {
    background: var(--bg-primary);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: #8b5cf6;
}

/* History Panel */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
    transform: translateX(4px);
}

.history-preview {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Data Pattern Badge */
.data-pattern-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-blue);
    cursor: help;
    transition: all 0.2s ease;
}

.data-pattern-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
}

/* Dropdown Menu */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 160px;
    overflow: hidden;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.dropdown-item:hover {
    background: var(--accent-blue);
    color: white;
}

.dropdown-item:active {
    background: var(--accent-hover);
}

/* Success Button */
.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

/* Usage Stats Badge */
.usage-stats-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success-color);
    cursor: help;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .usage-stats-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Bookmarks */
.bookmarks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
}

.bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.bookmark-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.bookmark-main {
    flex: 1;
    cursor: pointer;
}

.bookmark-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.bookmark-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.bookmark-delete {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bookmark-delete:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

/* Generic Tool Split Layout */
.tool-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.tool-split-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tool-split-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.tool-split-right > *,
.tool-split-right .result-area {
    margin-top: 0 !important;
}

.split-result-panel {
    flex: 1;
    min-height: 400px;
    margin-top: 0 !important;
    overflow-y: auto;
}

.tool-split-left .json-editor {
    flex: 1;
    min-height: 350px;
    resize: vertical;
}

@media (max-width: 768px) {
    .tool-split-container {
        grid-template-columns: 1fr;
    }
}

/* JWT Split Layout */
.jwt-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.jwt-split-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jwt-split-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Override all result-area margin inside jwt split */
.jwt-split-right .result-area,
.jwt-split-right > * {
    margin-top: 0 !important;
}

.jwt-input {
    flex: 1;
    min-height: 380px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.jwt-result-panel {
    flex: 1;
    min-height: 480px;
    margin-top: 0 !important;
    overflow-y: auto;
}

/* JWT result sections */
.jwt-section {
    margin-bottom: 1.25rem;
}

.jwt-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jwt-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.jwt-badge-alg { background: rgba(99,102,241,0.2); color: #818cf8; }
.jwt-badge-valid { background: rgba(34,197,94,0.15); color: #4ade80; }
.jwt-badge-expired { background: rgba(239,68,68,0.15); color: #f87171; }

.jwt-section pre {
    margin: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
}

.jwt-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--border-color);
    font-style: italic;
}

.jwt-timestamp {
    border-bottom: 1px dashed rgba(251,146,60,0.6);
    cursor: help;
}

/* Instant custom tooltip */
#jwtTip {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 12px;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
}

/* Claim name tooltip */
.jwt-claim-key {
    border-bottom: 1px dotted rgba(192,132,252,0.6);
    cursor: help;
    color: #c084fc;
}

/* JSON syntax highlighting in JWT pre blocks */
.jh-key  { color: #c084fc; }
.jh-str  { color: #86efac; }
.jh-num  { color: #fb923c; }
.jh-bool { color: #60a5fa; }
.jh-null { color: #94a3b8; }

/* Color-coded token visualization */
.jwt-token-viz {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    word-break: break-all;
    padding: 0.6rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.jwt-part-h  { color: #f472b6; }
.jwt-part-p  { color: #60a5fa; }
.jwt-part-s  { color: #a3e635; }
.jwt-dot     { color: var(--text-muted); }

/* Secret key input */
.jwt-secret-row {
    margin-top: 0.75rem;
}

.jwt-secret-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.875rem;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', monospace;
    outline: none;
    transition: border-color 0.15s;
}

.jwt-secret-input:focus {
    border-color: var(--accent-color);
}

.jwt-secret-input::placeholder {
    color: var(--text-muted);
}

/* Expiry banner */
.jwt-expiry-banner {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.jwt-banner-valid   { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.jwt-banner-expired { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* Copy button in section header */
.jwt-copy-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.15s;
}

.jwt-copy-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Signature verification result */
.jwt-verify-ok   { font-size: 0.85rem; color: #4ade80; font-weight: 600; padding: 0.5rem 0; }
.jwt-verify-fail { font-size: 0.85rem; color: #f87171; font-weight: 600; padding: 0.5rem 0; }

/* Section label with copy button flex */
.jwt-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Diff Container */
.diff-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.diff-column h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* Tree View */
.tree-view {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
}

.tree-item {
    margin-left: 20px;
    position: relative;
}

.tree-key {
    color: #818cf8;
    font-weight: 600;
}

.tree-value {
    color: var(--text-primary);
}

.tree-string {
    color: #34d399;
}

.tree-number {
    color: #60a5fa;
}

.tree-boolean {
    color: #f59e0b;
}

.tree-null {
    color: var(--text-muted);
}

.tree-toggle {
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
    margin-right: 5px;
    display: inline-block;
    width: 12px;
}

.tree-toggle:hover {
    color: var(--accent-blue);
}

.tree-children {
    margin-left: 15px;
}

.tree-collapsed {
    display: none;
}

/* Diff Results */
.diff-added {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success-color);
    padding: 4px 8px;
    margin: 2px 0;
    display: block;
}

.diff-removed {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--error-color);
    padding: 4px 8px;
    margin: 2px 0;
    display: block;
}

.diff-modified {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning-color);
    padding: 4px 8px;
    margin: 2px 0;
    display: block;
}

/* Inline JSON Diff View */
.diff-inline-view {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    border-radius: 6px;
    overflow-x: auto;
    margin-top: 0.5rem;
}

.diff-inline-line {
    display: block;
    white-space: pre;
    padding: 1px 12px;
    min-height: 1.4em;
    color: var(--text-primary);
}

.diff-inline-line.diff-inline-added {
    background-color: rgba(16, 185, 129, 0.15);
    border-left: 3px solid #10b981;
    color: #10b981;
    padding-left: 9px;
}

.diff-inline-line.diff-inline-removed {
    background-color: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    color: #ef4444;
    padding-left: 9px;
}

/* Options */
.path-query,
.sql-options,
.java-options,
.python-options,
.pretty-options {
    margin-bottom: 1.5rem;
}

.path-query label,
.sql-options label,
.java-options label,
.python-options label,
.pretty-options label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.mock-options {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.mock-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Monaco Editor Integration */
.monaco-editor-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Ensure Monaco respects theme */
[data-theme="dark"] .monaco-editor {
    background-color: var(--bg-secondary);
}

[data-theme="light"] .monaco-editor {
    background-color: var(--bg-primary);
}

/* Monaco in editor-wrapper */
.editor-wrapper > div[id$="_monaco"] {
    margin-bottom: 0;
}

/* Reset line-height on Monaco container so font measurement gives correct value */
div[id$="_monaco"] {
    line-height: 1 !important;
}

/* Improve Monaco visibility */
.monaco-editor .margin,
.monaco-editor .monaco-scrollable-element {
    background-color: transparent !important;
}

/* Monaco Loading State */
.monaco-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.monaco-loading::after {
    content: 'Loading editor...';
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Monaco Editor Enhancement Badge */
.editor-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-blue);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
}

.path-input,
.table-input {
    width: 100%;
    max-width: 500px;
    padding: 0.625rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.path-input:focus,
.table-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.indent-select {
    padding: 0.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Success/Error Messages */
.success-msg {
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-msg {
    color: var(--error-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-msg {
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Stats Display */
.stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: 6px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.stat-value {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 1.125rem;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 3px solid #3b82f6;
    box-shadow: 0 -4px 20px rgba(59, 130, 246, 0.3);
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

[data-theme="light"] .site-footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 3px solid #3b82f6;
    box-shadow: 0 -4px 20px rgba(59, 130, 246, 0.2);
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.footer-col {
    min-width: 0;
    display: block;
    padding: 0.75rem;
    box-sizing: border-box;
}

[data-theme="dark"] .footer-col {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.footer-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fbbf24;
    display: block;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
}

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

.footer-col ul li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.footer-col ul li a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.825rem;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: #60a5fa;
}

[data-theme="light"] .footer-col ul li a {
    color: #4b5563;
}

[data-theme="light"] .footer-col ul li a:hover {
    color: #2563eb;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #60a5fa;
}

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

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 400px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 240px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .diff-container {
        grid-template-columns: 1fr;
    }

    .jwt-split-container {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        gap: 1rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .json-editor {
        font-size: 12px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Code Highlighting */
.json-key {
    color: #818cf8;
}

.json-string {
    color: #34d399;
}

.json-number {
    color: #60a5fa;
}

.json-boolean {
    color: #f59e0b;
}

.json-null {
    color: var(--text-muted);
}

/* Google Ads Styling */
.ad-container {
    display: none;
    width: 100%;
    max-width: 1400px;
    margin: 1rem auto;
    text-align: center;
    overflow: hidden;
}

.ad-container.ad-loaded {
    display: block;
    min-height: 90px;
}

.ad-container ins {
    display: block;
    min-width: 250px;
    width: 100%;
}

.ad-top {
    margin-top: 0;
}

.ad-bottom {
    margin-bottom: 1rem;
}

.ad-sidebar {
    margin-top: 2rem;
    min-height: 250px;
    width: 100%;
}

@media (max-width: 768px) {
    .ad-sidebar {
        display: none !important;
    }

    .ad-container {
        min-height: 50px;
        min-width: 300px;
    }

    .ad-container ins {
        min-width: 280px;
    }
}

/* Coffee Button */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-hover);
}

.coffee-btn {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 25px;
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.coffee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upi-details {
    background-color: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid var(--border-color);
}

.upi-id {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.upi-id strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.upi-id code {
    background-color: var(--bg-primary);
    color: var(--accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Monaco', 'Courier New', monospace;
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--border-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.upi-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.thank-you {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 1.5rem 0 0 0;
}

/* Input Options (URL + File Upload) */
.input-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.url-input-wrapper {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    min-width: 300px;
}

.url-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.url-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
}

.btn-small {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Drag & Drop Overlay */
.editor-wrapper {
    position: relative;
}

.drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-blue);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.drop-overlay.active {
    display: flex;
}

.editor-wrapper.drag-over .drop-overlay {
    display: flex;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--accent-blue);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

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

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Security Warnings */
.security-warnings {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.security-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.security-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.security-count {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.security-issues {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-issue {
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 1rem;
    border-left: 3px solid;
    transition: transform 0.2s ease;
}

.security-issue[data-severity="high"] {
    border-left-color: #ef4444;
}

.security-issue[data-severity="medium"] {
    border-left-color: #f59e0b;
}

.security-issue[data-severity="low"] {
    border-left-color: #10b981;
}

.security-issue:hover {
    transform: translateX(4px);
}

.security-issue-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.issue-type {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.security-issue-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.issue-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.issue-path {
    font-size: 0.85rem;
}

.issue-path code {
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--accent-blue);
}

.issue-value {
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

.issue-value code {
    background: var(--bg-primary);
    padding: 0.5rem;
    border-radius: 3px;
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-all;
}

/* Batch Validator Styles */
.batch-upload-area {
    margin: 1.5rem 0;
}

.batch-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.batch-dropzone:hover {
    border-color: var(--accent-blue);
    background: var(--bg-tertiary);
}

.batch-upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.batch-files-list h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.batch-file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.batch-summary {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.batch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.batch-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    text-align: center;
}

.batch-result-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.batch-result-item.valid {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.batch-result-item.invalid {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-icon {
    font-size: 1.25rem;
}

.error-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: #ef4444;
    font-size: 0.85rem;
}

/* Benchmark Styles */
.benchmark-results h3, .benchmark-results h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.benchmark-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.benchmark-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.benchmark-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.25rem;
}

.benchmark-ops {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.benchmark-chart {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.benchmark-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benchmark-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.benchmark-bar .bar-label {
    min-width: 100px;
    font-weight: 500;
}

/* Optimization Styles */
.optimization-results {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.size-comparison {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.size-item {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
}

.size-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
}

.size-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.optimization-suggestions {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.suggestion-item {
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.suggestion-item:has(.suggestion-impact.high) {
    border-left-color: #ef4444;
}

.suggestion-item:has(.suggestion-impact.medium) {
    border-left-color: #f59e0b;
}

.suggestion-item:has(.suggestion-impact.low) {
    border-left-color: #10b981;
}

.suggestion-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.suggestion-number {
    background: var(--accent-blue);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.suggestion-impact {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.suggestion-impact.high {
    background: #ef4444;
    color: white;
}

.suggestion-impact.medium {
    background: #f59e0b;
    color: white;
}

.suggestion-impact.low {
    background: #10b981;
    color: white;
}

.suggestion-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.suggestion-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.suggestion-example {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 4px;
    font-size: 0.85rem;
}

.suggestion-example code {
    color: var(--accent-blue);
}

/* Duplicate Key Detector Styles */
.duplicates-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.duplicate-item {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.duplicate-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.duplicate-icon {
    font-size: 1.5rem;
}

.duplicate-key {
    flex: 1;
    font-weight: 600;
}

.duplicate-key code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    color: #ef4444;
}

.duplicate-count {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.duplicate-context {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.duplicate-values {
    margin-top: 0.75rem;
}

.duplicate-values > div {
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.duplicate-values code {
    color: var(--text-primary);
    font-size: 0.85rem;
}

.warning-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }

    .upi-id {
        flex-direction: column;
        align-items: stretch;
    }

    .input-options {
        flex-direction: column;
    }

    .url-input-wrapper {
        min-width: 100%;
    }
}

/* Size Analyzer Styles */
.size-analysis h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.size-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.size-stat-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.size-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.size-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.size-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.size-breakdown-item {
    display: grid;
    grid-template-columns: 100px 1fr 120px;
    gap: 1rem;
    align-items: center;
}

.size-breakdown-label {
    font-weight: 500;
    text-transform: capitalize;
}

.size-breakdown-bar {
    background: var(--bg-tertiary);
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
}

.size-breakdown-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.size-breakdown-value {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.size-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.size-table-row {
    display: grid;
    grid-template-columns: 40px 1fr 100px;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    align-items: center;
}

.size-table-rank {
    font-weight: 700;
    color: var(--accent-blue);
}

.size-table-path {
    font-size: 0.9rem;
}

.size-table-path code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.size-table-size {
    text-align: right;
    font-weight: 600;
}

/* Visual Diff Styles */
.visual-diff {
    padding: 1rem 0;
}

.diff-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.diff-stat {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    text-align: center;
}

.diff-stat.added {
    background: #10b981;
}

.diff-stat.modified {
    background: #f59e0b;
}

.diff-stat.removed {
    background: #ef4444;
}

.visual-diff h4 {
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
}

.diff-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.diff-item {
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.diff-item.added {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
}

.diff-item.modified {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    flex-direction: column;
    align-items: flex-start;
}

.diff-item.removed {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

.diff-item code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

.diff-value {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.9rem;
}

.diff-values {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-family: monospace;
    font-size: 0.9rem;
    width: 100%;
}

.old-value {
    color: #ef4444;
}

.new-value {
    color: #10b981;
}

/* Webhook Output Styles */
.webhook-output h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.webhook-output pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

/* RegEx Patterns Styles */
.regex-patterns h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.regex-item {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    align-items: center;
}

.regex-field {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.regex-pattern {
    font-family: monospace;
    font-size: 0.85rem;
}

.regex-pattern code {
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 3px;
    display: block;
    word-break: break-all;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

/* Command Palette Styles */
.command-palette {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

.command-palette.active {
    display: block;
}

.command-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.command-palette-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid var(--border-light);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.command-palette-header {
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.command-palette-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.command-palette-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.command-palette-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
}

.command-search-wrapper {
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.command-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--text-muted);
}

.command-search {
    width: 100%;
    padding: 1.25rem 4rem 1.25rem 1.5rem;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.125rem;
    color: var(--text-primary);
    font-family: inherit;
}

.command-search::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.command-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.command-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    margin-bottom: 4px;
}

.command-result-item:hover,
.command-result-item.active {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.command-result-item.active {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.command-result-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.command-result-content {
    flex: 1;
}

.command-result-info {
    flex: 1;
    min-width: 0;
}

.command-result-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.command-result-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.command-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.command-footer {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.command-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.command-key {
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.75rem;
}

/* Collapsible Sections */
.tool-section h3 {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.tool-section h3:hover {
    background: var(--bg-tertiary);
}

.tool-section h3::before {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.tool-section.collapsed h3::before {
    transform: rotate(-90deg);
}

.tool-section.collapsed .tool-list {
    display: none;
}

/* Search highlighting */
.tool-list a.hidden {
    display: none;
}

.tool-list a mark {
    background: var(--primary-color);
    color: white;
    padding: 0 0.25rem;
    border-radius: 2px;
}

/* Dashboard Styles */
.dashboard-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-welcome {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-welcome h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.dashboard-search {
    display: flex;
    justify-content: center;
}

.dashboard-section {
    margin-bottom: 1.5rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.dashboard-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-quick-panel {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tool-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tool-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

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

.feature-item {
    text-align: center;
    padding: 1rem 0.75rem;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.tool-card.empty-state,
.dashboard-quick-panel .empty-state {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    background: transparent;
}

/* Mobile Improvements */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fab-command {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    width: 60px;
    height: 60px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .fab-command {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome h1 {
        font-size: 2rem;
    }

    .category-cards {
        grid-template-columns: 1fr;
    }

    .tool-cards-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .quick-actions-toolbar {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

#homeBtn:hover {
    background: var(--primary-color);
    color: white;
}
/* ============================================
   UI IMPROVEMENTS - Modern, Clean, Professional
   ============================================ */

/* Better button styles */
.btn {
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Larger, more prominent editor areas */
.json-editor,
.editor-wrapper textarea {
    min-height: 400px !important;
    font-size: 14px;
    line-height: 1.6;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.json-editor:focus,
.editor-wrapper textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Better spacing in tool headers */
.tool-header {
    margin-bottom: 2rem;
}

.tool-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tool-header .subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Better button groups */
.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* Cleaner result areas */
.result-area {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Better quick actions toolbar */
.quick-actions-toolbar {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border: 1px solid var(--border-color);
}

.quick-action {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quick-action:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    font-size: 1.5rem;
}

.quick-action-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Better sidebar */
.sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
}

.sidebar-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Better tool list */
.tool-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-list li {
    margin-bottom: 0.25rem;
}

.tool-list a {
    display: block;
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.tool-list a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.tool-list a.active {
    background: var(--primary-color);
    color: white;
}

/* Better recommendations section */
#toolRecommendations {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

#toolRecommendations h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Better form inputs */
input[type="text"],
input[type="email"],
input[type="url"],
select {
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Better validation status */
.validation-status {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    margin-top: 0.5rem;
}

.validation-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.validation-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Better typography throughout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improved header */
header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
}

/* Better main content area */
.main-content {
    padding: 2rem;
}

/* Better dashboard cards */
.tool-card {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid var(--border-color);
}

.tool-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Better spacing for mobile */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .tool-header h2 {
        font-size: 1.5rem;
    }

    .json-editor {
        min-height: 300px !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Better disabled states */
.btn:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* ============================================
   COMPREHENSIVE UI/UX FIXES
   ============================================ */

/* IMPROVED COLOR SYSTEM */
:root {
    /* Better Light Theme (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* BETTER BODY DEFAULTS */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* IMPROVED HEADER */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.9);
}

/* BETTER LOGO */
.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* CLEANER SIDEBAR */
.sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* BETTER HOME BUTTON */
#homeBtn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    border: none !important;
    font-weight: 600;
    padding: 0.875rem 1.25rem !important;
    box-shadow: var(--shadow-md);
}

#homeBtn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* CLEANER SEARCH */
#toolSearch {
    background: var(--bg-secondary) !important;
    border: 2px solid var(--border-color) !important;
    padding: 0.75rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

#toolSearch:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none;
}

/* BETTER SIDEBAR SECTIONS */
.sidebar-section {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

/* IMPROVED TOOL LIST */
.tool-list a {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
    color: var(--text-secondary);
}

.tool-list a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    transform: translateX(4px);
}

.tool-list a.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

/* BETTER MAIN CONTENT */
.main-content {
    background: var(--bg-primary);
    min-height: calc(100vh - 80px);
}

/* CLEANER TOOL HEADERS */
.tool-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tool-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.tool-header .subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* BEAUTIFUL BUTTONS */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* BETTER EDITOR */
.json-editor,
.editor-wrapper textarea {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    resize: vertical;
    min-height: 450px;
    transition: all 0.2s ease;
}

.json-editor:focus,
.editor-wrapper textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* CLEANER RESULT AREAS */
.result-area {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

/* BEAUTIFUL QUICK ACTIONS */
.quick-actions-toolbar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.quick-action {
    flex: 1;
    min-width: 90px;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-action:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.quick-action:active {
    transform: translateY(-1px);
}

.quick-action-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.5rem;
}

.quick-action-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* BETTER DASHBOARD */
.dashboard-content {
    padding: 3rem 2rem;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* CLEANER TOOL CARDS */
.tool-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

.tool-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-tertiary);
}

.tool-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* BETTER INPUTS */
input[type="text"],
input[type="email"],
input[type="url"],
select,
.path-input {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* SMOOTHER ANIMATIONS */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* BETTER MOBILE */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 1.5rem 1rem;
    }

    .tool-header h2 {
        font-size: 1.5rem;
    }

    .quick-action {
        min-width: 70px;
        padding: 0.75rem 0.5rem;
    }

    .quick-action-label {
        font-size: 0.75rem;
    }
}

/* ACCESSIBILITY */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}

/* LOADING STATE */
.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}
/* ============================================
   TOP NAVIGATION LAYOUT WITH BETTER TEXT VISIBILITY
   ============================================ */

/* Reset and Better Base Colors */
:root {
    /* Light Theme - Much better contrast */
    --bg-page: #f8f9fa;
    --bg-white: #ffffff;
    --bg-nav: #ffffff;
    --bg-hover: #f1f3f5;
    --bg-dropdown: #ffffff;

    --text-primary: #1a1a1a;      /* Much darker for visibility */
    --text-secondary: #4a4a4a;    /* Darker gray */
    --text-muted: #6c757d;
    --text-link: #2563eb;

    --border-light: #dee2e6;
    --border-medium: #ced4da;

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-dark: #1d4ed8;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12);
    --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --bg-page: #0f172a;
    --bg-white: #1e293b;
    --bg-nav: #1e293b;
    --bg-hover: #334155;
    --bg-dropdown: #1e293b;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-link: #60a5fa;

    --border-light: #334155;
    --border-medium: #475569;
}

/* Body and Layout */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Remove old sidebar/container styles (main app only) */
.main-container,
.sidebar {
    display: none !important;
}

/* Top Navigation Bar */
.top-nav {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.top-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo Area */
.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    flex-shrink: 1;
    min-width: 0;
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.dropdown-arrow {
    font-size: 0.625rem;
    transition: transform 0.2s;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-dropdown);
    padding: 0.5rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);      /* Dark text */
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateX(4px);
}

/* Multi-column Dropdown */
.dropdown-menu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-width: 650px;
    padding: 1rem;
}

.dropdown-column {
    min-width: 200px;
}

.dropdown-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding: 0 0.875rem;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.nav-btn {
    padding: 0.5rem 0.875rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-btn-icon {
    font-size: 1.125rem;
}

.nav-btn-text {
    font-weight: 600;
}

.kbd-hint {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 600;
}

.search-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    border: none;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.theme-toggle-btn {
    padding: 0.5rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.15s;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.1);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem 0.75rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Main Content - Full Width */
.main-content-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 60px);
}

/* Command Palette */
.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

/* Hide by default - but allow inline styles to override */
.command-palette-overlay:not([style*="flex"]) {
    display: none;
}

.command-palette {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
}

.command-palette input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: none;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
}

.command-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.command-results a {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    font-weight: 500;
}

.command-results a:hover,
.command-results a.selected {
    background: var(--primary);
    color: white;
}

.command-help {
    padding: 0.75rem 1.5rem;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-light);
}

.command-help kbd {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: monospace;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .nav-actions .nav-btn-text,
    .nav-actions .kbd-hint {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .logo-text {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .top-nav-container {
        padding: 0 1rem;
    }

    .main-content-full {
        padding: 1rem;
    }

    .logo-text {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-search {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-hover);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.mobile-section {
    margin-bottom: 1.5rem;
}

.mobile-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
}

.mobile-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* Better Tool Content Styling */
.tool-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.tool-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.tool-header .subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
}

/* Better Form Elements */
textarea,
input[type="text"],
select {
    background: var(--bg-page);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: 'Monaco', 'Menlo', monospace;
    transition: all 0.2s;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.json-editor {
    min-height: 400px;
    width: 100%;
    font-size: 14px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--border-light);
}

/* Dashboard */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
}

.tool-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tool-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem 0;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}
/* ============================================
   ADDITIONAL UI/UX IMPROVEMENTS
   ============================================ */

/* Breadcrumb / Current Tool Indicator */
.current-tool-indicator {
    display: none;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.current-tool-indicator.active {
    display: block;
}

.current-tool-indicator .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.current-tool-indicator .breadcrumb-arrow {
    color: var(--text-muted);
}

.current-tool-indicator .current {
    color: var(--primary);
    font-weight: 700;
}

/* Better Tool Section Spacing for Full Width */
.tool-section {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.tool-section.active {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Better Dashboard Spacing */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.dashboard-welcome {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-welcome h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.dashboard-welcome .subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.dashboard-search input {
    width: 100%;
    max-width: 600px;
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 1.125rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.dashboard-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Category Cards Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem 0;
}

.category-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

.category-card .tool-count {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.75rem;
}

/* Better Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 1rem;
}

/* Better Button Groups */
.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.button-group .btn {
    flex: 0 0 auto;
}

/* Better Form Layouts */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* Better Result Areas */
.result-area {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.result-area h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.result-success {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.result-error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.result-warning {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

/* Code Blocks */
pre {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

code {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-dark);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875em;
}

pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

/* Better Copy Buttons */
.copy-btn {
    position: relative;
    padding: 0.5rem 0.875rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

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

.copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.copy-btn.copied::after {
    content: " ✓";
}

/* Better Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    z-index: 1000;
    pointer-events: none;
}

/* Better Mobile Menu */
@media (max-width: 968px) {
    .mobile-menu {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .mobile-section {
        margin-bottom: 1.5rem;
    }

    .mobile-section a {
        padding: 1rem 0.75rem;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome h1 {
        font-size: 1.75rem;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* Better Focus Indicators */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible,
.btn:focus-visible {
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .top-nav,
    .nav-actions,
    .mobile-menu-btn,
    .command-palette-overlay {
        display: none !important;
    }

    .main-content-full {
        max-width: 100%;
        padding: 0;
    }

    .tool-section {
        page-break-inside: avoid;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] code {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .copy-btn:hover {
    background: var(--primary);
}

[data-theme="dark"] [data-tooltip]:hover::after {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
}
/* ============================================
   FINAL UI/UX IMPROVEMENTS
   ============================================ */

/* Breadcrumb Bar */
.breadcrumb-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
    position: sticky;
    top: 60px;
    z-index: 999;
}

.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-home {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb-home:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
    user-select: none;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Badge for favorites count */
.badge {
    background: var(--primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    margin-left: 0.25rem;
    min-width: 18px;
    text-align: center;
}

/* Dropdown menu positioning */
.dropdown-menu-right {
    left: auto;
    right: 0;
}

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.dropdown-empty {
    padding: 0.5rem;
}

/* Favorites and Recent Lists */
.favorites-list,
.recent-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.favorites-list:empty + .dropdown-empty,
.recent-list:empty + .dropdown-empty {
    display: block;
}

.dropdown-empty {
    display: none;
}

.favorites-list a,
.recent-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    font-size: 0.875rem;
    font-weight: 500;
}

.favorites-list a:hover,
.recent-list a:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.favorites-list a .remove-favorite {
    opacity: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: opacity 0.15s;
}

.favorites-list a:hover .remove-favorite {
    opacity: 1;
}

.favorites-list a .remove-favorite:hover {
    color: #ef4444;
}

/* Mobile Search Filtering */
.mobile-section[data-filtered="hidden"] {
    display: none;
}

.mobile-section a[data-filtered="hidden"] {
    display: none !important;
}

/* Better mobile section styling */
.mobile-section {
    margin-bottom: 1rem;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
}

.mobile-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
    font-size: 0.9375rem;
    min-height: 48px;
}

.mobile-menu a:hover,
.mobile-menu a:active {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateX(4px);
}

/* Search highlight in mobile menu */
.search-highlight {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}

/* Improve nav dropdown menu */
.nav-dropdown .dropdown-menu {
    min-width: 240px;
}

/* Better scrollbar for dropdowns */
.favorites-list::-webkit-scrollbar,
.recent-list::-webkit-scrollbar,
.mobile-menu-content::-webkit-scrollbar {
    width: 8px;
}

.favorites-list::-webkit-scrollbar-track,
.recent-list::-webkit-scrollbar-track,
.mobile-menu-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.favorites-list::-webkit-scrollbar-thumb,
.recent-list::-webkit-scrollbar-thumb,
.mobile-menu-content::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.favorites-list::-webkit-scrollbar-thumb:hover,
.recent-list::-webkit-scrollbar-thumb:hover,
.mobile-menu-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar */
.favorites-list,
.recent-list,
.mobile-menu-content {
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) var(--bg-secondary);
}

/* Mobile responsive adjustments */
@media (max-width: 968px) {
    .nav-btn-text {
        display: none;
    }

    .nav-dropdown .dropdown-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: 70px;
        width: auto;
    }

    .breadcrumb-bar {
        top: 60px;
    }

    .breadcrumb-container {
        padding: 0 1rem;
    }
}

@media (max-width: 640px) {
    .breadcrumb-bar {
        font-size: 0.8125rem;
    }

    .breadcrumb-container {
        gap: 0.375rem;
    }

    .nav-actions {
        gap: 0.25rem;
    }

    .nav-btn {
        padding: 0.5rem;
    }

    .kbd-hint {
        display: none;
    }
}

/* Sticky breadcrumb when scrolling */
.breadcrumb-bar.scrolled {
    box-shadow: var(--shadow-sm);
}

/* Quick access empty state improvements */
.quick-access-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--border-light);
}

.quick-access-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.quick-access-empty h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.quick-access-empty p {
    font-size: 0.875rem;
    margin: 0;
}

/* Improve nav-actions spacing */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-actions .nav-dropdown {
    position: relative;
}

/* Better hover states for nav buttons */
.nav-btn {
    position: relative;
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.15s;
    z-index: -1;
}

.nav-btn:hover::before {
    opacity: 0.1;
}

/* Active state for current tool in dropdowns */
.favorites-list a.active,
.recent-list a.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px);
}

/* Transition for dropdown menus */
.dropdown-menu {
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

/* Loading state for favorites/recent */
.dropdown-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.dropdown-loading .loading-spinner {
    margin: 0 auto 0.75rem auto;
}

/* Better focus states for dropdowns */
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keyboard navigation support */
.dropdown-menu a:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* Mobile menu improvements */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-search {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 10;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Tool count in mobile sections */
.mobile-section-title .count {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.6875rem;
    margin-left: 0.5rem;
    font-weight: 700;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    .mobile-menu a {
        min-height: 48px;
        padding: 1rem 0.75rem;
    }

    .nav-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .breadcrumb-bar {
    background: var(--bg-nav);
}

[data-theme="dark"] .mobile-section-title {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.15), transparent);
}

[data-theme="dark"] .search-highlight {
    background: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}
/* ============================================
   DROPDOWN FIX - Make dropdowns actually work
   ============================================ */

/* Override previous dropdown styles to make them work */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-dropdown);
    padding: 0.5rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}

/* Show dropdown on hover */
.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Keep dropdown open when hovering over it */
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Multi-column dropdown specific sizing */
.dropdown-menu.dropdown-menu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-width: 650px;
    padding: 1rem;
}

/* Right-aligned dropdowns */
.dropdown-menu-right {
    left: auto;
    right: 0;
}

/* Make sure links in dropdown are visible and clickable */
.dropdown-menu a {
    display: block;
    padding: 0.625rem 0.875rem;
    color: var(--text-primary) !important;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
    pointer-events: auto;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary) !important;
    transform: translateX(4px);
}

/* Dropdown columns */
.dropdown-column {
    min-width: 200px;
}

.dropdown-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding: 0 0.875rem;
}

/* Make sure nav-link buttons don't have pointer-events issues */
.nav-link {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

/* Ensure dropdown has higher z-index than other content */
.nav-dropdown:hover {
    z-index: 1002;
}

/* Mobile adjustments */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .nav-dropdown .dropdown-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: 70px;
        width: auto;
        max-width: none;
    }

    .dropdown-menu.dropdown-menu-columns {
        grid-template-columns: 1fr;
        min-width: auto;
    }
}
/* ============================================
   FINAL CSS FIX - Fix all remaining issues
   ============================================ */

/* Fix mark tag in command palette */
mark {
    background: rgba(59, 130, 246, 0.3);
    color: var(--primary-dark);
    padding: 0 2px;
    border-radius: 2px;
}

[data-theme="dark"] mark {
    background: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}

/* Ensure all clickable elements have pointer cursor */
.tool-card,
.category-card,
.nav-dropdown button,
.nav-btn,
.dropdown-menu a,
.mobile-menu a,
.quick-action,
.logo-area {
    cursor: pointer;
}

/* Fix dropdown empty state visibility */
.favorites-list:not(:empty) + .dropdown-empty,
.recent-list:not(:empty) + .dropdown-empty {
    display: none !important;
}

.favorites-list:empty + .dropdown-empty,
.recent-list:empty + .dropdown-empty {
    display: block !important;
}

/* Ensure dropdowns have proper z-index */
.command-palette-overlay {
    z-index: 10000;
}

.top-nav {
    z-index: 1000;
}

.breadcrumb-bar {
    z-index: 999;
}

.dropdown-menu {
    z-index: 1001;
}

/* Fix nav-link to ensure it doesn't block dropdown */
.nav-link {
    position: relative;
    z-index: 1;
}

.nav-dropdown:hover {
    z-index: 1002;
}

/* Ensure command palette is clickable */
.command-palette {
    pointer-events: auto;
}

.command-palette-overlay {
    pointer-events: auto;
}

/* Make sure mobile menu overlays properly */
.mobile-menu {
    position: relative;
    z-index: 998;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

/* Fix theme toggle button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* Ensure kbd elements are visible */
kbd {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] kbd {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Fix command results styling */
.command-results {
    max-height: 400px;
    overflow-y: auto;
}

.command-results a {
    padding: 0.875rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 2px;
}

.command-results a.selected {
    background: var(--primary) !important;
    color: white !important;
}

/* Ensure dashboard shows properly */
.dashboard-content {
    display: block;
    width: 100%;
}

.dashboard-content.hidden {
    display: none !important;
}

/* Fix tool sections */
.tool-section {
    display: none;
    width: 100%;
}

.tool-section.active {
    display: block !important;
}

/* Ensure dropdown headers are visible */
.dropdown-header {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* Fix badge positioning */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure mobile search is sticky */
.mobile-search {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Fix dropdown column gaps */
.dropdown-column a {
    margin-bottom: 2px;
}

/* Ensure text is always readable */
.dropdown-menu,
.mobile-menu,
.command-palette {
    color: var(--text-primary);
}

.dropdown-menu a,
.mobile-menu a,
.command-results a {
    color: var(--text-primary) !important;
}

.dropdown-menu a:hover,
.mobile-menu a:hover,
.command-results a:hover {
    color: var(--primary) !important;
}

/* Fix nav button spacing */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Ensure dropdowns don't overflow on small screens */
@media (max-width: 968px) {
    .dropdown-menu.dropdown-menu-columns {
        grid-template-columns: 1fr;
        min-width: auto;
        max-width: calc(100vw - 2rem);
    }
}

/* Fix for dropdown staying visible */
.nav-dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Prevent dropdown from closing when hovering on it */
.dropdown-menu:hover {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Fix breadcrumb visibility */
.breadcrumb-bar {
    display: none;
}

.breadcrumb-bar.active {
    display: block !important;
}

/* Ensure all transitions are smooth */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix any text color issues in dark mode */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .mobile-menu,
[data-theme="dark"] .command-palette {
    background: var(--bg-dropdown);
    color: var(--text-primary);
}

/* Ensure proper contrast */
.dropdown-label {
    color: var(--text-muted) !important;
}

.dropdown-header {
    color: var(--text-muted) !important;
}

/* Fix any overflow issues */
.main-content-full {
    overflow-x: hidden;
}

/* Ensure proper box-sizing */
* {
    box-sizing: border-box;
}

/* Fix any focus outline issues */
*:focus {
    outline-color: var(--primary);
}

/* Ensure proper line height for readability */
body {
    line-height: 1.6;
}

/* Fix any button alignment issues */
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
/* ============================================
   FIX: Ensure dropdowns ALWAYS work on hover
   ============================================ */

/* Force dropdown to work on hover - override all previous rules */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 220px;

    /* Hidden by default */
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);

    /* Transitions */
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;

    /* Ensure it's above everything */
    z-index: 10000 !important;

    /* Ensure it can receive pointer events */
    pointer-events: auto !important;
}

/* Show dropdown on hover - CRITICAL */
.nav-dropdown:hover > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Keep dropdown visible when hovering on the dropdown itself */
.dropdown-menu:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Ensure nav-link doesn't block hover */
.nav-link {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Increase hover area slightly */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 10px;
    z-index: 999;
}

/* Multi-column dropdowns */
.dropdown-menu.dropdown-menu-columns {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-width: 650px;
    padding: 1rem;
}

.nav-dropdown:hover > .dropdown-menu.dropdown-menu-columns,
.dropdown-menu.dropdown-menu-columns:hover {
    display: grid !important;
}

/* Right-aligned dropdowns */
.dropdown-menu-right {
    left: auto;
    right: 0;
}

/* Ensure links are clickable */
.dropdown-menu a {
    display: block;
    padding: 0.625rem 0.875rem;
    color: var(--text-primary) !important;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary) !important;
    transform: translateX(4px);
}

/* Ensure dropdown stays on top of breadcrumb */
.nav-dropdown:hover {
    z-index: 10001 !important;
}

/* Fix for when tool page is active */
.tool-section.active ~ .nav-dropdown .dropdown-menu,
.breadcrumb-bar ~ * .nav-dropdown .dropdown-menu {
    z-index: 10000 !important;
}

/* Prevent any other element from blocking dropdown */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.breadcrumb-bar {
    position: sticky;
    top: 60px;
    z-index: 999;
}

.main-content-full {
    position: relative;
    z-index: 1;
}

/* Mobile - hide desktop nav */
@media (max-width: 968px) {
    .nav-links {
        display: none !important;
    }
}

/* Debug: Make dropdown highly visible for testing */
.nav-dropdown:hover > .dropdown-menu {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3) !important;
}
/* ============================================
   FIX: Dropdown overlay appearance
   ============================================ */

/* Ensure dropdown doesn't overlap content awkwardly */
.nav-dropdown .dropdown-menu {
    /* Add backdrop blur when visible */
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.98);
}

[data-theme="dark"] .nav-dropdown .dropdown-menu {
    background: rgba(30, 41, 59, 0.98);
}

/* Add subtle border to separate from content */
.dropdown-menu {
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Ensure dropdown is always above content */
.top-nav,
.nav-dropdown,
.dropdown-menu {
    z-index: 10000 !important;
}

/* Reduce max height to prevent excessive overlap */
.dropdown-menu {
    max-height: 70vh;
    overflow-y: auto;
}

.dropdown-menu.dropdown-menu-columns {
    max-height: 60vh;
}

/* Better scrollbar for long dropdowns */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Ensure clickable area doesn't extend beyond visual bounds */
.nav-dropdown {
    position: relative;
    z-index: 10001;
}

.nav-dropdown:hover {
    z-index: 10002;
}

/* Close button hint in dropdown (for mobile) */
@media (max-width: 968px) {
    .dropdown-menu::before {
        content: '✕ Tap outside to close';
        display: block;
        padding: 0.5rem 1rem;
        background: rgba(59, 130, 246, 0.1);
        color: var(--text-muted);
        font-size: 0.75rem;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
        margin: -0.5rem -0.5rem 0.5rem -0.5rem;
    }
}

/* Prevent body scroll when dropdown is open on mobile */
@media (max-width: 968px) {
    body.dropdown-open {
        overflow: hidden;
    }
}

/* Add overlay backdrop on mobile */
@media (max-width: 968px) {
    .dropdown-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 9999;
        display: none;
    }

    .dropdown-backdrop.active {
        display: block;
    }
}

/* ============================================
   FORCE Monaco Editor Proper Sizing
   ============================================ */

/* Ensure all Monaco containers have minimum dimensions */
div[id$="_monaco"] {
    min-width: 300px !important;
    min-height: 300px !important;
    width: 100% !important;
    height: 400px !important;
    display: block !important;
}

/* Monaco editor viewport must be sized */
.monaco-editor {
    min-width: 300px !important;
    min-height: 300px !important;
}

/* Ensure parent containers don't collapse */
.json-editor {
    min-width: 300px !important;
}

.tool-content {
    min-width: 100% !important;
}


/* ============================================
   CRITICAL FIX: Ensure editor parent containers have width
   ============================================ */

/* Tool content must be full width */
.tool-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Input areas must be full width */
.input-area {
    width: 100% !important;
}

/* Any div containing Monaco must be full width */
div:has(> [id$="_monaco"]) {
    width: 100% !important;
}

/* ===== cURL Import Modal ===== */
.curl-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.curl-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.curl-modal-content {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: curlModalSlideIn 0.3s ease-out;
}

@keyframes curlModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.curl-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.curl-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.curl-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.curl-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.curl-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.curl-modal-instructions {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.curl-textarea {
    width: 100%;
    min-height: 300px;
    max-height: 400px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.curl-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.curl-textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

.curl-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.curl-modal-footer .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .curl-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .curl-textarea {
        min-height: 250px;
        font-size: 0.8rem;
    }

    .curl-modal-header,
    .curl-modal-body,
    .curl-modal-footer {
        padding: 1rem;
    }
}


/* ===== Blog Page Styles ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.blog-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.blog-content h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.blog-content p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.blog-content li {
    margin: 0.3rem 0;
}

.blog-content code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

.blog-content pre {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}

.blog-content pre code {
    border: none;
    padding: 0;
    background: transparent;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card {
        padding: 1.25rem;
    }

    .blog-card h2 {
        font-size: 1.2rem;
    }
}

/* ===== HIGH IMPACT UI IMPROVEMENTS ===== */

/* 1. HERO SECTION */
.hero-banner {
    text-align: center;
    padding: 4rem 2rem 2.5rem;
    max-width: 860px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-block;
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 20px;
    padding: 0.35rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 60%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 60%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.btn-hero-primary {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59,130,246,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59,130,246,0.45);
}
.btn-hero-secondary {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.btn-hero-secondary:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}
.hero-trust-badges {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.hero-trust-badge {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.hero-trust-badge span.check {
    color: #10b981;
    font-weight: 700;
}
.hero-social-proof {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}
.hero-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.hero-stars {
    color: #f59e0b;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}
.hero-rating-text strong {
    color: var(--text-primary);
}
.hero-search-wrap {
    max-width: 560px;
    margin: 0 auto;
}
.hero-search-wrap input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search-wrap input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

/* 2. TOOL CARDS - ALL TOOLS GRID */
.all-tools-section { margin-top: 1rem; }
.tools-category-block { margin-bottom: 2.5rem; }
.tools-category-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.tools-category-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.tools-category-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}
.tools-grid-dense {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.tool-card-v2 {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
}
.tool-card-v2:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.tool-card-v2-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 0.1rem;
}
.tool-card-v2-body h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.2rem;
    line-height: 1.3;
}
.tool-card-v2-body p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* 3. EMPTY STATE IN EDITOR */
.editor-empty-state {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}
.editor-empty-state-icon {
    font-size: 1.1rem;
    opacity: 0.35;
}
.editor-empty-state-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    opacity: 0.6;
}
.editor-empty-hint {
    display: inline-block;
    font-size: 0.78rem;
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    pointer-events: all;
    cursor: pointer;
    border: 1px solid rgba(59,130,246,0.2);
}
.editor-wrapper {
    position: relative;
    cursor: text;
}

.json-editor:not(:placeholder-shown) ~ .editor-empty-state,
.json-editor:focus ~ .editor-empty-state { opacity: 0; pointer-events: none; }


/* 4. ACTIVE TOOL INDICATOR - improved breadcrumb */
.breadcrumb-bar {
    background: var(--bg-secondary) !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 0.6rem 0 !important;
}
.breadcrumb-home {
    color: var(--text-muted) !important;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}
.breadcrumb-home:hover { color: #3b82f6 !important; }
.breadcrumb-separator { color: var(--text-muted) !important; font-size: 0.875rem; }
.breadcrumb-current {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
}
.tool-header {
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.tool-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59,130,246,0.1);
    color: #3b82f6;
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .tools-grid-dense { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
}
.mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item:active {
    background: rgba(59,130,246,0.12);
}
.mobile-nav-item .nav-icon {
    font-size: 1.3rem;
    line-height: 1;
}
.mobile-nav-item .nav-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.mobile-nav-item.active-nav .nav-label {
    color: #3b82f6;
}
.mobile-nav-item.active-nav .nav-icon {
    filter: drop-shadow(0 0 4px rgba(59,130,246,0.5));
}
@media (max-width: 768px) {
    .mobile-bottom-nav { display: block; }
    /* Push content up so bottom nav doesn't overlap */
    body { padding-bottom: 72px; }
    /* Move FAB above bottom nav */
    .fab-command { bottom: 5.5rem !important; }
}

/* ===== QUICK WINS ===== */

/* 8. Tool count badge in header */
.header-tool-count {
    display: inline-flex;
    align-items: center;
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-left: 0.5rem;
    -webkit-text-fill-color: #3b82f6;
    vertical-align: middle;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .header-tool-count { display: none; }
}

/* 9. Enhanced kbd hint */
.kbd-hint {
    background: rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-bottom-width: 2px !important;
    padding: 0.1rem 0.4rem !important;
    border-radius: 4px !important;
    font-size: 0.72rem !important;
    font-family: ui-monospace, monospace !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.3) !important;
}
[data-theme="light"] .kbd-hint {
    background: rgba(0,0,0,0.07) !important;
    color: #374151 !important;
    border-color: rgba(0,0,0,0.15) !important;
}
/* Search button tooltip on hover */

/* 10. Footer enhancements */
.footer-whats-new {
    margin-bottom: 1.25rem;
}
.footer-whats-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16,185,129,0.1);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.footer-whats-new ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.footer-whats-new li {
    font-size: 0.825rem;
    color: var(--text-muted);
    padding-left: 0.1rem;
}
.footer-popular-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.footer-tool-chip {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    cursor: pointer;
}
.footer-tool-chip:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* ========== UI/UX IMPROVEMENTS ========== */

/* 1. Tool transition fade animation */
@keyframes toolFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tool-content.active {
    animation: toolFadeIn 0.18s ease;
}

/* 2. Split-pane layout for Validate tool on large screens */
@media (min-width: 1200px) {
    #validate {
        display: grid;
        grid-template-areas:
            "header  header"
            "options options"
            "editor  result"
            "buttons result"
            "security result";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto 1fr;
        column-gap: 1.5rem;
        align-items: start;
    }
    #validate .tool-header    { grid-area: header; }
    #validate .input-options  { grid-area: options; }
    #validate .editor-wrapper { grid-area: editor; min-height: 420px; }
    #validate .button-group   { grid-area: buttons; }
    #validate #securityWarnings { grid-area: security; }
    #validate #validateResult { grid-area: result; min-height: 520px; }
}

/* 3. Input counter */
.input-counter {
    font-size: 0.71rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.3rem;
    font-family: monospace;
    letter-spacing: 0.02em;
    opacity: 0.75;
    user-select: none;
}

/* 4. Keyboard shortcuts modal */
.shortcuts-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.shortcuts-modal-overlay.open {
    display: flex;
}
.shortcuts-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 520px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
}
.shortcuts-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.shortcuts-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}
.shortcuts-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0;
}
.shortcuts-modal-close:hover { color: var(--text-primary); }
.shortcuts-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin: 1rem 0 0.4rem;
}
.shortcuts-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.shortcuts-row:last-child { border-bottom: none; }
.shortcut-keys {
    display: flex;
    gap: 0.25rem;
}
.shortcut-key {
    display: inline-block;
    background: var(--bg-tertiary, rgba(255,255,255,0.08));
    border: 1px solid var(--border-color);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-primary);
}
.shortcuts-trigger-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    white-space: nowrap;
}
.shortcuts-trigger-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ========== ROUND 2 UI IMPROVEMENTS ========== */

/* Line numbers in formatted output */
pre.line-numbered { counter-reset: ln; padding-left: 0; }
pre.line-numbered .ln {
    display: block;
    padding-left: 3.5em;
    position: relative;
    min-height: 1.4em;
}
pre.line-numbered .ln::before {
    content: attr(data-n);
    position: absolute;
    left: 0;
    width: 2.8em;
    text-align: right;
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 0.82em;
    user-select: none;
    pointer-events: none;
    border-right: 1px solid var(--border-light);
    padding-right: 0.5em;
}

/* Diff summary badge */
.diff-summary-badge {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg-tertiary, rgba(255,255,255,0.04));
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 600;
}
.diff-summary-added   { color: #10b981; }
.diff-summary-removed { color: #ef4444; }
.diff-summary-modified { color: #f59e0b; }
.diff-summary-total   { color: var(--text-muted); font-weight: 400; margin-left: auto; }

/* JSON Slots */
.json-slots {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.json-slots-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-right: 0.2rem;
}
.slot-btn {
    background: var(--bg-tertiary, rgba(255,255,255,0.06));
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.18rem 0.55rem;
    transition: border-color 0.15s, color 0.15s;
}
.slot-btn:hover { border-color: #3b82f6; color: #3b82f6; }

/* Progress indicator */
.validate-progress {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: #3b82f6;
}
.validate-progress-bar {
    width: 80px;
    height: 4px;
    background: rgba(59,130,246,0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.validate-progress-bar::after {
    content: '';
    position: absolute;
    left: -40px;
    width: 40px;
    height: 100%;
    background: #3b82f6;
    border-radius: 2px;
    animation: progressSlide 0.9s ease infinite;
}
@keyframes progressSlide {
    to { left: 80px; }
}

/* Related tools bar */
.related-tools-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}
.related-tools-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.related-tool-chip {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.75rem;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.related-tool-chip:hover { border-color: #3b82f6; color: #3b82f6; background: rgba(59,130,246,0.07); }


/* "Send to" buttons styling */
.send-to-btn { color: #3b82f6 !important; }


/* ========== ROUND 3 CSS ========== */

/* GitHub star button */
.github-star-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.github-star-btn:hover { border-color: #f59e0b; color: #f59e0b; }

/* Editor toolbar (counter + font size) */
.editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
}
.font-size-control {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.font-size-label {
    font-size: 0.71rem;
    color: var(--text-muted);
    margin-right: 0.2rem;
}
.font-size-btn {
    background: var(--bg-tertiary, rgba(255,255,255,0.06));
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    line-height: 1.4;
}
.font-size-btn:hover { border-color: #3b82f6; color: #3b82f6; }
.font-size-value {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
    min-width: 2.5em;
    text-align: center;
}

/* Email capture */
.footer-email-capture {
    border-top: 1px solid var(--border-light);
    padding: 1.25rem 2rem;
    margin-top: 0.5rem;
}
.footer-email-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
}
.footer-email-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.footer-email-text span {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.footer-email-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 220px;
}
.footer-email-input {
    flex: 1;
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary, rgba(255,255,255,0.06));
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.footer-email-input::placeholder { color: var(--text-muted); }
.footer-email-input:focus { outline: none; border-color: #3b82f6; }

/* Changelog toast */
.changelog-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    max-width: 320px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.changelog-toast.show { transform: translateY(0); opacity: 1; }
.changelog-toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-primary);
}
.changelog-toast-header button {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1rem; padding: 0; line-height: 1;
}
.changelog-toast ul {
    list-style: none; padding: 0; margin: 0;
}
.changelog-toast ul li {
    font-size: 0.8rem; color: var(--text-secondary);
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--border-light);
}
.changelog-toast ul li::before { content: '→ '; color: #3b82f6; }
.changelog-toast ul li:last-child { border-bottom: none; }

/* ─── Retention & Return Traffic UI ──────────────────────────────────────── */

/* Welcome-back banner */
.welcome-back-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: linear-gradient(90deg, #1e3a5f 0%, #1a3050 100%);
    border-bottom: 1px solid rgba(59,130,246,0.4);
    padding: 0.55rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: wbSlideDown 0.35s ease;
}
@keyframes wbSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.wb-left { display: flex; align-items: center; gap: 0.75rem; }
.wb-wave { font-size: 1.25rem; }
.wb-text { display: flex; flex-direction: column; }
.wb-text strong { font-size: 0.88rem; color: #e2e8f0; }
.wb-text span   { font-size: 0.78rem; color: #94a3b8; }
.wb-right { display: flex; align-items: center; gap: 0.75rem; }
.wb-resume-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wb-resume-btn:hover { background: #2563eb; }
.wb-dismiss {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
.wb-dismiss:hover { color: #94a3b8; }

/* Streak toast */
.streak-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(135deg, #1e1e2e 0%, #16213e 100%);
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 300px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.streak-toast.show { transform: translateY(0); opacity: 1; }
.streak-toast-flame { font-size: 1.75rem; flex-shrink: 0; }
.streak-toast-body { display: flex; flex-direction: column; flex: 1; }
.streak-toast-body strong { font-size: 0.88rem; color: #fbbf24; }
.streak-toast-body span   { font-size: 0.78rem; color: #94a3b8; margin-top: 0.1rem; }
.streak-toast-close {
    background: none; border: none; color: #64748b;
    cursor: pointer; font-size: 0.9rem; padding: 0; flex-shrink: 0;
    transition: color 0.15s;
}
.streak-toast-close:hover { color: #94a3b8; }

/* Push opt-in banner */
.push-opt-in-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: 340px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 9990;
    animation: slideUpIn 0.35s ease;
}
@keyframes slideUpIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.push-opt-in-icon { font-size: 1.4rem; flex-shrink: 0; }
.push-opt-in-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.push-opt-in-text strong { font-size: 0.88rem; color: var(--text-primary); }
.push-opt-in-text span   { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.push-opt-in-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.push-opt-in-dismiss {
    background: none; border: none;
    font-size: 0.78rem; color: var(--text-muted);
    cursor: pointer; white-space: nowrap;
    transition: color 0.15s;
}
.push-opt-in-dismiss:hover { color: var(--text-secondary); }

/* Dashboard retention row */
.dashboard-retention-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 0 !important;
}
@media (max-width: 700px) {
    .dashboard-retention-row { grid-template-columns: 1fr; }
}

/* Resume card */
.resume-card {
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(37,99,235,0.04) 100%);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}
.resume-card:hover { border-color: rgba(59,130,246,0.5); }
.resume-card-icon { font-size: 1.4rem; flex-shrink: 0; }
.resume-card-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.resume-card-text strong { font-size: 0.88rem; color: var(--text-primary); }
.resume-card-text span   { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tool of the Day card */
.totd-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(217,119,6,0.04) 100%);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 10px;
    padding: 1.6rem 1.25rem 1rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}
.totd-card:hover { border-color: rgba(245,158,11,0.5); }
.totd-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #f59e0b;
    background: rgba(245,158,11,0.12);
    border-radius: 0 10px 0 6px;
    padding: 0.2rem 0.55rem;
}
.totd-icon { font-size: 1.5rem; flex-shrink: 0; }
.totd-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.totd-body strong { font-size: 0.88rem; color: var(--text-primary); }
.totd-body span   { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.totd-btn { flex-shrink: 0; }

/* Adjust top-nav when welcome-back banner is shown */
body.has-wb-banner .top-nav { top: 37px; }

/* ─── Embedded Tool Widget (used on tutorial/landing pages) ──────────────── */
.embedded-tool-section {
    margin: 2.5rem 0;
    border: 1px solid var(--border-color, #2d3748);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary, #1a1f2e);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.embedded-tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary, #1a1f2e);
    border-bottom: 1px solid var(--border-color, #2d3748);
    gap: 0.75rem;
}
.embedded-tool-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.embedded-tool-title .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    display: inline-block;
}
.embedded-tool-open-link {
    font-size: 0.78rem;
    color: #3b82f6;
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(59,130,246,0.4);
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.embedded-tool-open-link:hover {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}
.embedded-tool-frame {
    width: 100%;
    border: none;
    display: block;
    min-height: 520px;
    background: var(--bg-primary, #0d1117);
}
@media (max-width: 600px) {
    .embedded-tool-frame { min-height: 620px; }
}



