/* --- START OF FILE style.css --- */

/* --- :ROOT VARIABLES --- */
:root {
    /* Gematria Highlighting & Text */
    --gematria-highlight-37-color: #B00020; /* Default red for 37 */
    --gematria-highlight-73-color: blue;    /* Default blue for 73 */
    --gematria-searched-word-highlight-color: #FDD835; /* Yellow/Gold for searched word */
    --gematria-triangular-text-highlight-color: #FDD835; /* Yellow/Gold for triangular text */
    --gematria-highlight-font-weight: bold;
    --gematria-highlight-font-size-grid: 1.1em;      /* Font size for highlighted numbers in the Word Analysis Grid */
    --gematria-highlight-font-size-divisors: 0.95em; /* Font size for highlighted numbers in the Divisors List */
    /* --gematria-grid-cell-highlight-bg-color: #000000; -- Seems unused, commented out */

    /* Combination Mode */
    --combination-mode-bg: #4CAF50;
    --combination-mode-text: #FFFFFF;
    --combination-clear-button-bg: #f44336;
    --combination-clear-button-text: #FFFFFF;

    /* Layout & Controls Sizing (Desktop) */
    --scrollbar-width-allowance: 17px; /* Default for desktop scrollbars */
    --control-icon-width: 16px;
    --control-icon-padding: 3px;
    --control-group-gap: 5px;
    --edge-padding: 8px;
    --textarea-icon-top-offset: 6px;
    --textarea-icon-right-offset: 2px; /* Reduced to bring closer to scrollbar */
    --textarea-min-height: 70px;

    /* Title Gradient */
    --title-gradient-start: #87CEFA; /* LightSkyBlue */
    --title-gradient-end: #4169E1;   /* RoyalBlue */

    /* Tooltip Variables */
    --tooltip-bg-color: #333333;
    --tooltip-border-color: #555555;
    --tooltip-text-color: #DCDCDC;
    --tooltip-header-color: #00AEEF;
    --tooltip-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    --tooltip-padding: 10px;
    --tooltip-max-width: 280px;

    /* --- Mobile Specific Sizing & Layout Vars --- */
    --scrollbar-width-allowance-mobile: 10px;
    --control-icon-width-mobile: 14px;
    --control-icon-padding-mobile: 2px;
    --control-group-gap-mobile: 4px;
    --edge-padding-mobile: 6px;
    --textarea-min-height-mobile: 60px;
    --textarea-icon-top-offset-mobile: 4px;
    --textarea-icon-right-offset-mobile: 1px;

    /* Mobile Off-Canvas Panel Variables */
    /* --mobile-panel-width: 280px; -- This variable is no longer the primary controller for panel width. Width is 100% on mobile. */
    --mobile-panel-transition-speed: 0.3s;
    --mobile-header-height: 48px; /* Height of the new mobile header */
}

/* --- GENERAL BODY & APP CONTAINER --- */
body {
    background-color: #0E0E0E;
    color: #DCDCDC;
    margin: 0;
    padding: 0;
    height: 100vh; /* Full viewport height */
    overflow: hidden; /* Prevent body scroll on desktop; mobile handles its own scroll */
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    position: relative; /* For off-canvas positioning context */
}

.app-container {
    width: 100%;
    height: 100vh; /* Takes full viewport height */
    display: flex;
    flex-direction: column;
    background-color: #1E1E1E;
    border: 1px solid #3F3F46;
    box-sizing: border-box;
    z-index: 1; /* Base stacking context */
}

/* --- APP HEADER (Desktop) --- */
.app-header {
    background-color: #2D2D30;
    padding: 8px 10px;
    border-bottom: 1px solid #3F3F46;
    flex-shrink: 0; /* Header should not shrink */
    overflow: hidden; /* Keep this to ensure text-overflow works if title somehow overflows its absolute bounds */
    display: flex;
    /* justify-content: space-between; -- MODIFIED */
    justify-content: flex-end; /* Push action links to the right */
    align-items: center;
    position: relative; /* MODIFIED: For absolute positioning of the title */
}

.app-header h1 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-image: linear-gradient(to right, var(--title-gradient-start), var(--title-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent; /* For WebKit browsers */
    @supports not (-webkit-background-clip: text) and (not (background-clip: text)) { /* Fallback for browsers not supporting text gradient */
        color: var(--title-gradient-start);
    }
    /* flex-grow: 1; -- REMOVED */
    position: absolute; /* MODIFIED */
    left: 50%;          /* MODIFIED */
    top: 50%;           /* MODIFIED */
    transform: translate(-50%, -50%); /* MODIFIED */
    max-width: calc(100% - 640px); /* MODIFIED: 100% of header width minus space for links (e.g., 320px) on each side */
    box-sizing: border-box; /* MODIFIED: In case padding is added directly to h1/h2 later */
}

.app-header h2 { /* For help.html header consistency */
    font-size: 1.1em;
    font-weight: bold;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* flex-grow: 1; -- REMOVED */
    color: var(--title-gradient-end);
    position: absolute; /* MODIFIED */
    left: 50%;          /* MODIFIED */
    top: 50%;           /* MODIFIED */
    transform: translate(-50%, -50%); /* MODIFIED */
    max-width: calc(100% - 640px); /* MODIFIED: Consistent with h1 */
    box-sizing: border-box; /* MODIFIED: Consistent with h1 */
}

.app-header .header-action-links {
    flex-shrink: 0;
    margin-left: 10px; /* This provides spacing if there was an element before it; now it primarily acts as margin from parent right edge if justify-content was different. */
    position: relative; /* MODIFIED: To ensure it stays above absolute title if they were to overlap without max-width on title */
    z-index: 1; /* MODIFIED: Same as above */
}

.app-header .header-action-links a {
    color: #DCDCDC;
    text-decoration: none;
    padding: 5px 10px;
    background-color: #3A3D41;
    border: 1px solid #4A4A4A;
    border-radius: 0;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 0.9em;
    white-space: nowrap;
}

.app-header .header-action-links a:hover {
    background-color: #4A4D51;
    border-color: #007ACC;
}

/* --- MOBILE HEADER --- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-header-height);
    background-color: #2D2D30;
    color: #DCDCDC;
    padding: 0 10px;
    box-sizing: border-box;
    border-bottom: 1px solid #3F3F46;
    z-index: 100;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-button {
    background: none;
    border: none;
    color: #DCDCDC;
    font-size: 1.5em;
    padding: 0 10px;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-nav-button:hover {
    background-color: #3A3D41;
}

.mobile-header-title {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--title-gradient-end);
}


/* --- MOBILE MAIN CONTENT WRAPPER --- */
.mobile-main-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* --- MAIN LAYOUT (PANES) --- */
.main-layout {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    width: 100%;
    height: 100%;
    position: relative;
}

.left-pane {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 180px;
    max-width: 25%;
    border-right: 1px solid #3F3F46;
    background-color: #252526;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.right-pane {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 180px;
    max-width: 25%;
    border-left: 1px solid #3F3F46;
    background-color: #252526;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.center-pane {
    flex-grow: 2;
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 350px;
    padding: 15px;
    background-color: #1E1E1E;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}


.pane-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
    position: relative;
}

.pane-title-bar h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.2em;
    color: #DCDCDC;
    flex-grow: 1;
}

