#JsonEditonThemesList {
    max-height: 60vh;
    /* Set this to your desired max height */
    overflow-y: auto;
}

@media screen and (max-height: 375px) {
    body {
        position: relative;
        overflow: auto;
    }
}

.card {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
    border-radius: 15px !important;
    background: var(--card-bg) !important;
    border: 2px solid var(--border-color) !important;
    box-shadow: 0 8px 32px var(--shadow-color), 0 0 20px rgba(74, 85, 104, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* .card:hover {
    border-color: var(--primary-color);
    background: var(--card-hover) !important;
} */

.card-body {
    border-radius: 15px !important;
    background: transparent !important;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px !important;
    overflow: hidden;
}

body.dark-mode .card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 32px var(--shadow-color), 0 0 20px rgba(160, 174, 192, 0.1);
}

body.dark-mode .card:hover {
    border-color: var(--primary-color);
}

@media screen and (max-width: 1200px) {
    .card {
        width: 100%;
    }
}

#editorWrapper {
    position: relative;
    flex: 1;
    min-height: 65vh;
    display: flex; 
    flex-direction: column;
    overflow: hidden;
}

@media (min-height: 600px) {
    #editorWrapper {
        min-height: 70vh;
    }
}

@media (min-height: 900px) {
    #editorWrapper {
        min-height: 75vh;
    }
}

#editorWrapper #editor {
    font-family: "Roboto Mono", monospace;
    font-size: 14px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Action Buttons Container */
.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    margin-bottom: 8px;
}

/* Icon Button Styling */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0 8px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #808080, #696969) !important;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(128, 128, 128, 0.2);
    position: relative;
    overflow: visible;
    white-space: nowrap;
}

.icon-btn i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.icon-btn .btn-label {
    position: relative;
    margin-left: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    padding: 0;
    border-radius: 0;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    overflow: hidden;
}

.icon-btn:hover {
    background: linear-gradient(135deg, #696969, #a9a9a9) !important;
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(128, 128, 128, 0.4);
    transform: translateY(-2px);
    width: auto;
    padding: 0 12px;
    gap: 6px;
}

.icon-btn:hover .btn-label {
    opacity: 1;
    max-width: 200px;
    color: rgba(255, 255, 255, 0.95);
    margin-left: 4px;
}

.icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(128, 128, 128, 0.3);
}

/* Dark Mode Icon Button */
body.dark-mode .icon-btn {
    background: linear-gradient(135deg, #c0c0c0, #d3d3d3) !important;
    color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.2);
}

body.dark-mode .icon-btn .btn-label {
    background: transparent;
    color: rgba(0, 0, 0, 0.95);
}

body.dark-mode .icon-btn:hover {
    background: linear-gradient(135deg, #d3d3d3, #e8e8e8) !important;
    color: rgba(0, 0, 0, 1);
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
    width: auto;
    padding: 0 12px;
    gap: 6px;
}

body.dark-mode .icon-btn:hover .btn-label {
    opacity: 1;
    max-width: 200px;
    color: rgba(0, 0, 0, 0.95);
    margin-left: 4px;
}

body.dark-mode .icon-btn:active {
    box-shadow: 0 2px 6px rgba(192, 192, 192, 0.3);
}

.ace-btn {
    border: 2px solid transparent;
    color: rgba(70, 40, 20, 0.95);
    font-family: "Russo One", sans-serif;
    font-size: 1.1em;
    font-weight: 200;
    letter-spacing: 0.1em;
    line-height: 2.5;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0 0.5em;
    position: relative;
    width: 100%;
    margin-bottom: 1em;
    background: linear-gradient(135deg, #d4a574, #c9956f) !important;
    border-radius: 8px;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(160, 120, 80, 0.3);
    overflow: hidden;
}

.ace-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.ace-btn:hover {
    background: linear-gradient(135deg, #c9956f, #b8845a) !important;
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 25px rgba(160, 120, 80, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.ace-btn:hover::before {
    left: 100%;
}

.ace-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(160, 120, 80, 0.3);
}

body.dark-mode .ace-btn {
    color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, #8b5a2b, #a0784d) !important;
    box-shadow: 0 4px 15px rgba(210, 180, 140, 0.2);
}

body.dark-mode .ace-btn:hover {
    background: linear-gradient(135deg, #b8956f, #d2b48c) !important;
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 25px rgba(210, 180, 140, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .ace-btn:active {
    box-shadow: 0 2px 10px rgba(210, 180, 140, 0.3);
}