* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

:root {
    --bg: #0b1116;
    --bg-alt: #0f1721;
    --surface: #111a24;
    --surface-strong: #172434;
    --card-bg: #111f2b;
    --text-primary: #e5edf5;
    --text-secondary: #9fb0c2;
    --text-muted: #7c8a9a;
    --accent: #22d3ee;
    --accent-2: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --border-color: rgba(148, 163, 184, 0.18);
    --shadow: 0 30px 60px rgba(9, 14, 21, 0.35);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.3);
}

html[data-theme="light"] {
    --bg: #f3f6fb;
    --bg-alt: #e9eef5;
    --surface: #f9fbff;
    --surface-strong: #eef3f9;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #425466;
    --text-muted: #6b7b8f;
    --accent: #0ea5b7;
    --accent-2: #d97706;
    --border-color: rgba(15, 23, 42, 0.14);
    --shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] {
    background: #f3f6fb;
}

html {
    background: #0b1116;
    min-height: 100%;
}

body {
    font-family: "Spectral", "Georgia", serif;
    background: radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 55%),

        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.08), transparent 45%),

        linear-gradient(140deg, #0b1116 0%, #0b1220 50%, #0a0f16 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 16px;
    position: relative;
}

html[data-theme="light"] body {
    background: radial-gradient(circle at top, rgba(14, 165, 183, 0.12), transparent 55%),
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.12), transparent 45%),
        linear-gradient(135deg, #f3f6fb 0%, #eef3f9 50%, #e7edf5 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

html[data-theme="light"] body::after {
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
    opacity: 0.2;
}

.appetenza {
    font-family: 'Berlin Sans FB', sans-serif !important;
    
    text-decoration: none !important;
}


a {

    color: inherit;
    text-decoration: none;

}

.container {

    max-width: 1280px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(148, 163, 184, 0.08);

}

.home .container {
    background: rgba(13, 20, 28, 0.92);
}

html[data-theme="light"] .container {
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .home .container {
    background: rgba(248, 250, 252, 0.95);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease;

}

.logo-link:hover {

    transform: translateY(-1px);

}

.logo {

    height: 40px;
    width: auto;

}

.site-header {

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 20px;
    position: relative;

}

.site-header .logo-link {

    grid-column: 1;

}

.site-header .nav-toggle {

    grid-column: 3;
    align-self: center;
    margin-top: 0;

}

.site-header .site-nav {

    grid-column: 1 / -1;
    width: 100%;

}

.site-header .header-right {

    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;

}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-primary);
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle:hover {
    background: rgba(34, 211, 238, 0.18);
    color: var(--accent);
    transform: translateY(-1px);
}

html[data-theme="light"] .theme-toggle {
    background: rgba(14, 165, 183, 0.12);
}

html[data-theme="light"] .theme-toggle::before {
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.link-pill {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 0.95em;

}

.home-content {

    padding: 12px 20px 28px;

}

.hero {
    background: linear-gradient(140deg, rgba(20, 30, 44, 0.9), rgba(12, 18, 26, 0.95));
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

html[data-theme="light"] .hero {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(240, 245, 251, 0.95));
    border-color: rgba(15, 23, 42, 0.08);
}

.hero-grid {

    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: center;

}

.hero-grid > * {

    min-width: 0;

}

.eyebrow {

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    font-size: 0.75em;
    margin-bottom: 12px;

}

.hero h1 {

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 2.1em;
    line-height: 1.15;
    margin-bottom: 14px;

}

.lead {

    color: var(--text-secondary);
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 24px;

}

.hero-actions {

    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;

}

.hero-metrics {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;

}

.metric {
    background: rgba(17, 31, 43, 0.7);
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(34, 211, 238, 0.12);
}

html[data-theme="light"] .metric {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(14, 165, 183, 0.2);
}

.metric-value {
    display: block;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 1.4em;
    color: var(--accent);

}

.metric-label {

    color: var(--text-muted);
    font-size: 0.9em;

}

.hero-panel {
    background: rgba(9, 14, 20, 0.85);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
    min-width: 0;
}

html[data-theme="light"] .hero-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(14, 165, 183, 0.08);
}

.panel-title {

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 12px;

}

.hero-panel pre {
    font-family: "Courier New", monospace;
    font-size: 0.95em;
    color: var(--accent);
    background: rgba(12, 18, 26, 0.8);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 238, 0.1);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

html[data-theme="light"] .hero-panel pre {
    background: rgba(232, 242, 249, 0.9);
    border-color: rgba(14, 165, 183, 0.2);
    color: #0e7490;
}

.panel-note {

    color: var(--text-muted);
    font-size: 0.85em;
    margin-top: 12px;

}

.section-header {

    text-align: left;
    margin: 28px 0 18px;

}

.section-header h2{

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 1.6em;
    margin-bottom: 8px;

}
.faq-section .section-header h1 {
    text-align: center;

    font-family: "system-ui", "-apple-system", "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 1.6em;
    margin-bottom: 8px;

}


.section-header p {

    color: var(--text-secondary);
    max-width: 680px;

}

.tools-section {

    margin-top: 36px;

}

.tools-grid {

    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;

}

.tool-card {
    background: linear-gradient(140deg, rgba(20, 30, 42, 0.9), rgba(14, 22, 32, 0.9));
    border-radius: 16px;
    padding: 24px;
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

html[data-theme="light"] .tool-card {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(236, 243, 249, 0.95));
    border-color: rgba(15, 23, 42, 0.08);
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 16px 40px rgba(7, 12, 18, 0.4);
}

html[data-theme="light"] .tool-card:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.tool-icon {

    font-size: 2.6em;
    margin-bottom: 12px;

}

.tool-card h2 {

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 1.4em;

}

.tool-card p {

    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;

}

.tool-btn {

    color: var(--accent);
    font-weight: 600;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;

}

.features-section {
    margin-top: 28px;
    background: rgba(17, 31, 43, 0.6);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

html[data-theme="light"] .features-section {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.08);
}

.features-layout {

    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;

}

.features-prose h3 {

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    color: var(--accent);
    margin: 24px 0 12px;
    font-size: 1.25em;

}

.features-prose p {

    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;

}

.features-prose ul {

    margin: 16px 0 22px 20px;
    color: var(--text-secondary);

}

.features-prose li {

    margin-bottom: 10px;
    line-height: 1.6;

}

.features-aside {

    display: flex;
    flex-direction: column;
    gap: 18px;
    position: static;
    top: auto;
    align-self: stretch;

}

.aside-card {
    background: rgba(10, 16, 24, 0.9);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(34, 211, 238, 0.14);
}

html[data-theme="light"] .aside-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(14, 165, 183, 0.18);
}