.left-pane .pane-title-bar {
    justify-content: center;
}

.left-pane .pane-title-bar h2 {
    flex-grow: 0;
    text-align: center;
}

.right-pane .pane-title-bar h2 {
    font-size: 1.1em;
    text-align: center;
    font-weight: bold;
    width: 100%;
}

.right-pane .pane-title-bar .pane-action-button {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    margin-left: 0;
}

.pane-action-button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    margin-left: 10px;
    flex-shrink: 0;
}

.pane-action-button img {
    width: var(--control-icon-width);
    height: var(--control-icon-width);
    display: block;
    filter: grayscale(30%) opacity(0.7);
    transition: filter 0.2s ease-in-out;
}

.pane-action-button:hover img {
    filter: grayscale(0%) opacity(1);
}

.placeholder-content { border: 1px dashed #555; padding: 20px; text-align: center; color: #777; margin-top: 10px; border-radius: 0; flex-grow: 1; }

/* --- WORD ANALYSIS (LEFT PANE) --- */
.word-analysis-header-fixed { flex-shrink: 0; background-color: #2D2D30; border: 1px solid #3F3F46; border-bottom: none; }
#word-analysis-header-table { width: 100%; border-collapse: collapse; font-size: 0.9em; table-layout: fixed; }

#word-analysis-header-table th {
    color: #00AEEF;
    padding: 0;
    text-align: left;
    vertical-align: middle;
    border-bottom: 2px solid #3F3F46;
    border-right: 1px solid #4A4A4F;
    box-sizing: border-box;
}
#word-analysis-header-table th:last-child { border-right: none; }

#word-analysis-header-table th .th-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
    cursor: help;
}

#word-analysis-header-table th.select-col {
    text-align: center;
    padding: 0;
}

#word-analysis-header-table th:nth-child(1) { width: 25px; }
#word-analysis-header-table th:nth-child(2) { width: 19%; }
#word-analysis-header-table th:nth-child(3) { width: 19%; }
#word-analysis-header-table th:nth-child(4) { width: 19%; }
#word-analysis-header-table th:nth-child(5) { width: 19%; }
#word-analysis-header-table th:nth-child(6) { width: 19%; }


#word-analysis-header-table th.select-col #copy-grid-btn {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.table-header-action-button {
    margin-left: 4px !important;
    padding: 2px !important;
    margin-top: 0;
    margin-bottom: 0;
}
.table-header-action-button img {
    width: calc(var(--control-icon-width) - 2px);
    height: calc(var(--control-icon-width) - 2px);
}


.word-analysis-body-scrollable { flex-grow: 1; overflow-y: auto; background-color: #1E1E1E; border: 1px solid #3F3F46; border-top: none; min-height: 100px; }
#word-analysis-body-table { width: 100%; border-collapse: collapse; font-size: 0.9em; table-layout: fixed; }

#word-analysis-body-table colgroup col:nth-child(1) { width: 5%; min-width: 30px; }
#word-analysis-body-table colgroup col:nth-child(2) { width: 19%; }
#word-analysis-body-table colgroup col:nth-child(3) { width: 19%; }
#word-analysis-body-table colgroup col:nth-child(4) { width: 19%; }
#word-analysis-body-table colgroup col:nth-child(5) { width: 19%; }
#word-analysis-body-table colgroup col:nth-child(6) { width: 19%; }


#word-analysis-body-table tbody td {
    color: #DCDCDC;
    background-color: #1E1E1E;
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #303030;
    border-right: 1px solid #4A4A4F;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}
#word-analysis-body-table tbody td:last-child { border-right: none; }

#word-analysis-body-table td.select-col {
    padding: 6px 4px;
    text-align: center;
}

#word-analysis-body-table td input[type="checkbox"] {
    margin: 0;
    padding: 0;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #666;
    border-radius: 2px;
    background-color: #333;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#word-analysis-body-table td input[type="checkbox"]:checked {
    background-color: #007ACC;
    border-color: #007ACC;
}

#word-analysis-body-table td input[type="checkbox"]:checked::before {
    content: '✔';
    color: white;
    font-size: 12px;
    line-height: 1;
}

#word-analysis-body-table tbody tr:nth-child(even) td { background-color: #222223; }
#word-analysis-body-table tbody tr:hover td { background-color: #3A3D41; }

.searched-word-highlight-grid-text {
    color: var(--gematria-searched-word-highlight-color) !important;
    font-weight: bold;
}

