/* Fonts */
:root {
    --default-font: "Noto Serif Georgian",  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --heading-font: "Exo 2", sans-serif;
    --nav-font: "Ubuntu",  sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
    font-family: var(--default-font);
    line-height: 1.8;
}

h1,
h2,
h3,
h4,
h5,
h6,
code {
    font-family: var(--heading-font);
}

/* Custom styles for code blocks */
.code-block-container {
    position: relative;
    margin: 1rem 0;
    background-color: #282c34; /* A nice dark background for code */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    /*max-height: 500px; !* Enable vertical scrolling for long code blocks *!*/
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #21252b;
    color: #abb2bf;
    font-family: var(--heading-font);
    font-size: 0.9rem;
    position: sticky; /* Make the header stick to the top on scroll */
    top: 80px;
    z-index: 1; /* Ensure it stays above the code */
}

.code-block-header .language {
    text-transform: uppercase;
    font-weight: bold;
}

.code-block-header .copy-btn {
    background: none;
    border: 1px solid #61afef;
    color: #61afef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease-in-out;
}

.code-block-header .copy-btn:hover {
    background-color: #61afef;
    color: #282c34;
}

.code-block-header .copy-btn.copied {
    background-color: #98c379;
    color: #282c34;
    border-color: #98c379;
}

.code-block-container pre {
    margin: 0;
    padding: 1rem;
    /* overflow-x is now handled by the container */
    background-color: transparent; /* The container has the background */
    color: #abb2bf;
}

.code-block-container pre code {
    font-family: var(--heading-font);
    font-size: 0.95rem;
    line-height: 1.5;
    background: none;
    padding: 0;
}

.main-content {
    flex: 1;
}

/* --- Modern Interactive Header Styles --- */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(var(--bs-body-bg-rgb), 0.8) !important;
    border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.8rem 1rem;
}

.navbar.scrolled {
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-family: var(--heading-font);
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--bs-primary);
    filter: drop-shadow(0 0 5px rgba(var(--bs-primary-rgb), 0.3));
}

.nav-link {
    font-family: var(--nav-font);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--bs-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Custom Dropdown Styling */
.dropdown-menu {
    border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 10px !important;
    animation: dropdownFade 0.2s ease-out;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    transform: translateX(5px);
}

.dropdown-item i {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* System Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: currentColor;
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(3); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    transition: transform 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    transform: rotate(90deg);
}

@media (max-width: 991.98px) {
    .navbar-collapse.show, .navbar-collapse.collapsing {
        background-color: var(--bs-body-bg);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}

[data-bs-theme="dark"] .navbar {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
}

[data-bs-theme="dark"] .lead {
    color: #adb5bd;
}

[data-bs-theme="dark"] .text-primary {
    color: #0d6efd !important;
}

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-bg: #0d6efd;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #f8f9fa;
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-bg: #f8f9fa;
    --bs-btn-hover-color: #212529;
}

.theme-switcher {
    cursor: pointer;
}

/* ... existing styles ... */

.theme-icon, .theme-icon-active {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em; /* Align with text */
    fill: currentcolor;
}

#gotoTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    visibility: hidden;
}

#gotoTop.show {
    opacity: 1;
    visibility: visible;
}

.footer {
    transition: background-color 0.3s ease;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.admin-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    border: 1px solid white;
}

[data-bs-theme="dark"] .admin-badge {
    border-color: var(--bs-gray-800);
}

/* Order Color Coding System */
.order-color-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

.order-color-badge {
    padding: 0.4em 0.8em;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.color-yellow { background-color: #ffeb3b !important; color: #000 !important; }
.color-blue { background-color: #2196f3 !important; color: #fff !important; }
.color-green { background-color: #4caf50 !important; color: #fff !important; }
.color-orange { background-color: #ff9800 !important; color: #fff !important; }
.color-purple { background-color: #9c27b0 !important; color: #fff !important; }
.color-pink { background-color: #e91e63 !important; color: #fff !important; }
.color-teal { background-color: #009688 !important; color: #fff !important; }
.color-white { background-color: #ffffff !important; color: #000 !important; border: 1px solid #ddd !important; }

/* Dark mode adjustments for order colors */
[data-bs-theme="dark"] .color-yellow { background-color: #fdd835 !important; color: #000 !important; }
[data-bs-theme="dark"] .color-white { background-color: #f8f9fa !important; color: #000 !important; }