.aside-card h4 {

    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    margin-bottom: 10px;
    color: var(--text-primary);

}

.aside-card p {

    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.6;

}

.aside-tags {

    display: flex;
    flex-wrap: wrap;
    gap: 8px;

}

.aside-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85em;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);
}

html[data-theme="light"] .aside-tags span {
    background: rgba(14, 165, 183, 0.12);
    color: #0e7490;
}

.site-footer {
    background: rgba(10, 16, 24, 0.85);
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
}

html[data-theme="light"] .site-footer {
    background: rgba(248, 250, 252, 0.95);
    border-top-color: rgba(15, 23, 42, 0.08);
}

.btn {

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    font-weight: 600;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    min-height: 44px;
    line-height: 1;
    text-align: center;

}

.btn:hover {

    transform: translateY(-2px);

}

.btn-primary {

    background: var(--accent);
    color: #07131c;
    box-shadow: 0 10px 18px rgba(34, 211, 238, 0.22);

}

.btn-primary:hover {

    background: #2ce1f6;

}

.btn-secondary {
    background: rgba(245, 158, 11, 0.2);
    color: #ffbf55;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

html[data-theme="light"] .btn-secondary {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.4);
}

.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.25);
}

html[data-theme="light"] .btn-secondary:hover {
    background: rgba(217, 119, 6, 0.18);
    border-color: rgba(217, 119, 6, 0.55);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

html[data-theme="light"] .btn-outline {
    border-color: rgba(15, 23, 42, 0.25);
}

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

.btn-ghost {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

html[data-theme="light"] .btn-ghost {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
}

.btn-danger {

    background: #f05252;
    color: #fff;

}

.btn-info {

    background: #0ea5e9;
    color: white;

}

body:not(.home) header {
    background: linear-gradient(135deg, #122033, #1a2b3a);
    padding: 20px;
    text-align: left;
    position: relative;
}

html[data-theme="light"] body:not(.home) header {
    background: linear-gradient(135deg, #f5f8fc, #e7eef6);
}

body:not(.home) header h1 {

    font-size: 2.2em;
    margin-bottom: 10px;

}

.subtitle {

    font-size: 1.1em;
    opacity: 0.9;

}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    font-size: 1em;
    opacity: 0.9;
    transition: opacity 0.3s;

}

html[data-theme="light"] .back-link {
    color: #0f172a;
}

.back-link:hover {

    opacity: 1;

}

/* Tool Page Styles */

.tool-content {

    padding: 20px;

}

.controls {

    margin-bottom: 20px;

}

.controls h2 {

    margin-bottom: 15px;
    color: var(--accent);

}

.button-group {

    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;

}

.top-controls .button-group {

    justify-content: center;

}

.top-controls .indent-control,

.top-controls .toggle-control {

    justify-content: center;

}

.top-controls .export-options {

    justify-content: center;

}

.btn:hover {

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

}

.btn-secondary:hover {

    border-color: rgba(245, 158, 11, 0.8);

}

.btn-danger:hover {

    background: #dc2626;

}

.btn-info:hover {

    background: #0891b2;

}

.indent-control,

.toggle-control {

    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95em;
    padding: 0 10px;

}

.indent-control input[type="number"] {

    width: 60px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1em;

}

.toggle-control input[type="checkbox"] {

    width: 18px;
    height: 18px;
    cursor: pointer;

}

.editor-container {

    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;

}

.editor-container.with-middle-controls {

    grid-template-columns: 1fr;

}

.editor-container.with-middle-controls .controls {

    margin: 0;
    order: 2;
    align-self: stretch;
    max-width: none;

}

.editor-container.with-middle-controls .input-panel {

    order: 1;

}

.editor-container.with-middle-controls .output-panel {

    order: 3;

}

.editor-container.with-middle-controls .button-group {

    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;

}

.editor-container.with-middle-controls .button-group .btn,

.editor-container.with-middle-controls .button-group .toggle-control,

.editor-container.with-middle-controls .button-group .indent-control {

    width: auto;
    justify-content: center;

}

.editor-container.with-middle-controls .button-group .btn {

    justify-content: center;

}

.editor-container.with-middle-controls .export-options {

    flex-direction: row;
    align-items: center;
    justify-content: center;

}

.editor-panel {

    position: relative;
    display: flex;
    flex-direction: column;

}

.editor-panel h3 {

    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 1.1em;

}

.highlight-container {

    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;

}

.highlight-container.show {

    display: grid;

}

.highlight-panel {

    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);

}

.highlight-panel h3 {

    padding: 12px 15px;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    font-size: 1em;
    color: var(--text-secondary);

}

.highlight-output {

    margin: 0;
    padding: 15px;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow: auto;
    color: var(--text-primary);
    background: transparent;
    counter-reset: line;

}

.highlight-output .line {

    display: block;
    padding: 2px 8px;
    margin: 1px 0;
    border-radius: 3px;
    position: relative;

}

.highlight-output .line::before {

    counter-increment: line;
    content: counter(line);
    display: inline-block;
    width: 32px;
    margin-right: 10px;
    color: var(--text-muted);
    text-align: right;

}

.highlight-output .line-removed {

    background-color: rgba(239, 68, 68, 0.35);
    border-left: 4px solid #ef4444;

}

.highlight-output .line-added {

    background-color: rgba(16, 185, 129, 0.35);
    border-left: 4px solid #10b981;

}

.highlight-output .line-normal {

    opacity: 0.7;

}

.json-editor {

    width: 100%;
    min-height: 400px;
    padding: 15px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;

}

.json-editor:focus {

    outline: none;
    border-color: var(--accent);

}

.json-editor::placeholder {

    color: #64748b;

}

.copy-btn {

    position: absolute;
    top: 40px;
    right: 10px;
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;

}

.copy-btn:hover {

    background: #059669;

}

.status-message {

    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 500;
    display: none;

}

.status-message.show {

    display: block;
    animation: slideIn 0.3s ease;

}

@keyframes slideIn {

    from {

        opacity: 0;
        transform: translateX(-10px);
    }


    to {

        opacity: 1;
        transform: translateX(0);
    }


}

.status-message.success {

    background: #16a34a;
    border-left: 4px solid #059669;
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04) inset;

}

.status-message .status-dismiss {

    margin-left: 12px;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;

}

.status-message .status-dismiss:hover {

    opacity: 0.85;

}

.status-message.error {

    background: rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--danger-color);
    color: #fca5a5;

}