.gematria-highlight-37, .gematria-highlight-73 { font-weight: var(--gematria-highlight-font-weight); }
.gematria-highlight-37 { color: var(--gematria-highlight-37-color) !important; }
.gematria-highlight-73 { color: var(--gematria-highlight-73-color) !important; }
#word-analysis-body-table td.gematria-highlight-73 { font-size: var(--gematria-highlight-font-size-grid); background-color: var(--gematria-highlight-73-color) !important; color: white !important; }
#word-analysis-body-table td.gematria-highlight-37 { font-size: var(--gematria-highlight-font-size-grid); background-color: var(--gematria-highlight-37-color) !important; color: white !important; }
.divisors-list .gematria-highlight-37, .divisors-list .gematria-highlight-73 { font-size: var(--gematria-highlight-font-size-divisors); }

#word-analysis-header-table th.select-col,
#word-analysis-body-table td.select-col { text-align: center; }

#word-analysis-header-table th .th-content-wrapper.th-content-word span,
#word-analysis-body-table td:nth-child(2) { word-break: break-all; }

/* --- VERSE LOADER (CENTER PANE) --- */
.verse-loader-section { background-color: #252526; padding: 10px; border: 1px solid #3F3F46; }
.verse-loader-minimal-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.verse-loader-minimal-controls select, .verse-navigation-controls button { padding: 6px 10px; font-size: 0.9em; color: #DCDCDC; background-color: #333333; border: 1px solid #4A4A4A; border-radius: 0; box-sizing: border-box; width: 100%; }
.verse-loader-minimal-controls select:focus, .verse-navigation-controls button:focus { border-color: #007ACC; box-shadow: none; outline: none; }
.verse-loader-minimal-controls select option { background-color: #333333; color: #DCDCDC; }
.verse-navigation-controls { display: flex; justify-content: space-between; gap: 10px; }
.verse-navigation-controls button { background-color: #3A3D41; cursor: pointer; }
.verse-navigation-controls button:hover { background-color: #4A4D51; }
.verse-navigation-controls button:disabled { background-color: #2D2D30; border-color: #3F3F46; color: #666; cursor: not-allowed; }

/* --- INPUT FIELDS & DISPLAY AREAS (CENTER PANE) --- */
.input-field-wrapper,
.cleaned-text-display-area,
.english-translation-display-area {
    position: relative;
}

#input-text,
.cleaned-up-text-content-div,
#english-translation-content {
    width: 100%;
    box-sizing: border-box;
    padding-top: 8px;
    padding-left: 8px;
    color: #DCDCDC;
    background-color: #252526;
    border: 1px solid #3F3F46;
    border-radius: 0;
    min-height: var(--textarea-min-height);
    height: var(--textarea-min-height);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1em;
    padding-right: calc(var(--control-icon-width) + var(--control-icon-width) + (3 * var(--control-icon-padding)) + var(--textarea-icon-right-offset) + var(--scrollbar-width-allowance) + var(--control-group-gap) + 10px);
    padding-bottom: 8px;
    display: block;
    overflow-y: auto;
}

#input-text,
#english-translation-content {
    resize: none;
}

.cleaned-up-text-content-div,
#english-translation-content {
    background-color: #202020;
    white-space: pre-wrap;
    word-break: break-all;
}

.cleaned-up-text-content-div {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: text;
}

.searched-word-highlight-cleaned-text {
    color: var(--gematria-searched-word-highlight-color) !important;
    font-weight: bold;
}

.text-action-button {
    color: #DCDCDC;
    background-color: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.text-action-button:hover { background-color: #4A4D51; }
.text-action-button:active { background-color: #5A5D61; }
.text-action-button:disabled img { opacity: 0.5; }

.textarea-controls-top-right {
    position: absolute;
    top: var(--textarea-icon-top-offset);
    right: calc(var(--textarea-icon-right-offset) + var(--scrollbar-width-allowance));
    z-index: 10;
    padding: var(--control-icon-padding);
    display: none;
    flex-direction: row;
    align-items: center;
    gap: var(--control-group-gap);
}

.textarea-controls-top-right .text-action-button img,
.textarea-controls-top-right #toggle-english-cb {
    filter: grayscale(30%) opacity(0.7);
    transition: filter 0.2s ease-in-out;
}

.textarea-controls-top-right:hover .text-action-button img,
.textarea-controls-top-right:hover #toggle-english-cb,
.textarea-controls-top-right .text-action-button:hover img,
.textarea-controls-top-right #toggle-english-cb:hover {
    filter: grayscale(0%) opacity(1);
}

.input-field-wrapper:hover .textarea-controls-top-right,
.cleaned-text-display-area:hover .textarea-controls-top-right,
.english-translation-display-area:hover .textarea-controls-top-right {
    display: flex;
}

.textarea-controls-top-right #toggle-english-cb {
    margin: 0;
    vertical-align: middle;
    width: var(--control-icon-width);
    height: var(--control-icon-width);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #252526;
    border: 1px solid #3F3F46;
    border-radius: 2px;
    position: relative;
}
.textarea-controls-top-right #toggle-english-cb:checked {
    background-color: #007ACC;
    border-color: #007ACC;
}
.textarea-controls-top-right #toggle-english-cb:checked::before {
    content: '✔';
    display: block;
    color: white;
    font-size: calc(var(--control-icon-width) - 4px);
    line-height: var(--control-icon-width);
    text-align: center;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* --- RESULTS GRID (CENTER PANE - DESKTOP) --- */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: left;
}
.result-column { background-color: #252526; padding: 10px; border-radius: 0; border: 1px solid #3F3F46; display: flex; flex-direction: column; gap: 4px; }
.column-title {
    font-size: 1.1em; color: #00AEEF; margin-top: 0; margin-bottom: 8px;
    border-bottom: 1px solid #3F3F46; padding-bottom: 6px; text-align: center;
    font-weight: bold; cursor: help;
}

.result-column .result-item {
    display: flex;
    align-items: baseline;
    font-size: 0.9em;
    min-height: 1.2em;
    line-height: 1.3;
    background-color: #2D2D30;
    border: 1px solid #3F3F46;
    padding: 2px 8px;
    box-sizing: border-box;
    width: 100%;
    cursor: help;
}

.result-column .result-item:has(input.result-value) {
    background-color: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    cursor: auto;
}


.result-label { color: #999999; margin-right: 6px; flex-shrink: 0; }
input.result-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #DCDCDC;
    background-color: #2D2D30;
    margin-bottom: 4px;
    width: 100%;
    text-align: center;
    padding: 4px 0;
    border-radius: 0;
    box-sizing: border-box;
    border: 1px solid #3F3F46;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
input.result-value:focus { border-color: #007ACC; box-shadow: none; outline: none; background-color: #333333; }
input.result-value.highlight-red { background-color: var(--gematria-highlight-37-color); color: white; }
input.result-value.highlight-blue { background-color: var(--gematria-highlight-73-color); color: white; }

.result-data { color: #C0C0C0; word-break: break-word; flex-grow: 1; min-height: 1.1em; }

.result-data.triangular-info { flex-grow: 1; text-align: left; }
.result-data.triangular-info.is-triangular-text-highlight {
    color: var(--gematria-triangular-text-highlight-color) !important;
    font-weight: bold;
}

.result-data.prime-info { flex-grow: 1; text-align: left; }
.result-data.prime-info.is-prime-text-highlight {
    color: var(--gematria-triangular-text-highlight-color) !important;
    font-weight: bold;
}

.result-item.pi-pos-row-highlight-red,
.result-item.euler-pos-row-highlight-red,
.result-item.phi-pos-row-highlight-red,
.result-item.prime-info-row-highlight-red,
.result-item.triangular-info-row-highlight-red {
    background-color: var(--gematria-highlight-37-color) !important;
}
.result-item.pi-pos-row-highlight-red .result-label,
.result-item.pi-pos-row-highlight-red .result-data,
.result-item.euler-pos-row-highlight-red .result-label,
.result-item.euler-pos-row-highlight-red .result-data,
.result-item.phi-pos-row-highlight-red .result-label,
.result-item.phi-pos-row-highlight-red .result-data,
.result-item.prime-info-row-highlight-red .result-label,
.result-item.prime-info-row-highlight-red .result-data,
.result-item.triangular-info-row-highlight-red .result-label,
.result-item.triangular-info-row-highlight-red .result-data {
    color: white !important;
    font-weight: var(--gematria-highlight-font-weight);
}

.result-item.pi-pos-row-highlight-blue,
.result-item.euler-pos-row-highlight-blue,
.result-item.phi-pos-row-highlight-blue,
.result-item.prime-info-row-highlight-blue,
.result-item.triangular-info-row-highlight-blue {
    background-color: var(--gematria-highlight-73-color) !important;
}
.result-item.pi-pos-row-highlight-blue .result-label,
.result-item.pi-pos-row-highlight-blue .result-data,
.result-item.euler-pos-row-highlight-blue .result-label,
.result-item.euler-pos-row-highlight-blue .result-data,
.result-item.phi-pos-row-highlight-blue .result-label,
.result-item.phi-pos-row-highlight-blue .result-data,
.result-item.prime-info-row-highlight-blue .result-label,
.result-item.prime-info-row-highlight-blue .result-data,
.result-item.triangular-info-row-highlight-blue .result-label,
.result-item.triangular-info-row-highlight-blue .result-data {
    color: white !important;
    font-weight: var(--gematria-highlight-font-weight);
}

/* --- MOBILE RESULTS STACKED VIEW / TABS --- */
.mobile-results-tabs-container {
    display: none;
}

.mobile-results-tabs-nav { display: flex; border-bottom: 1px solid #3F3F46; }
.mobile-tab-button { }
.mobile-results-tab-content { }


/* --- SUMMARY STATS & COMBINATION CONTROLS (CENTER PANE) --- */
.summary-stats {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    padding: 5px 0;
    min-height: 30px;
}

.summary-stats-counts {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.summary-stats span {
    background-color: #252526;
    color: #FFFFFF;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 0;
    display: inline-block;
    font-size: 0.9em;
    border: 1px solid #3F3F46;
    min-width: 70px;
    text-align: center;
}
.summary-stats span.highlight-red-wc { background-color: var(--gematria-highlight-37-color); color: white; }
.summary-stats span.highlight-blue-wc { background-color: var(--gematria-highlight-73-color); color: white; }

.summary-stats-action-button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
    margin-right: 10px;
}

.summary-stats-action-button img {
    width: var(--control-icon-width);
    height: var(--control-icon-width);
    display: block;
    filter: grayscale(30%) opacity(0.7);
    transition: filter 0.2s ease-in-out;
}
.summary-stats-action-button:hover img {
    filter: grayscale(0%) opacity(1);
}

.combination-controls { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 5px 0; }
.mode-indicator { background-color: var(--combination-mode-bg); color: var(--combination-mode-text); padding: 8px 15px; border-radius: 0; font-weight: bold; display: flex; align-items: center; gap: 10px; border: 1px solid #3F3F46; transition: all 0.3s ease-in-out; }
.mode-indicator.hidden { opacity: 0; transform: scale(0.9); max-height: 0; padding: 0 15px; overflow: hidden; border-width: 0; }
.mode-indicator .clear-button { background-color: var(--combination-clear-button-bg); color: var(--combination-clear-button-text); border: 1px solid #3F3F46; padding: 5px 10px; border-radius: 0; cursor: pointer; font-size: 0.85em; flex-shrink: 0; }
.mode-indicator .clear-button:hover { background-color: #e53935; }

/* --- BIBLE SEARCH (RIGHT PANE) --- */
.right-pane .bible-search-section { background-color: #252526; padding: 10px; border: 1px solid #3F3F46; text-align: left; display: flex; flex-direction: column; flex-grow: 1; min-height: 0; }
.right-pane .bible-search-controls { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; align-items: stretch; flex-shrink: 0; }
.right-pane .search-mode-container { display: flex; gap: 10px; align-items: flex-end; width: 100%; }
.right-pane .search-mode-item { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.right-pane .search-mode-title {
    font-size: 0.9em; color: #00AEEF; margin: 0 0 5px 0; font-weight: normal;
    text-align: center; cursor: help;
}
.right-pane .search-mode-container input[type="text"] { width: 100%; padding: 6px 8px; font-size: 0.9em; color: #DCDCDC; background-color: #333333; border: 1px solid #4A4A4A; border-radius: 0; height: 30px; box-sizing: border-box; }
.right-pane .search-mode-container input[type="text"]:focus { border-color: #007ACC; box-shadow: none; outline: none;}
.right-pane .bible-search-stats { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #3F3F46; font-size: 0.85em; flex-shrink: 0; flex-wrap: wrap; }
.right-pane .search-stats-left, .right-pane .search-stats-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.right-pane .search-stat-item { display: inline-flex; align-items: center; color: #00AEEF; white-space: nowrap; padding: 2px 3px; flex-basis: auto; line-height: 1.2; }
.right-pane .search-stat-item label, .right-pane .search-stat-item input[type="checkbox"] { cursor: pointer; }
.right-pane .value-count-container.hidden { display: none !important; }
.right-pane .value-count-group .value-label { color: #00AEEF; font-weight: bold; }
.right-pane .value-count-group #bible-search-std-count, .right-pane .value-count-group #bible-search-red-count, .right-pane .value-count-group #bible-search-ord-count, .right-pane .value-count-group #bible-search-ltrs-count, .right-pane .value-count-group #bible-search-total-val-count { color: #B0BEC5; font-weight: normal; margin-left: 0.25em; }
.right-pane .value-count-group.hidden { display: none; }
.right-pane .search-stat-item input[type="checkbox"] {
    margin-right: 4px; vertical-align: middle; width: 14px; height: 14px;
    -webkit-appearance: none; -moz-appearance: none;
    appearance: none; background-color: #252526; border: 1px solid #3F3F46;
    border-radius: 2px; position: relative; top: 0px; flex-shrink: 0;
    cursor: help;
}
.right-pane .search-stat-item input[type="checkbox"]:checked { background-color: #007ACC; border-color: #007ACC; }
.right-pane .search-stat-item input[type="checkbox"]:checked::before { content: '✔'; display: block; color: white; font-size: 10px; line-height: 12px; text-align: center; position: absolute; top: 0px; left: 1px; width: 100%; height: 100%; }
.right-pane .search-stat-item label { color: #00AEEF; font-weight: bold; line-height: 1; }
.right-pane .bible-search-results-list { flex-grow: 1; min-height: 100px; overflow-y: auto; border: 1px solid #3F3F46; background-color: #1E1E1E; padding: 8px; box-sizing: border-box; }
.right-pane .bible-search-placeholder-text { color: #777; text-align: center; padding-top: 20px; }

.right-pane .bible-search-result-item {
    margin-bottom: 10px;
    border-bottom: 1px dotted #303030;
    padding-bottom: 8px;
    cursor: pointer;
    position: relative;
}
.right-pane .bible-search-result-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.right-pane .bible-search-result-item:hover { background-color: #2D2D30; }

.copy-search-item-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: none;
    line-height: 0;
    z-index: 5;
}
.copy-search-item-btn img {
    width: 16px; height: 16px; display: block; filter: grayscale(30%) opacity(0.7);
}
.copy-search-item-btn:hover img { filter: grayscale(0%) opacity(1); }
.right-pane .bible-search-result-item:hover .copy-search-item-btn { display: inline-block; }

.right-pane .bible-search-verse-ref {
    font-weight: bold; color: #FDD835;
    margin-right: 8px; display: block; margin-bottom: 4px; font-size: 1em;
    padding-right: 25px;
}
.right-pane .bible-search-verse-text { font-size: 0.95em; line-height: 1.4; color: #DCDCDC; white-space: pre-wrap; word-break: break-word; }
.right-pane .bible-search-verse-text .highlight-match { background-color: rgba(253, 216, 53, 0.4); color: #FFFFFF; font-weight: bold; padding: 1px 2px; border-radius: 2px; }
.right-pane .bible-search-word-values, .right-pane .bible-search-verse-all-values { font-size: 0.85em; color: #aaa; margin-top: 3px; margin-bottom: 3px; line-height: 1.3; }
.right-pane .bible-search-word-values span, .right-pane .bible-search-verse-all-values span { margin-right: 8px; display: inline-block; white-space: nowrap; }
.right-pane .bible-search-word-values .matched-value, .right-pane .bible-search-verse-all-values .matched-value { font-weight: bold; color: #FDD835; background-color: #3a3d41; padding: 1px 3px; border-radius: 2px; }


/* --- SNIPPING TOOL STYLES --- */
.snip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    z-index: 9998;
}
.snip-selection-rectangle {
    position: absolute;
    border: 1px dashed #fff;
    background-color: rgba(255,255,255,0.1);
    z-index: 9999;
}
.snip-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    padding-top: 50px;
    align-items: center;
    justify-content: center;
    display: flex;
}
.snip-modal-content {
    background-color: #252526;
    color: #DCDCDC;
    margin: auto;
    padding: 20px;
    border: 1px solid #3F3F46;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 0;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.snip-modal-close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}
.snip-modal-close-btn:hover, .snip-modal-close-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
.snip-modal-content h2 {
    text-align: center;
    color: var(--title-gradient-end);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3F3F46;
}
.snip-image-container { text-align: center; margin-bottom: 15px; flex-shrink: 0; }
#snip-preview-image { max-width: 100%; max-height: 60vh; border: 1px solid #3F3F46; }
.snip-modal-actions { text-align: center; flex-shrink: 0; }
.snip-modal-actions button {
    background-color: #3A3D41;
    color: #DCDCDC;
    border: 1px solid #4A4A4A;
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 0;
    transition: background-color 0.2s;
}
.snip-modal-actions button:hover { background-color: #4A4D51; }

/* --- HELP PAGE STYLES (help.html specific, not for modal) --- */
/* These apply when help.html is viewed directly */
body > .app-container > .help-content { /* More specific selector for direct view */
    flex-grow: 1;
    overflow-y: auto;
    background-color: #1E1E1E;
    padding: 20px;
    line-height: 1.6;
    color: #DCDCDC;
}
body > .app-container > .help-content h1 {
    font-size: 1.8em; color: var(--title-gradient-end); margin-top: 0; margin-bottom: 20px;
    text-align: center; padding-bottom: 10px; border-bottom: 1px solid #3F3F46;
}
body > .app-container > .help-content h2 {
    font-size: 1.5em; color: #00AEEF; margin-top: 25px; margin-bottom: 10px;
    padding-bottom: 5px; border-bottom: 1px dotted #3F3F46;
}
body > .app-container > .help-content h3 { font-size: 1.2em; color: #B0BEC5; margin-top: 20px; margin-bottom: 8px; }
body > .app-container > .help-content h4 { font-size: 1.1em; color: #DCDCDC; margin-top: 15px; margin-bottom: 5px; font-weight: bold; }
body > .app-container > .help-content p { margin-bottom: 1em; }
body > .app-container > .help-content ul,
body > .app-container > .help-content ol { margin-bottom: 1em; padding-left: 25px; }
body > .app-container > .help-content ul li,
body > .app-container > .help-content ol li { margin-bottom: 0.5em; }
body > .app-container > .help-content strong { color: #FDD835; }
body > .app-container > .help-content code {
    background-color: #2D2D30; padding: 2px 4px; border-radius: 3px;
    font-family: monospace; font-size: 0.9em; color: #DCDCDC;
}


/* --- CUSTOM TOOLTIP STYLES --- */
.custom-tooltip {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    background-color: var(--tooltip-bg-color);
    border: 1px solid var(--tooltip-border-color);
    border-radius: 4px;
    padding: var(--tooltip-padding);
    color: var(--tooltip-text-color);
    font-size: 0.9em;
    line-height: 1.4;
    max-width: var(--tooltip-max-width);
    box-shadow: var(--tooltip-shadow);
    word-wrap: break-word;
    white-space: normal;
}
.custom-tooltip.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.custom-tooltip h4 {
    color: var(--tooltip-header-color);
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--tooltip-border-color);
    padding-bottom: 5px;
}
.custom-tooltip p { margin-bottom: 0.5em; margin-top: 0; }
.custom-tooltip p:last-child { margin-bottom: 0; }


/* --- About Modal Styles --- */
.about-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.about-modal-content {
    background-color: #252526;
    color: #DCDCDC;
    padding: 20px;
    border: 1px solid #3F3F46;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 0;
    position: relative;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.about-modal-content h2 {
    text-align: center;
    color: var(--title-gradient-end);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3F3F46;
    flex-shrink: 0;
}

.about-modal-content #about-modal-text-content {
    flex-grow: 1;
    overflow-y: auto;
    line-height: 1.6;
    padding-right: 10px;
    margin-right: -10px;
}
.about-modal-content #about-modal-text-content p,
.about-modal-content #about-modal-text-content ul {
    margin-bottom: 1em;
}
.about-modal-content #about-modal-text-content ul {
    padding-left: 25px;
}
.about-modal-content #about-modal-text-content ul li {
    margin-bottom: 0.5em;
}
.about-modal-content #about-modal-text-content strong {
    color: #FDD835;
}

.about-modal-close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.about-modal-close-btn:hover,
.about-modal-close-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}


/* --- Help Modal Styles --- */
.help-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.help-modal-content {
    background-color: #252526;
    color: #DCDCDC;
    padding: 20px;
    border: 1px solid #3F3F46;
    width: 85%;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 0;
    position: relative;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-modal-content h2 { /* Title for Help Modal (defined in index.html) */
    text-align: center;
    color: var(--title-gradient-end);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3F3F46;
    flex-shrink: 0;
}

.help-modal-text-content-wrapper { /* This div WRAPS the fetched content */
    flex-grow: 1;
    overflow-y: auto;
    line-height: 1.6;
    padding-right: 10px;
    margin-right: -10px;
    color: #DCDCDC; /* Base text color for fetched content */
}

/* Styling for content that COMES FROM help.html when it's INSIDE the modal */
/* REMOVED .help-content from the selectors below */
.help-modal-text-content-wrapper h1 {
    /* The H1 from help.html is usually the main page title. We hide it in the modal. */
    display: none !important;
}
.help-modal-text-content-wrapper h2 {
    font-size: 1.5em !important;
    color: #00AEEF !important;
    margin-top: 25px !important;
    margin-bottom: 10px !important;
    padding-bottom: 5px !important;
    border-bottom: 1px dotted #3F3F46 !important;
}
.help-modal-text-content-wrapper h3 {
    font-size: 1.2em !important;
    color: #B0BEC5 !important;
    margin-top: 20px !important;
    margin-bottom: 8px !important;
}
.help-modal-text-content-wrapper h4 {
    font-size: 1.1em !important;
    color: #DCDCDC !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    font-weight: bold !important;
}
.help-modal-text-content-wrapper p {
    margin-bottom: 1em !important;
    color: #DCDCDC !important;
}
.help-modal-text-content-wrapper ul,
.help-modal-text-content-wrapper ol {
    margin-bottom: 1em !important;
    padding-left: 25px !important;
}
.help-modal-text-content-wrapper ul li,
.help-modal-text-content-wrapper ol li {
    margin-bottom: 0.5em !important;
}
/* ADDED: Style for bullet points in the modal */
.help-modal-text-content-wrapper ul li::marker {
    color: #00AEEF !important; /* Match h2 color */
}
.help-modal-text-content-wrapper strong {
    color: #FDD835 !important;
}
.help-modal-text-content-wrapper code {
    background-color: #2D2D30 !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    font-family: monospace !important;
    font-size: 0.9em !important;
    color: #DCDCDC !important;
}
.help-modal-text-content-wrapper a {
    color: var(--title-gradient-end) !important;
    text-decoration: underline !important;
}
.help-modal-text-content-wrapper a:hover {
    text-decoration: none !important;
}

.help-modal-close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}
.help-modal-close-btn:hover,
.help-modal-close-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
.help-modal .loading-text {
    text-align: center;
    padding: 20px;
    font-style: italic;
}


/* --- RESPONSIVE DESIGN --- */

/* Adjustment for Word Analysis header on very wide screens before full mobile kicks in */
@media (max-width: 1999.98px) {
    #word-analysis-header-table th .th-content-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 4px 6px;
    }
    #word-analysis-header-table th .th-content-wrapper span {
        margin-bottom: 3px;
        display: inline-block;
    }
    #word-analysis-header-table .table-header-action-button {
        margin-left: 0 !important;
    }
}

/* --- MOBILE SPECIFIC STYLES (max-width: 900px or landscape with small height) --- */
@media (max-width: 900px), (orientation: landscape) and (max-height: 550px) {
    body {
        font-size: 13px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: 100%;
    }

    .app-header { display: none !important; }
    .mobile-header { display: flex; }

    .app-container {
        padding-top: var(--mobile-header-height);
        height: calc(100vh - var(--mobile-header-height));
        min-height: calc(100vh - var(--mobile-header-height));
        overflow: hidden;
        position: relative;
    }

    .mobile-main-content-wrapper::before {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-color: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        z-index: 190;
        transition: opacity var(--mobile-panel-transition-speed) ease-in-out,
                    visibility var(--mobile-panel-transition-speed) ease-in-out;
    }
    body.left-panel-open .mobile-main-content-wrapper::before,
    body.right-panel-open .mobile-main-content-wrapper::before {
        opacity: 1;
        visibility: visible;
    }


    .main-layout {
        flex-direction: row;
        overflow: visible !important;
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0; left: 0;
    }

    .left-pane, .right-pane {
        position: fixed;
        top: var(--mobile-header-height);
        height: calc(100vh - var(--mobile-header-height));
        width: 100%;
        max-width: 100%;
        z-index: 200;
        overflow-y: auto;
        padding: 10px;
        box-sizing: border-box;
        background-color: #252526;
        box-shadow: 0 0 15px rgba(0,0,0,0.3);
        transition: transform var(--mobile-panel-transition-speed) ease-in-out;
        border: none;
    }

    .left-pane { left: 0; transform: translateX(-100%); }
    body.left-panel-open .left-pane { transform: translateX(0); }

    .right-pane { right: 0; transform: translateX(100%); }
    body.right-panel-open .right-pane { transform: translateX(0); }

    .center-pane {
        order: 0;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 100%;
        overflow-y: auto;
        padding: 10px !important;
        border-left: none !important;
        border-right: none !important;
        box-sizing: border-box !important;
    }

    #desktop-results-grid { display: none !important; }
    .mobile-results-tabs-container { display: block !important; border: none; background-color: transparent; padding: 0; }
    .mobile-results-tabs-nav { display: none !important; }
    .mobile-results-tab-content { display: none !important; }

    .mobile-result-section {
        background-color: #252526;
        padding: 10px;
        margin-bottom: 10px;
        border: 1px solid #3F3F46;
    }
    .mobile-result-section:last-child { margin-bottom: 0; }

    .mobile-result-section-title {
        font-size: 1.2em; color: #00AEEF; margin-top: 0; margin-bottom: 10px;
        padding-bottom: 8px; border-bottom: 1px solid #3F3F46;
        text-align: center; font-weight: bold;
    }

    .mobile-result-section .result-item {
        background-color: #2D2D30; padding: 7px 8px; margin-bottom: 5px;
        border-bottom: 1px solid #3F3F46; box-sizing: border-box; width: 100%;
        font-size: 0.9em; line-height: 1.3;
    }
    .mobile-result-section .result-item:has(> input.result-value) { padding: 0; }
    .mobile-result-section .result-item:has(> input.result-value) > input.result-value { margin-bottom: 0; }
    .mobile-result-section .result-item:has(> .result-label) { display: flex; align-items: baseline; }
    .mobile-result-section .result-item:last-child { margin-bottom: 0; border-bottom: none; }
    .mobile-result-section .result-item:has(> .result-label) .result-label { color: #B0BEC5; margin-right: 8px; flex-shrink: 0; font-weight: 600; }
    .mobile-result-section .result-item .result-data { color: #C0C0C0; word-break: break-word; min-height: 1.1em; }
    .mobile-result-section .result-item:has(> .result-label) .result-data { flex-grow: 1; }
    .mobile-result-section .result-item:not(:has(> .result-label)):not(:has(> input.result-value)) .result-data { display: block; }

    .mobile-result-section .result-item.pi-pos-row-highlight-red,
    .mobile-result-section .result-item.euler-pos-row-highlight-red,
    .mobile-result-section .result-item.phi-pos-row-highlight-red,
    .mobile-result-section .result-item.prime-info-row-highlight-red,
    .mobile-result-section .result-item.triangular-info-row-highlight-red { background-color: var(--gematria-highlight-37-color) !important; }

    .mobile-result-section .result-item.pi-pos-row-highlight-red .result-label,
    .mobile-result-section .result-item.pi-pos-row-highlight-red .result-data,
    .mobile-result-section .result-item.euler-pos-row-highlight-red .result-label,
    .mobile-result-section .result-item.euler-pos-row-highlight-red .result-data,
    .mobile-result-section .result-item.phi-pos-row-highlight-red .result-label,
    .mobile-result-section .result-item.phi-pos-row-highlight-red .result-data,
    .mobile-result-section .result-item.prime-info-row-highlight-red .result-data,
    .mobile-result-section .result-item.triangular-info-row-highlight-red .result-data { color: white !important; font-weight: var(--gematria-highlight-font-weight); }

    .mobile-result-section .result-item.pi-pos-row-highlight-blue,
    .mobile-result-section .result-item.euler-pos-row-highlight-blue,
    .mobile-result-section .result-item.phi-pos-row-highlight-blue,
    .mobile-result-section .result-item.prime-info-row-highlight-blue,
    .mobile-result-section .result-item.triangular-info-row-highlight-blue { background-color: var(--gematria-highlight-73-color) !important; }

    .mobile-result-section .result-item.pi-pos-row-highlight-blue .result-label,
    .mobile-result-section .result-item.pi-pos-row-highlight-blue .result-data,
    .mobile-result-section .result-item.euler-pos-row-highlight-blue .result-label,
    .mobile-result-section .result-item.euler-pos-row-highlight-blue .result-data,
    .mobile-result-section .result-item.phi-pos-row-highlight-blue .result-label,
    .mobile-result-section .result-item.phi-pos-row-highlight-blue .result-data,
    .mobile-result-section .result-item.prime-info-row-highlight-blue .result-data,
    .mobile-result-section .result-item.triangular-info-row-highlight-blue .result-data { color: white !important; font-weight: var(--gematria-highlight-font-weight); }

    .mobile-result-section .result-data.triangular-info.is-triangular-text-highlight,
    .mobile-result-section .result-data.prime-info.is-prime-text-highlight {
        color: var(--gematria-triangular-text-highlight-color) !important;
        font-weight: bold;
    }


    .pane-action-button img { width: var(--control-icon-width-mobile); height: var(--control-icon-width-mobile); }
    .pane-action-button { padding: var(--control-icon-padding-mobile); }

    .right-pane .pane-title-bar h2 { font-size: 1.1em; }
    .right-pane .pane-title-bar { margin-bottom: 8px; }

    #input-text, .cleaned-up-text-content-div, #english-translation-content {
        min-height: var(--textarea-min-height-mobile);
        height: var(--textarea-min-height-mobile);
        font-size: 0.95em;
        padding-right: calc(var(--control-icon-width-mobile) + var(--control-icon-width-mobile) + (3 * var(--control-icon-padding-mobile)) + var(--textarea-icon-right-offset-mobile) + var(--scrollbar-width-allowance-mobile) + var(--control-group-gap-mobile) + 8px);
    }
    .textarea-controls-top-right {
        top: var(--textarea-icon-top-offset-mobile);
        right: calc(var(--textarea-icon-right-offset-mobile) + var(--scrollbar-width-allowance-mobile));
        gap: var(--control-group-gap-mobile);
    }
    .textarea-controls-top-right .text-action-button img,
    .textarea-controls-top-right #toggle-english-cb {
        width: var(--control-icon-width-mobile);
        height: var(--control-icon-width-mobile);
    }
    .textarea-controls-top-right #toggle-english-cb:checked::before {
        font-size: calc(var(--control-icon-width-mobile) - 4px);
        line-height: var(--control-icon-width-mobile);
    }

    .verse-loader-minimal-controls { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
    .verse-loader-minimal-controls select { font-size: 0.85em; padding: 5px 8px; }
    .verse-navigation-controls { gap: 8px; }
    .verse-navigation-controls button { font-size: 0.85em; padding: 5px 8px; }

    .right-pane .bible-search-section { padding: 8px; }
    .right-pane .bible-search-results-list { padding: 6px; min-height: 80px; }
    .right-pane .search-mode-container { flex-direction: column; gap: 8px; }
    .right-pane .search-mode-item { width: 100%; }
    .right-pane .search-mode-container input[type="text"] { font-size: 0.85em; padding: 5px 7px; height: 28px; }
    .right-pane .bible-search-stats { font-size: 0.8em; gap: 6px; }
    .right-pane .search-stats-left, .right-pane .search-stats-right { gap: 6px; }
    .right-pane .search-stat-item { padding: 1px 2px; }
    .right-pane .search-stat-item.verses-stat { font-size: 1.1em; }

    .snip-modal-content { max-width: 95%; padding: 15px; }
    .about-modal-content, .help-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .summary-stats { padding: 3px 0; min-height: 26px;}
    .summary-stats-counts { gap: 8px; }
    .summary-stats span { font-size: 0.85em; padding: 4px 8px; min-width: 60px;}
    .summary-stats-action-button img { width: var(--control-icon-width-mobile); height: var(--control-icon-width-mobile); }

}


/* --- CUSTOM SCROLLBAR STYLING --- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #252526; border-radius: 0; }
::-webkit-scrollbar-thumb { background: #4A4A4F; border-radius: 0; border: 1px solid #3F3F46; }
::-webkit-scrollbar-thumb:hover { background: #5A5A5F; }
::-webkit-scrollbar-thumb:active { background: #6A6A6F; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-corner { background: #1E1E1E; }

* {
    scrollbar-width: thin;
    scrollbar-color: #4A4A4F #252526;
}

/* --- END OF FILE style.css --- */