/* ═══════════════════════════════════════════════════════════
   ULTRAGOL — GLASS NAV
   Bottom floating glass tab-bar (mobile/tablet) that morphs
   into a glass hamburger menu on wide screens (desktop).
   Namespaced with "ugn-" to avoid collisions with page CSS.
   ═══════════════════════════════════════════════════════════ */

:root {
    --ugn-accent: #FF6600;
    --ugn-accent-2: #FF4500;
}

.ugn-glass, .ugn-bottom, .ugn-panel, .ugn-fab {
    -webkit-tap-highlight-color: transparent;
}

/* ── BOTTOM GLASS TAB BAR (mobile / tablet) ── */
.ugn-bottom {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 9500;
    width: calc(100% - 24px);
    max-width: 460px;
    margin-bottom: calc(14px + env(safe-area-inset-bottom));

    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 8px;
    gap: 2px;

    background: rgba(20, 18, 16, 0.55);
    backdrop-filter: blur(34px) saturate(190%) brightness(1.08);
    -webkit-backdrop-filter: blur(34px) saturate(190%) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;

    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        inset 1px 0 0 rgba(255, 255, 255, 0.05),
        inset -1px 0 0 rgba(255, 255, 255, 0.05),
        0 10px 34px rgba(0, 0, 0, 0.55),
        0 2px 10px rgba(0, 0, 0, 0.4);

    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ugn-bottom.ugn-hidden { transform: translateX(-50%) translateY(140%); opacity: 0; pointer-events: none; }

/* Frosted shimmer line on top edge */
.ugn-bottom::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28) 50%, transparent);
    pointer-events: none;
}

/* Ambient orange glow beneath */
.ugn-bottom::after {
    content: '';
    position: absolute;
    bottom: -18px; left: 50%;
    transform: translateX(-50%);
    width: 60%; height: 32px;
    background: radial-gradient(ellipse, rgba(255,102,0,0.16) 0%, transparent 72%);
    pointer-events: none;
    animation: ugnGlow 3.2s ease-in-out infinite;
}
@keyframes ugnGlow {
    0%, 100% { opacity: 0.55; transform: translateX(-50%) scaleX(0.9); }
    50%      { opacity: 1;    transform: translateX(-50%) scaleX(1.08); }
}

.ugn-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    max-width: 92px;
    padding: 9px 6px;
    border-radius: 18px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    overflow: hidden;
    transition: background 0.35s cubic-bezier(0.34,1.56,0.64,1),
                border-color 0.35s ease,
                color 0.3s ease,
                box-shadow 0.35s ease;
}

.ugn-item i {
    font-size: 18px;
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), filter 0.3s ease, color 0.3s ease;
}

.ugn-item span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.ugn-item.active {
    color: #fff;
    background: linear-gradient(155deg, rgba(255,102,0,0.30) 0%, rgba(255,69,0,0.10) 100%);
    border-color: rgba(255,140,60,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25),
                0 0 16px rgba(255,102,0,0.30);
}
.ugn-item.active i {
    color: var(--ugn-accent);
    transform: translateY(-1px) scale(1.1);
    filter: drop-shadow(0 0 6px rgba(255,102,0,0.55));
}

/* Ripple on tap */
.ugn-item::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 18px;
    background: rgba(255,255,255,0.16);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}
.ugn-item.ugn-tap::after {
    animation: ugnRipple 0.5s ease-out forwards;
}
@keyframes ugnRipple {
    0%   { transform: scale(0);   opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ── DESKTOP: FLOATING GLASS HAMBURGER + PANEL ── */
.ugn-fab {
    position: fixed;
    top: 20px;
    right: 22px;
    z-index: 9600;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 16, 0.55);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 8px 24px rgba(0,0,0,0.45);
    cursor: pointer;
    color: #fff;
    flex-direction: column;
    gap: 5px;
}
.ugn-fab span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}
.ugn-fab.ugn-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ugn-fab.ugn-open span:nth-child(2) { opacity: 0; }
.ugn-fab.ugn-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ugn-panel-overlay {
    position: fixed; inset: 0;
    z-index: 9550;
    background: rgba(4, 4, 6, 0.35);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ugn-panel-overlay.ugn-open { opacity: 1; pointer-events: auto; }

.ugn-panel {
    position: fixed;
    top: 82px;
    right: 22px;
    z-index: 9600;
    width: 240px;
    padding: 10px;
    border-radius: 22px;
    display: none;
    flex-direction: column;
    gap: 4px;

    background: rgba(18, 16, 14, 0.60);
    backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow:
        inset 0 1.5px 0 rgba(255,255,255,0.18),
        inset 0 -1px 0 rgba(0,0,0,0.3),
        0 20px 50px rgba(0,0,0,0.55);

    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
}
.ugn-panel.ugn-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ugn-panel .ugn-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    max-width: none;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
}
.ugn-panel .ugn-item i { font-size: 16px; width: 20px; text-align: center; }
.ugn-panel .ugn-item span { font-size: 13.5px; }

/* ── RESPONSIVE SWITCH: bottom bar <1024px, hamburger >=1024px ── */
@media (min-width: 1024px) {
    .ugn-bottom { display: none; }
    .ugn-fab { display: flex; }
}

/* Tiny phones */
@media (max-width: 360px) {
    .ugn-bottom { width: calc(100% - 14px); padding: 6px; border-radius: 22px; }
    .ugn-item { padding: 7px 4px; }
    .ugn-item i { font-size: 16px; }
    .ugn-item span { font-size: 9.5px; }
}

/* Landscape phones — compact */
@media (max-height: 480px) and (orientation: landscape) {
    .ugn-bottom { padding: 5px 8px; }
    .ugn-item { padding: 6px 6px; }
    .ugn-item span { font-size: 9px; }
}

body.ugn-light .ugn-bottom,
body.ugn-light .ugn-fab,
body.ugn-light .ugn-panel {
    background: rgba(255,255,255,0.75);
    border-color: rgba(0,0,0,0.08);
}
body.ugn-light .ugn-item { color: rgba(0,0,0,0.55); }
body.ugn-light .ugn-fab span { background: #111; }