.status-message.warning {

    background: rgba(245, 158, 11, 0.2);
    border-left: 4px solid var(--warning-color);
    color: #fcd34d;

}

.details-panel {

    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: none;

}

.details-panel.show {

    display: block;

}

.details-panel h3 {

    color: var(--accent);
    margin-bottom: 15px;

}

.details-panel ul {

    list-style: none;
    padding-left: 0;

}

.details-panel li {

    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);

}

.details-panel li:last-child {

    border-bottom: none;

}

/* Editor gutter (line numbers) */

.editor-with-gutter {

    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--card-bg);
    height: 420px;
    align-items: stretch;

}

.gutter {

    width: 48px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-muted);
    padding: 10px 6px;
    text-align: right;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
    user-select: none;
    overflow: hidden;

}

.editor-textarea {

    flex: 1;
    border: none;
    outline: none;
    height: 100%;
    box-sizing: border-box;
    resize: none;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    background: transparent;
    color: var(--text-primary);
    overflow: auto;

}

.editor-textarea:focus {

    outline: none;

}

.compare-results {

    margin-top: 20px;
    display: none;

}

.compare-results.show {

    display: block;

}

.diff-section {

    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);

}

.diff-section h3 {

    margin-bottom: 15px;
    color: var(--accent);

}

.diff-item {

    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;

}

