kbd {
    background-color: #e7e7e7;
    background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);
    background-image: linear-gradient(#fefefe, #e7e7e7);
    background-repeat: repeat-x;
    display: inline-lsblock;
    padding: 3px 5px;
    font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
    line-height: 10px;
    color: #000;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
}

.key.arrow {
    font-size: 15px;
    font-weight: bold
}

#div_toggle_keyboard_shortcuts {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 3;
}

#div_keyboard_shortcuts {
    position: absolute;
    bottom: 0;
    right: 0;
    line-height: 30px;
    border: 1px solid #ccc;
    padding: 10px 20px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    z-index: 2;
}

.alpha60 {
    /* Fallback for web browsers that doesn't support RGBa */
    background:rgb(255,255,255);
    /* For IE8 and below */
    background: transparent\9;
    /* RGBa with 0.6 opacity */
    background:rgba(255,255,255,0.6);
    /* For IE 5.5 - 7*/
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99FFFFFF,endColorstr=#99FFFFFF);
    /* For IE 6-7 */
    zoom: 1;
}
.alpha60:nth-child(n) {
    /* Don't use filter for IE 9 (Use RGBa Instead) */
    filter: none;
}

body {
    margin: 0;
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top left, #eff6ff 0%, #e0f2fe 40%, #e2e8f0 100%);
    color: #0f172a;
    min-height: 100vh;
}

#div_connection_info {
    position: absolute;
    bottom: 24px;
    left: 24px;
    padding: 28px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    z-index: 4;
    max-width: min(420px, calc(100% - 48px));
    color: #0f172a;
}

.connection-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
}

.connection-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.connection-header p {
    margin: 6px 0 18px 0;
    font-size: 13px;
    color: #475569;
}

.connection-details {
    margin: 0;
    display: grid;
    gap: 14px;
}

.connection-details dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 4px;
}

.connection-details dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    min-height: 32px;
}

#overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: none;
    z-index: 1;
}

#div_toggle_cypher_query {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 6;
}

#div_toggle_cypher_query button {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 34px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#div_toggle_cypher_query button:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
}

#div_cypher_query {
    direction:ltr;
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 5;
    width: min(420px, calc(100% - 48px));
    padding: 28px;
    border-radius: 20px;
    border: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
}

.control-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(238, 246, 255, 0.92) 100%);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.panel-title h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.panel-title p {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.language-toggle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-toggle .ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #0f172a;
    transition: all 0.2s ease;
}

.language-toggle .ghost:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.query-type {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.query-type label {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.query-type select {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="12" viewBox="0 0 18 12"><path fill="%2364748b" d="M1.41 0L9 7.59 16.59 0 18 1.41l-9 9-9-9z"/></svg>') no-repeat right 12px center;
    cursor: pointer;
}

.query-sections {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.query-section {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.query-section.active {
    display: flex;
}

.query-section label {
    font-weight: 500;
    color: #1e293b;
}

.query-section input,
.query-section select {
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}

.field-pair {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.query-actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.query-actions .primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.query-actions .primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
}

.query-actions .hint {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

#heb_donate_req{
    direction:rtl;
    position: absolute;
    top: 0;
    left: 0;
    line-height: 30px;
    text-align: center;
    border: 4px solid red;
    padding: 10px 20px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    z-index: 15;
    background-color:#ffff99;
    width: -moz-calc(100% - 100px);
    width: -webkit-calc(100% - 100px);
    width: calc(100% - 100px);
}


.ui-autocomplete {
    font-size: 12px;
    direction: rtl;
    max-width: 360px;
    width: auto !important;
    border-radius: 12px;
    overflow: hidden;
}

.ui-autocomplete-input {
    font-size: 14px;
    width: 100%;
    direction: rtl;
}

#select_torah {
    width: 100%;
    font-size: 14px;
}

#select_depth_1 {
    font-size: 14px;
}

#select_depth_2 {
    font-size: 14px;
}

#button_search {
    font-size: 14px;
}

.left {
    display: inline-block;
}

#div_status {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid #ccc;
    padding: 10px 20px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 30px;
    z-index: 10;
    display: none;
}

#div_version {
    position: absolute;
    bottom: 0;
    left: 0;
    color: #cccccc;
    letter-spacing: 1px;
    z-index: 5;
}

#graph-container {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    position: absolute;
    max-width: 100%;
}

/*Uncomment to remove browser outline on focus*/
/*#graph-container:focus {
    outline: none;
}*/

th {
    display: table-cell;
    vertical-align: top;
    font-weight: bold;
    text-align: center;
}

/* ===== Tab Panel Layout Styles ===== */

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Graph Container - updated */
#graph-container {
    flex: 1;
    background: radial-gradient(circle at top left, #eff6ff 0%, #e0f2fe 40%, #e2e8f0 100%);
    position: relative;
}

/* Panel Container */
.panel-container {
    width: 400px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    order: 1;
}

.panel-container.collapsed {
    width: 0;
    border: none;
}

#graph-container {
    order: 2;
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.panel-tab {
    flex: 1;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    position: relative;
    transition: all 0.2s ease;
}

.panel-tab:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.5);
}

.panel-tab.active {
    color: #2563eb;
    background: white;
}

.panel-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

/* Panel Content */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: none;
}

.panel-content.active {
    display: block;
}

/* Update existing panel styles */
#div_cypher_query {
    position: static;
    width: 100%;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

#div_connection_info {
    position: static;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    background: transparent;
}

/* Toggle Button */
.toggle-panel-btn {
    position: fixed;
    top: 50%;
    left: 400px;
    transform: translateY(-50%);
    width: 40px;
    height: 100px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 16px rgba(37, 99, 235, 0.4);
    z-index: 10;
    transition: all 0.3s ease;
}

.toggle-panel-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 2px 0 20px rgba(37, 99, 235, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.toggle-panel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.toggle-panel-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    transform: rotate(180deg);
    stroke: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.panel-container.collapsed .toggle-panel-btn {
    left: 0;
    border-radius: 0 12px 12px 0;
}

.panel-container.collapsed .toggle-panel-btn svg {
    transform: rotate(0deg);
}

/* Add a subtle pulse animation when panel is collapsed */
.panel-container.collapsed .toggle-panel-btn {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 2px 0 16px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 2px 0 24px rgba(37, 99, 235, 0.6);
    }
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    transition: background 0.2s ease;
}

.resize-handle:hover,
.resize-handle.dragging {
    background: #2563eb;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .panel-container {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        order: 1;
    }

    .panel-container.collapsed {
        height: 0;
        border: none;
    }

    #graph-container {
        order: 2;
    }

    .toggle-panel-btn {
        top: 50vh;
        right: auto;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 40px;
        border-radius: 0 0 12px 12px;
    }

    .toggle-panel-btn:hover {
        transform: translate(-50%, -50%) scale(1.05);
    }

    .toggle-panel-btn:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

    .panel-container.collapsed .toggle-panel-btn {
        top: 48px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0 0 12px 12px;
    }

    .panel-container.collapsed .toggle-panel-btn:hover {
        transform: translateX(-50%) scale(1.05);
    }

    .panel-container.collapsed .toggle-panel-btn:active {
        transform: translateX(-50%) scale(0.95);
    }

    .toggle-panel-btn svg {
        transform: rotate(-90deg);
    }

    .panel-container.collapsed .toggle-panel-btn svg {
        transform: rotate(90deg);
    }

    .resize-handle {
        display: none;
    }
}