/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY NAVIGATION — LCARS STRIP DESIGN
   Shared base styles for all category navigation bars.

   Each nav sets its accent via CSS custom property:
     --cat-accent:       dark mode color (e.g. #FFAA00)
     --cat-accent-light: light mode color (e.g. #cc6600)

   Used by: admin_ops, admin_tools, dev_tools, creation_tools,
            business_tools, standalone_apps
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Google Fonts — Antonio for LCARS labels */
@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE TRANSITION OVERLAY (BASE)
   ═══════════════════════════════════════════════════════════════════════════════ */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}
.transition-content { text-align: center; }
.transition-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    margin-bottom: 24px;
    color: var(--cat-accent, #8b5cf6);
    text-shadow: 0 0 30px var(--cat-accent, #8b5cf6);
    animation: transitionPulse 1s ease-in-out infinite;
}
@keyframes transitionPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.transition-bar {
    width: 200px; height: 4px;
    border-radius: 2px;
    margin: 0 auto 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}
.transition-progress {
    height: 100%; width: 0;
    border-radius: 2px;
    background: var(--cat-accent, #8b5cf6);
    animation: transitionLoad 0.8s ease-out forwards;
}
@keyframes transitionLoad {
    0% { width: 0; }
    100% { width: 100%; }
}
.transition-text {
    font-family: 'Antonio', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--cat-accent, #8b5cf6);
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LCARS NAVIGATION STRIP
   ═══════════════════════════════════════════════════════════════════════════════ */
.category-nav {
    --cat-accent: #8b5cf6;
    --cat-accent-light: #6d28d9;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
    background: rgba(1, 4, 9, 0.95);
    backdrop-filter: blur(12px);
    min-height: 40px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.category-nav::after { display: none; }

/* ─── Left: Back button (green pill, rounded left cap) ─── */
.nav-left {
    flex: none;
    display: flex;
}
.nav-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid rgba(0, 255, 65, 0.15);
    border-radius: 10px;
    color: #00FF41;
    font-family: 'Antonio', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s, box-shadow 0.2s;
}
.nav-back-btn:hover {
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.12);
}
.nav-back-btn i { width: 14px; height: 14px; }

/* ─── Center: Category label (solid accent bar) ─── */
.nav-center {
    flex: none;
    display: flex;
    align-items: stretch;
    margin-left: 3px;
}
.nav-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    background: var(--cat-accent);
    color: #fff;
    font-family: 'Antonio', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-shadow: none;
    white-space: nowrap;
    border-radius: 10px;
}
.nav-category-label i { width: 16px; height: 16px; }

/* ─── Right: grouped bubbles ─── */
.nav-right {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 6px;
    margin-left: 6px;
}

/* Utility bubble (theme, lang, Dev HQ) */
.nav-utils {
    display: flex;
    align-items: stretch;
    gap: 2px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 2px;
}

/* Module bubble (Bridge, Mind, Pool, etc.) */
.nav-modules {
    display: flex;
    align-items: stretch;
    gap: 2px;
    background: color-mix(in srgb, var(--cat-accent) 5%, rgba(255,255,255,0.02));
    border: 1px solid color-mix(in srgb, var(--cat-accent) 12%, transparent);
    border-radius: 10px;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-modules::-webkit-scrollbar { display: none; }

.nav-module-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Antonio', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.15s, color 0.15s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.nav-module-btn::before { display: none; }
.nav-module-btn i { width: 14px; height: 14px; }

.nav-module-btn:hover {
    background: color-mix(in srgb, var(--cat-accent) 12%, transparent);
    color: rgba(255, 255, 255, 0.8);
}
.nav-module-btn.active {
    background: color-mix(in srgb, var(--cat-accent) 18%, transparent);
    color: color-mix(in srgb, var(--cat-accent) 60%, #fff);
    box-shadow: inset 0 0 8px color-mix(in srgb, var(--cat-accent) 10%, transparent);
}

/* ─── Icon buttons — LCARS terminal blocks (inside utils bubble) ─── */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    border-radius: 2px 8px 8px 2px;
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid var(--btn-accent, var(--cat-accent, #00ff41));
    background: rgba(255, 255, 255, 0.06);
    color: var(--btn-accent, var(--cat-accent, #00ff41));
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-icon-btn:hover {
    color: #fff;
    background: rgba(var(--btn-accent-rgb, 255,170,0), 0.2);
    box-shadow: 0 0 8px rgba(var(--btn-accent-rgb, 255,170,0), 0.25);
}
.nav-icon-btn.active {
    background: rgba(var(--btn-accent-rgb, 255,170,0), 0.2);
    color: var(--btn-accent, var(--cat-accent));
    box-shadow: 0 0 8px rgba(var(--btn-accent-rgb, 255,170,0), 0.2);
}
.nav-icon-btn svg { width: 16px; height: 16px; shape-rendering: crispEdges; }
.nav-icon-btn i { width: 16px; height: 16px; }

/* Per-button accent colors */
.nav-icon-btn[data-accent="cyan"]   { --btn-accent: #00ffff; --btn-accent-rgb: 0,255,255; }
.nav-icon-btn[data-accent="purple"] { --btn-accent: #a78bfa; --btn-accent-rgb: 167,139,250; }
.nav-icon-btn[data-accent="green"]  { --btn-accent: #00ff41; --btn-accent-rgb: 0,255,65; }
/* Legacy wrapper compat */
.theme-controls { display: contents; }

/* ─── Language Dropdown ─── */
.nav-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid color-mix(in srgb, var(--cat-accent) 20%, transparent);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 140px;
    z-index: 300;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.nav-lang-menu.hidden { display: none; }
.nav-lang-option {
    display: block;
    width: 100%;
    padding: 7px 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    font-family: 'Antonio', sans-serif;
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.nav-lang-option:hover {
    background: color-mix(in srgb, var(--cat-accent) 8%, transparent);
    color: #fff;
}
.nav-lang-option.active {
    color: var(--cat-accent);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY CONTAINER & CONTENT
   ═══════════════════════════════════════════════════════════════════════════════ */
.category-container {
    min-height: 100vh;
    background: #010409;
}
.category-content {
    padding: 0 24px 24px;
    max-width: 1800px;
    margin: 0 auto;
}
.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.category-header i { color: inherit; }
.category-header-text h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin: 0;
}
.category-header-text p {
    font-family: 'Antonio', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 0;
    letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════════════════════════════ */
body.light-mode .category-nav {
    --cat-accent: var(--cat-accent-light, #6d28d9);
    background: rgba(248, 249, 250, 0.95);
    border-bottom-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
body.light-mode .nav-back-btn {
    background: rgba(0, 170, 51, 0.06);
    border-color: rgba(0, 170, 51, 0.15);
    color: #00aa33;
}
body.light-mode .nav-back-btn:hover {
    background: rgba(0, 170, 51, 0.12);
    box-shadow: 0 0 12px rgba(0, 170, 51, 0.1);
}
body.light-mode .nav-utils {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}
body.light-mode .nav-modules {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
body.light-mode .nav-category-label {
    color: #fff;
}
body.light-mode .nav-module-btn {
    color: rgba(0, 0, 0, 0.45);
}
body.light-mode .nav-module-btn:hover {
    color: rgba(0, 0, 0, 0.7);
}
body.light-mode .nav-module-btn.active {
    color: var(--cat-accent);
}
body.light-mode .nav-icon-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
    border-left-color: var(--btn-accent, var(--cat-accent, #00ff41));
}
body.light-mode .nav-icon-btn:hover {
    background: rgba(var(--btn-accent-rgb, 255,170,0), 0.15);
    box-shadow: none;
}
body.light-mode .nav-lang-menu {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
body.light-mode .nav-lang-option { color: rgba(0, 0, 0, 0.5); }
body.light-mode .nav-lang-option:hover { color: #333; }
body.light-mode .nav-lang-option.active { color: var(--cat-accent); }
body.light-mode .page-transition-overlay { background: #f8f9fa; }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .category-nav { flex-wrap: nowrap; gap: 4px; }
    .nav-category-label { font-size: 0.7rem; padding: 0 10px; }
    .nav-module-btn span { display: none; }
    .nav-module-btn { padding: 0 8px; }
    .nav-utils { padding: 2px; }
    .nav-modules { padding: 2px; }
}

@media (max-width: 500px) {
    .category-nav { gap: 3px; padding: 4px 4px; }
    .nav-back-btn span { display: none; }
    .nav-back-btn { padding: 0 10px; }
    .nav-category-label { font-size: 0.62rem; padding: 0 8px; letter-spacing: 0.1em; }
    .nav-category-label i { display: none; }
    .nav-module-btn { padding: 0 7px; }
    .nav-icon-btn { width: 28px; }
    .nav-utils { border-radius: 8px; }
    .nav-modules { border-radius: 8px; }
    .category-content { padding: 0 16px 16px; }
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}