.diff-item.added {

    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid var(--success-color);

}

.diff-item.removed {

    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid var(--danger-color);

}

.diff-item.modified {

    background: rgba(245, 158, 11, 0.15);
    border-left: 3px solid var(--warning-color);

}

.diff-path {

    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 5px;

}

.diff-value {

    color: var(--text-primary);

}

/* Tree View Styles */

.tree-view-container {

    display: none;
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;

}

.tree-view-container.show {

    display: block;

}

.tree-view-container h3 {

    padding: 15px 20px;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    color: var(--accent);

}

.tree-view {

    padding: 15px 20px;
    max-height: 500px;
    overflow: auto;
    font-family: "Courier New", monospace;
    font-size: 14px;

}

.tree-node {

    margin-left: 0;

}

.tree-node .tree-node {

    margin-left: 20px;

}

.tree-node-header {

    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;

}

.tree-node-header:hover {

    background: rgba(34, 211, 238, 0.1);

}

.tree-node-header.selected {

    background: rgba(34, 211, 238, 0.18);
    outline: 1px solid rgba(34, 211, 238, 0.25);

}

.tree-leaf {

    cursor: default;

}

.tree-toggle {

    display: inline-block;
    width: 16px;
    margin-right: 6px;
    color: var(--text-secondary);
    font-size: 10px;
    transition: transform 0.2s;

}

.tree-node.collapsed > .tree-node-header .tree-toggle {

    transform: rotate(-90deg);

}

.tree-node.collapsed > .tree-children {

    display: none;

}

.tree-indent {

    display: inline-block;
    width: 16px;
    margin-right: 6px;
    color: var(--border-color);
    font-size: 8px;

}

.tree-key {

    color: #f472b6;
    font-weight: 600;

}

.tree-separator {

    color: var(--text-secondary);

}

.tree-type {

    margin-left: 8px;
    font-size: 12px;
    opacity: 0.7;

}

.tree-type-array {

    color: #fbbf24;

}

.tree-type-object {

    color: #60a5fa;

}

.tree-value {

    margin-left: 4px;

}

.tree-value-string {

    color: #4ade80;

}

.tree-value-number {

    color: #60a5fa;

}

.tree-value-boolean {

    color: #f472b6;

}

.tree-value-null {

    color: #94a3b8;
    font-style: italic;

}

.tree-children {

    border-left: 1px dashed var(--border-color);
    margin-left: 8px;

}

