html, body {
    background: #757575 !important;
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

/* --- Top Header Bar with Centered Nav --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 56px;
    background: #000000 !important;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    box-sizing: border-box;
    box-shadow: none;
}

/* --- Left Side: Animated Title --- */
.header-left {
    display: flex;
    align-items: center;
    min-width: 140px; /* Ensures nav center does not shift as text animates */
}

.site-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.06em;
    font-family: 'Open Sans', Arial, sans-serif;
    padding-left: 3px;
    white-space: nowrap;
}

/* --- Centered Navigation --- */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

/* Navigation bar */
.nav-header {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    min-width: 340px; /* Ensures buttons don't get squeezed */
}

.nav-header .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #eee;
    text-decoration: none;
    transition: color 0.25s, background 0.2s, transform 0.25s, box-shadow 0.25s;
    padding: 7px 16px;
    border-radius: 12px;
    font-size: 14px;
    background: transparent;
    font-family: inherit;
}

.nav-header .nav-item svg {
    margin-bottom: 3px;
}

.nav-header .nav-item.active-nav-item {
    background: #222;
    color: #52aaff;
}

.nav-header .nav-item:focus,
.nav-header .nav-item:hover {
    background: #222;
    color: #52aaff;
    transform: translateY(3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- Right Side: Action Icons/Logout --- */
.header-right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 120px;
}

.icon-btn {
    background: none;
    border: none;
    color: #eee;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    transition: background 0.18s;
}

.icon-btn:hover {
    background: #232323;
}
.icon-btn:hover,
.icon-btn:focus {
    color: #52aaff;
}
.logout-btn {
    color: #ff0000;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.logout-btn .logout-text {
    display: none;
}
@media (min-width: 540px) {
    .logout-btn .logout-text {
        display: inline;
        margin-left: 4px;
        font-size: 1rem;
    }
}

/* --- Settings Dropdown --- */
.settings-dropdown {
    display: none;
    position: absolute;
    top: 54px;
    right: 0;
    background: #181818;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    color: #eee;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 3000;
}
.settings-dropdown.open {
    display: block;
}
.settings-dropdown label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.settings-dropdown select {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #000;
    color: #fff;
    font-family: inherit;
}

/* --- Typing Animation for Title --- */
.typing-cursor {
    display: inline-block;
    animation: blink-cursor 1s steps(1) infinite;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.2em;
    margin-left: 2px;
}
@keyframes blink-cursor {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* --- Main Content below Header --- */
main {
    margin-top: 64px !important; /* Ensure content is below fixed header */
    min-height: calc(100vh - 64px);
    width: 100vw;
    box-sizing: border-box;
}

/* --- Responsive Styles --- */
@media (max-width: 900px) {
    .nav-header {
        gap: 26px;
        min-width: 220px;
    }
}
@media (max-width: 700px) {
    .main-header {
        padding: 0 8px 0 8px;
    }
    .header-left, .header-right {
        min-width: 70px;
    }
    .nav-header {
        gap: 12px;
        min-width: 0;
    }
    .nav-header .nav-item {
        font-size: 12px;
        padding: 5px 6px;
    }
    .site-title {
        font-size: 1.05rem;
        padding-left: 0;
    }
}

/* --- Optional: Hide scrollbars for a sleeker look --- */
body::-webkit-scrollbar {
    width: 0.4em;
    background: transparent;
}
body::-webkit-scrollbar-thumb {
    background: #222;
}

/* --- Starfield Canvas (optional) --- */
#zing-star-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* --- Remove any old nav-bottom/footer nav styles --- */
.nav-bottom,
.nav-bottom-inner,
.nav-bottom-inner-center {
    display: none !important;
}
footer {
    display: none !important;
}
