#fullscreenToggleBtn {
    position: fixed;
    top: 50px;
    right: 85px !important;
    z-index: 55;
    padding: 8px 15px;
    border: 1px solid #0f97c8;
    background-color: #e0e0e0de;
    color: #333;
    font-size: 0.9em;
    font-weight: normal;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#fullscreenToggleBtn:hover {
    background-color: #a4a4a4;
    transform: translateY(-2px);
}

.tool-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    align-items: stretch;
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.panel-header h3 {
    font-size: 1.2em;
    color: #007bff;
    margin: 0;
    padding: 0;
    border-bottom: none;
}

#jsonEditorInput,
#jsonTreeOutput {
    width: 100%;
    height: 450px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    box-sizing: border-box;
    flex-grow: 1;
    overflow-y: scroll;
}

.editor-panel>.controls {
    margin-top: auto;
}

#jsonTreeOutput>.jsoneditor {
    height: 100% !important;
    width: 100% !important;
    border: none !important;
}

.controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 5px;
}

.controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    flex-grow: 1;
}

#loadBtn {
    background-color: #17a2b8;
    color: white;
}

#loadBtn:hover {
    background-color: #138496;
}

#formatBtn {
    background-color: #28a745;
    color: white;
}

#formatBtn:hover {
    background-color: #218838;
}

#clearBtn {
    background-color: #dc3545;
    color: white;
}

#clearBtn:hover {
    background-color: #c82333;
}

#copyFormattedBtn {
    background-color: #007bff;
    color: white;
}

#copyFormattedBtn:hover {
    background-color: #0056b3;
}

#copyMinifiedBtn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

#copyMinifiedBtn:hover {
    background-color: #ddd;
}

#downloadBtn {
    background-color: #ffc107;
    color: #212529;
}

#downloadBtn:hover {
    background-color: #e0a800;
}

/* SEO Toggle */
#seo-toggle-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ccc;
}

@media (max-width: 950px) {
    #fullscreenToggleBtn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .tool-grid {
        flex-direction: column;
    }
}


html.is-fullscreen,
body.is-fullscreen,
html.is-fullscreen-active,
body.is-fullscreen-active {
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    height: 100vh !important;
    padding-bottom: 0 !important;
}

.container.is-fullscreen>#main-title-bar,
.container.is-fullscreen>#seo-toggle-wrapper,
.container.is-fullscreen .panel-header h3 {
    display: none !important;
}

.container.is-fullscreen #fullscreenToggleBtn {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 10000;
    background-color: #0f97c8;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.container.is-fullscreen #fullscreenToggleBtn:hover {
    background-color: #0d84b2;
    transform: translateY(-2px);
}

html.dark .container.is-fullscreen {
    background-color: #1a1a1a;
}

.container.is-fullscreen .tool-grid {
    flex-grow: 1;
    display: flex;
    gap: 10px;
    margin: 0;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
    overflow-y: hidden !important;
}

.container.is-fullscreen .editor-panel {
    flex: 1 1 50%;
    max-width: 50%;
    width: 50%;
    overflow-y: hidden;
}

.container.is-fullscreen #jsonEditorInput,
.container.is-fullscreen #jsonTreeOutput {
    height: auto;
    min-height: 0;
    margin-bottom: 0 !important;
    flex-grow: 1;
    overflow-y: scroll;
}

.container.is-fullscreen .editor-panel>.controls {
    margin-top: auto;
    padding-bottom: 1px;
    gap: 0 !important;
    flex-shrink: 0;
}

html.dark #jsonTreeOutput .jsoneditor-text {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

html.dark #jsonTreeOutput .jsoneditor-text .ace_content,
html.dark #jsonTreeOutput .jsoneditor-text .ace_content * {
    color: #e0e0e0 !important;
}

html.dark #jsonTreeOutput .ace_gutter {
    background-color: #1a1a1a !important;
    color: #6c757d !important;
}

html.dark #jsonTreeOutput .ace_comment,
html.dark #jsonTreeOutput .ace_string,
html.dark #jsonTreeOutput .ace_numeric,
html.dark #jsonTreeOutput .ace_keyword {
    color: #a9b7c6 !important;
}


body:has(#tool-wrapper > .container.is-fullscreen) {
    overflow-y: hidden !important;
    height: 100vh !important;
}

body:has(#tool-wrapper > .container.is-fullscreen)>.ad-block {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 728px !important;
    height: 60px !important;
    line-height: 60px !important;
}

body:has(#tool-wrapper > .container.is-fullscreen) .ad-large-desktop {
    display: none !important;
}

body:has(#tool-wrapper > .container.is-fullscreen) .ad-medium-desktop {
    display: block !important;
}

body:has(#tool-wrapper > .container.is-fullscreen) .ad-mobile {
    display: none !important;
}

body:has(#tool-wrapper > .container.is-fullscreen)>footer,
body:has(#tool-wrapper > .container.is-fullscreen)>#sidebar {
    display: none !important;
}

#tool-wrapper:has(> .container.is-fullscreen) {
    margin-left: 0px !important;
    height: 100vh !important;
}

.container.is-fullscreen #jsonEditorInput,
.container.is-fullscreen #jsonTreeOutput {
    border: none;
}