footer {

    background: var(--card-bg);
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);

}

@media (min-width: 768px) {

    

    body {

        padding: 24px;
    }

    .container {

        border-radius: 16px;
    }

    .logo {

        height: 46px;
    }

    .site-header {

        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 24px 28px 12px;
    }

    .site-header .logo-link {

        grid-column: 1;
    }

    .site-header .site-nav {

        grid-column: 2;
        justify-content: center;
    }

    .site-header .header-right {

        grid-column: 3;
        justify-content: flex-end;
    }

    .site-header .site-nav {

        width: auto;
    }

    .site-header .header-right {

        width: auto;
        display: flex;
    }

    .home-content {

        padding: 16px 28px 32px;
    }

    .hero {

        padding: 28px;
        border-radius: 18px;
    }

    .hero h1 {

        font-size: 2.4em;
    }

    .section-header h2 {

        font-size: 1.8em;
    }

    .tools-grid {

        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .features-section {

        padding: 28px;
    }

    .editor-container.with-middle-controls .button-group {

        flex-wrap: nowrap;
    }


}

@media (min-width: 980px) {

    

    .home-content {

        padding: 20px 36px 40px;
    }

    .hero-grid {

        grid-template-columns: 1.2fr 0.8fr;
        gap: 32px;
    }

    .hero h1 {

        font-size: 2.8em;
    }

    .section-header {

        margin: 40px 0 24px;
    }

    .section-header h2 {

        font-size: 2em;
    }

    .tools-section {

        margin-top: 36px;
    }

    .tools-grid {

        gap: 22px;
    }

    .features-section {

        margin-top: 40px;
        padding: 32px;
    }

    .features-layout {

        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        gap: 32px;
    }

    .features-aside {

        position: sticky;
        top: 20px;
    }

    .tool-content {

        padding: 30px;
    }

    .editor-container {

        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .editor-container.with-middle-controls {

        grid-template-columns: minmax(0, 1fr) minmax(180px, auto) minmax(0, 1fr);
    }

    .editor-container.with-middle-controls .controls {

        order: 0;
        align-self: center;
    }

    .editor-container.with-middle-controls .input-panel,

    .editor-container.with-middle-controls .output-panel {

        order: 0;
    }

    .editor-container.with-middle-controls .button-group {

        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .editor-container.with-middle-controls .button-group .btn,

    .editor-container.with-middle-controls .button-group .toggle-control,

    .editor-container.with-middle-controls .button-group .indent-control {

        width: 100%;
        justify-content: space-between;
    }

    .editor-container.with-middle-controls .button-group .btn {

        justify-content: center;
    }

    .editor-container.with-middle-controls .export-options {

        flex-direction: column;
        align-items: flex-start;
    }


}

.site-nav {

    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    color: var(--text-secondary);

}

.site-nav a {

    padding: 6px 10px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;

}

.site-nav a:hover {

    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);

}

.site-nav .theme-toggle {

    display: none;
    padding: 6px 10px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 600;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;

}

.site-nav .theme-toggle:hover {

    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);

}

@media (max-width: 768px) {

    .header-right .theme-toggle {

        display: none;
    }


    .site-nav .theme-toggle {

        display: inline-flex;
    }


}


body:not(.home) header .site-nav {

    justify-content: center;
    margin-top: 12px;

}


@media (max-width: 1000px) {
    .home-header-right
    {
        display: flex !important;
    }

    .home-header-right .page-icon {
        display: none !important;
    }

    .site-header .header-right {
    grid-column: 1 / -1 !important;
    width: 100%;
    display: flex;
    justify-content: center;

}


    

}


@media (max-width: 768px) {
    .home-header-right
    {
        display: flex !important;
    }

    .home-header-right .page-icon {
        display: none !important;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }


    body:not(.home) header .site-nav {

        justify-content: flex-start;
    }


}

.faq-section {
    margin-top: 36px;
    padding: 28px;
    border-radius: 16px;
    background: rgba(10, 16, 24, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

html[data-theme="light"] .faq-section {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
}

.faq-list {

    display: grid;
    gap: 12px;

}

.faq-list details {
    background: rgba(17, 31, 43, 0.7);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(34, 211, 238, 0.12);
}

html[data-theme="light"] .faq-list details {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(14, 165, 183, 0.2);
}

.faq-list summary {

    cursor: pointer;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    color: var(--text-primary);

}

.faq-list p {

    margin-top: 8px;
    color: var(--text-secondary);
    line-height: 1.6;

}

.select-control {

    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95em;

}

.auto-format-note {

    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.95em;

}

.export-options {

    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.95em;

}

.export-options label {

    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;

}

.nav-toggle {

    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    cursor: pointer;
    align-self: flex-start;
    margin-left: auto;
    margin-right: 0;
    margin-top: 2px;

}

.nav-toggle span {

    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 999px;
    margin: 0 auto;

}

.site-nav {

    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;

}

.site-nav.open {

    display: flex;

}

.site-nav a.active {

    background: rgba(34, 211, 238, 0.16);
    color: var(--accent);

}

@media (min-width: 768px) {

    

    .nav-toggle {

        display: none;
    }

    .site-nav {

        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
        position: static;
        box-shadow: none;
    }


}

@media (max-width: 768px) {

    .site-nav {

        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(17, 26, 36, 0.72);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 14px 16px;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        border-bottom: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(9, 14, 21, 0.18);
        z-index: 5;
        display: flex;
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        transform-origin: top right;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    html[data-theme="light"] .site-nav {

        background: rgba(248, 250, 252, 0.82);
        border-top-color: rgba(15, 23, 42, 0.12);
        border-bottom-color: rgba(15, 23, 42, 0.12);
    }

    .site-nav.open {

        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }


}


   
.header-right {

    display: flex;
    align-items: center;
    justify-content: flex-end;

}

.page-icon {

    /* width: 36px; */

    height: 36px;
    object-fit: contain;
    opacity: 0.9;

}

@media (min-width: 768px) {

    

    .site-header {

        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 16px;
    }

    .site-nav {

        justify-content: center;
    }


}

.contact-form {

    display: grid;
    gap: 14px;
    max-width: 560px;

}

.contact-form label {

    display: grid;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.95em;

}

.contact-form input,

.contact-form textarea {

    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95em;

}

.contact-form input:focus,

.contact-form textarea:focus {

    outline: none;
    border-color: var(--accent);

}

.footer-links {

    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    font-size: 0.95em;

}

.footer-links a {

    color: var(--text-secondary);

}

.footer-links a:hover {

    color: var(--accent);

}

.page-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(11, 17, 22, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    transition: opacity 0.25s ease;
}

.page-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loader .loader-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: var(--accent);
    animation: spin 0.9s linear infinite;
}

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

}

html[data-theme="light"] .page-loader {
    background: rgba(248, 250, 252, 0.78);
}


.error-page .tool-content {
    padding: 20px;
}

.error-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(17, 31, 43, 0.92), rgba(10, 16, 24, 0.96));
    border-radius: 18px;
    border: 1px solid rgba(34, 211, 238, 0.16);
}

