/* global.css */
@font-face { font-family: Consolas; src: url("/fonts/Consolas-Regular.woff2"); font-weight: normal; }
@font-face { font-family: 'Cronos Pro'; src: url("/fonts/Cronos Pro Regular.otf"); font-weight: normal; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    color-scheme: dark light;
    overflow-y: scroll;
}

:root {
  --background-color: #101D29;
  --color: #e9e9e9;
  --font-family: Consolas;
  --font-size: 16.5px;
  --font-weight: normal;
  --width: 65%;
}

/* Non-viewed links (Normal) */
a:link { 
    color: rgb(60, 160, 255); /* Lighter blue */
}

/* Viewed links (Visited) */
a:visited { 
    color: rgb(150, 100, 255); /* Soft Purple/Blue */
}

body {
  background-color: var(--background-color);
  color: var(--color);
  font-family: var(--font-family);
  font-size: var(--font-size);
  font-weight: var(--font-weight);
  width: var(--width);
  margin: 0 auto !important; /* Centering */
  display: block;
}

/* Custom title size halfway between h1 and h2 */
.title-mid {
    font-size: 1.75em;
    font-weight: 700;
    margin-top: 0em;
    margin-bottom: 0em;
}

code {
    background-color: rgb(128 128 128 / .65); 
    border-radius: 6px; 
    padding: .1em .4em; 
    font-size: 95%;
    font-family: Consolas, monospace;
}

textarea, select, input[type="text"], input[type="button"] {
    background-color: rgba(128, 128, 128, 0.2);
    color: inherit;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 4px;
    padding: 5px;
}

/* Style for "Copy" and "Fake Button" buttons */
button {
    background-color: rgba(128, 128, 128, 0.3);
    color: inherit;
    border: 1px solid rgba(128, 128, 128, 0.5);
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-family: inherit;
}
button:hover { background-color: rgba(128, 128, 128, 0.5); }

/* The link buttons (🔗) next to titles */
.title button {
    background: none;
    border: none;
    font-size: 0.9em;
    padding: 0;
    margin-right: 5px;
}


/* ============================
    NAVIGATION BAR & DROPDOWNS 
   ============================ */

/* Top Bar Container */
.topnav {
    background-color: #1D2123;
    top: 0;
    width: 98.3%;
    position: sticky;
    z-index: 10000;
    border-radius: 6px;
    padding: 1px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LEFT SECTION: All buttons together */
.nav-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Vertical Divider Styling */
.nav-divider {
    width: 1px;
    height: 30px; /* Adjust height to match buttons */
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 10px;
}

/* RIGHT SECTION: Pinned to right edge */
.nav-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 100px; /* Prevents shifting when loading */
}

/* Button & Link Appearance */
.topnav a, .nav-btn {
    display: inline-block;
    color: #f2f2f2;
    text-decoration: none;
    font-family: 'Cronos Pro';
    font-size: 26px;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    background: none;
    border: none;
    vertical-align: middle;
}

.topnav a:hover, .nav-btn:hover { background-color: #ddd; color: black; }
.topnav a.active { background-color: #555555; color: white; }

/* Sub-menus: Absolute to cover the full width below the bar */
#toggleSettingsMenu, #toggleIndexMenu {
    display: none;
    background: #1D2123;
    border-top: 1px solid #444;
    padding: 3px;
    width: 99.5%;
    position: absolute;
    top: 100%;
    left: 0;
    white-space: normal;
}

/* Internal Layout for the Dropdowns */
.settings-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    align-items: flex-end;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-family: Baskervville, serif;
    font-size: 16px;
    color: inherit;
}

.setting-item label { color: inherit; }

.reset-btn {
    background-color: #c0392b;
    color: white;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

/* Mobile Adjustments */
@media only screen and (max-width: 1000px) {
    body { width: 94% !important; margin: 0 3% !important; }
    .topnav {
        flex-direction: column;
        height: auto;
    }
    .nav-left {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-divider {
        display: none; /* Hide divider on mobile to save space */
    }
    .nav-right {
        justify-content: center;
        margin-top: 10px;
    }
}