.error-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.16), transparent 50%);
    opacity: 0.6;
    pointer-events: none;
}

html[data-theme="light"] .error-hero {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(236, 243, 249, 0.95));
    border-color: rgba(14, 165, 183, 0.2);
}

.error-layout {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    align-items: center;
}

.error-code {
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: clamp(3.8rem, 12vw, 7rem);
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 8px;
}

.error-title {
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 2.1em;
    margin-bottom: 12px;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 16px;
}

.error-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 0.92em;
    color: var(--text-secondary);
}

.error-links a {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(34, 211, 238, 0.08);
}

html[data-theme="light"] .error-links a {
    background: rgba(14, 165, 183, 0.1);
}

.error-panel {
    background: rgba(9, 14, 20, 0.85);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06);
}

html[data-theme="light"] .error-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(14, 165, 183, 0.2);
}

.error-panel .panel-title {
    margin-bottom: 12px;
}

.error-checklist {
    list-style: none;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    color: var(--text-secondary);
}

.error-checklist li {
    position: relative;
    padding-left: 20px;
    line-height: 1.6;
}

.error-checklist li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.error-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    font-size: 0.85em;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.12);
}

@media (min-width: 900px) {
    .error-layout {
        grid-template-columns: 1.15fr 0.85fr;
    }

    .error-title {
        font-size: 2.4em;
    }
}
