/* ================================================================
   LGNewUi Mobile Navigation - Bottom Tab Templates v1-v6
   移动端底部导航栏，桌面端自动隐藏
   ================================================================ */

/* ── 移动端专属：桌面端不显示 ── */
.lgnewui-mobile-nav-root {
    display: none;
}

@media (max-width: 768px) {
    .lgnewui-mobile-nav-root {
        display: block;
    }

    .lgnewui-nav-wrapper {
        display: none !important;
    }
}


/* ── CSS 变量 ── */
:root {
    --lgnewui-glass-bg: rgba(255, 255, 255, 0.65);
    --lgnewui-glass-blur: saturate(180%) blur(25px);
    --lgnewui-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    --lgnewui-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
    --lgnewui-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 毛玻璃面板 ── */
.lgnewui-glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(180%) blur(25px);
    -webkit-backdrop-filter: saturate(180%) blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

/* ── 通用导航项 ── */
.lgnewui-base-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #99999e;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    text-decoration: none;
}

.lgnewui-base-nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.lgnewui-base-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.lgnewui-base-nav-item.active {
    color: #111111;
}

.lgnewui-base-nav-item.active i {
    transform: scale(1.05);
}

/* ── 全局遮罩层 ── */
.lgnewui-shared-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--lgnewui-ease-out-expo);
    z-index: 99;
}

.lgnewui-shared-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ================================================================
   方案 1：灵动伸缩栏
   ================================================================ */
.lgnewui-tab-template-v1-container {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
    padding-left: 12px;
    padding-right: 12px;
    --lgnewui-tab-template-v1-trans: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.lgnewui-tab-template-v1-nav {
    width: 100%;
    pointer-events: auto;
    background: var(--lgnewui-glass-bg);
    backdrop-filter: var(--lgnewui-glass-blur);
    -webkit-backdrop-filter: var(--lgnewui-glass-blur);
    border-radius: 50px;
    padding: 6px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.lgnewui-tab-template-v1-nav::-webkit-scrollbar {
    display: none;
}

.lgnewui-tab-template-v1-indicator {
    position: absolute;
    top: 6px; bottom: 6px;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    z-index: 1;
    transition: var(--lgnewui-tab-template-v1-trans);
    pointer-events: none;
}

.lgnewui-tab-template-v1-item {
    position: relative;
    z-index: 2;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50px;
    transition: var(--lgnewui-tab-template-v1-trans);
    color: #6b7280;
    flex-shrink: 0;
    text-decoration: none;
}

.lgnewui-tab-template-v1-item i {
    font-size: 20px;
    transition: color 0.3s;
}

.lgnewui-tab-template-v1-text-wrap {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    transition: var(--lgnewui-tab-template-v1-trans);
}

.lgnewui-tab-template-v1-text {
    display: block;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    padding-left: 6px;
}

.lgnewui-tab-template-v1-item.active {
    color: #1f2937;
}

/* ================================================================
   方案 2：全息展开层
   ================================================================ */
.lgnewui-tab-template-v2-container {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    overflow: hidden;
}

.lgnewui-tab-template-v2-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: rgb(230 230 230 / 13%);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lgnewui-tab-template-v2-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.lgnewui-tab-template-v2-sheet {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 24px 24px 0 0;
    padding: 24px 24px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.lgnewui-tab-template-v2-overlay.open .lgnewui-tab-template-v2-sheet {
    transform: translate3d(0, 0, 0);
}

.lgnewui-tab-template-v2-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.lgnewui-tab-template-v2-sheet-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 1px;
}

.lgnewui-tab-template-v2-sheet-close {
    width: 32px; height: 32px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4b5563;
    border: none;
    transition: background 0.2s;
}

.lgnewui-tab-template-v2-sheet-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.lgnewui-tab-template-v2-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 16px;
}

.lgnewui-tab-template-v2-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.lgnewui-tab-template-v2-grid-icon {
    width: 48px; height: 48px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 20px;
    transition: all 0.2s;
}

.lgnewui-tab-template-v2-grid-item:active .lgnewui-tab-template-v2-grid-icon {
    transform: scale(0.9);
}

.lgnewui-tab-template-v2-grid-item.active .lgnewui-tab-template-v2-grid-icon {
    background: #111;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lgnewui-tab-template-v2-grid-item.active span {
    color: #111;
    font-weight: 600;
}

.lgnewui-tab-template-v2-grid-item span {
    font-size: 11px;
    color: #4b5563;
    transition: color 0.2s;
}

.lgnewui-tab-template-v2-dock {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 30;
    padding: 8px 8px 24px;
    pointer-events: auto;
    background: var(--lgnewui-glass-bg);
    backdrop-filter: var(--lgnewui-glass-blur);
    -webkit-backdrop-filter: var(--lgnewui-glass-blur);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 80px;
}

.lgnewui-tab-template-v2-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s;
    text-decoration: none;
}

.lgnewui-tab-template-v2-item.active {
    color: #1f2937;
}

.lgnewui-tab-template-v2-item i {
    font-size: 24px;
}

.lgnewui-tab-template-v2-item span {
    font-size: 10px;
    font-weight: 500;
    margin-top: 4px;
}

/* ================================================================
   方案 3：沉浸网格拉伸
   ================================================================ */
.lgnewui-tab-template-v3-wrapper-box {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
    height: 400px;
    display: flex;
    align-items: flex-end;
}

.lgnewui-tab-template-v3-container {
    position: relative;
    width: 100%;
    background: var(--lgnewui-glass-bg);
    backdrop-filter: var(--lgnewui-glass-blur);
    -webkit-backdrop-filter: var(--lgnewui-glass-blur);
    border-radius: 32px 32px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    pointer-events: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transform: translateY(calc(100% - 90px));
    transition: transform 0.5s var(--lgnewui-spring);
}

.lgnewui-tab-template-v3-wrapper-box.is-expanded .lgnewui-tab-template-v3-container {
    transform: translate3d(0, 0, 0);
}

.lgnewui-tab-template-v3-dock {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 24px;
    flex-shrink: 0;
    height: 90px;
}

.lgnewui-tab-template-v3-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e93;
    gap: 4px;
    cursor: pointer;
    transition: color 0.3s;
    width: 48px;
    text-decoration: none;
}

.lgnewui-tab-template-v3-item i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.lgnewui-tab-template-v3-item span {
    font-size: 11px;
    font-weight: 500;
}

.lgnewui-tab-template-v3-item.active {
    color: #111;
}

.lgnewui-tab-template-v3-item.active i {
    transform: scale(1.05);
}

.lgnewui-tab-template-v3-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #111;
    gap: 4px;
    cursor: pointer;
    width: 48px;
}

.lgnewui-tab-template-v3-toggle i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.lgnewui-tab-template-v3-container.is-expanded .lgnewui-tab-template-v3-toggle i {
    transform: rotate(180deg);
}

.lgnewui-tab-template-v3-toggle span {
    font-size: 11px;
    font-weight: 600;
}

.lgnewui-tab-template-v3-content {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lgnewui-tab-template-v3-content-inner {
    padding: 12px 24px 40px;
}

.lgnewui-tab-template-v3-wrapper-box.is-expanded .lgnewui-tab-template-v3-content {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.1s;
}

.lgnewui-tab-template-v3-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(142, 142, 147, 0.4), transparent);
    margin: 0 0 24px 0;
    width: 100%;
}

.lgnewui-tab-template-v3-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 8px;
}

.lgnewui-tab-template-v3-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.lgnewui-tab-template-v3-menu-icon {
    width: 48px; height: 48px;
    border-radius: 24px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 22px;
    transition: transform 0.2s;
}

.lgnewui-tab-template-v3-menu-item:active .lgnewui-tab-template-v3-menu-icon {
    transform: scale(0.92);
    background: #f0f0f0;
}

.lgnewui-tab-template-v3-menu-item.active .lgnewui-tab-template-v3-menu-icon {
    background: #111;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lgnewui-tab-template-v3-menu-item.active span {
    color: #111;
    font-weight: 600;
}

.lgnewui-tab-template-v3-menu-item span {
    font-size: 12px;
    font-weight: 500;
    color: #444;
    transition: color 0.2s;
}

/* ================================================================
   方案 4：横向无级滑动
   ================================================================ */
.lgnewui-tab-template-v4-container {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    height: 105px;
    z-index: 100;
    pointer-events: none;
}

.lgnewui-tab-template-v4-dock {
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.5) 100%);
    backdrop-filter: var(--lgnewui-glass-blur);
    -webkit-backdrop-filter: var(--lgnewui-glass-blur);
    display: flex;
    align-items: flex-start;
    padding-top: 10px;
    pointer-events: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.lgnewui-tab-template-v4-scroll {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 10px 16px;
    -webkit-overflow-scrolling: touch;
}

.lgnewui-tab-template-v4-scroll::-webkit-scrollbar {
    display: none;
}

.lgnewui-tab-template-v4-item {
    flex: 0 0 22%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e93;
    scroll-snap-align: center;
    transition: all 0.3s var(--lgnewui-ease-out-expo);
    cursor: pointer;
    text-decoration: none;
}

.lgnewui-tab-template-v4-icon-wrap {
    width: 48px; height: 48px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: transparent;
    transition: all 0.4s var(--lgnewui-ease-out-expo);
}

.lgnewui-tab-template-v4-item span {
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.lgnewui-tab-template-v4-item.active {
    color: #111;
}

.lgnewui-tab-template-v4-item.active .lgnewui-tab-template-v4-icon-wrap {
    background: #111;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px) scale(1.08);
}

.lgnewui-tab-template-v4-item.active span {
    font-weight: 700;
    transform: translateY(-2px);
}

/* ================================================================
   方案 5：极简包裹点阵
   ================================================================ */
.lgnewui-tab-template-v5-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    height: 56px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    z-index: 100;
    overflow-x: auto;
    scroll-behavior: smooth;
    max-width: calc(100% - 40px);
}

.lgnewui-tab-template-v5-container::-webkit-scrollbar {
    display: none;
}

.lgnewui-tab-template-v5-container .lgnewui-base-nav-item {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    z-index: 2;
    border-radius: 50%;
    margin-right: 4px;
}

.lgnewui-tab-template-v5-container .lgnewui-base-nav-item:last-child {
    margin-right: 0;
}

.lgnewui-tab-template-v5-container .lgnewui-base-nav-item span {
    display: none;
}

.lgnewui-tab-template-v5-container .lgnewui-base-nav-item i {
    font-size: 22px;
    margin-bottom: 0;
    line-height: 1;
}

.lgnewui-tab-template-v5-container .lgnewui-base-nav-item.active {
    color: #ffffff;
}

.lgnewui-tab-template-v5-indicator {
    position: absolute;
    width: 44px; height: 44px;
    background: #1d1d1f;
    border-radius: 50%;
    z-index: 1;
    transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    will-change: left;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ================================================================
   方案 6：玻璃全抽屉
   ================================================================ */
.lgnewui-tab-template-v6-container {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    pointer-events: none;
}

.lgnewui-tab-template-v6-bar {
    height: 84px;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: space-around;
    padding: 10px 10px 24px 10px;
    align-items: flex-start;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(180%) blur(25px);
    -webkit-backdrop-filter: saturate(180%) blur(25px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.lgnewui-tab-template-v6-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 30px 30px 0 0;
    padding: 40px 20px 100px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 11;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(200%) blur(30px);
    -webkit-backdrop-filter: saturate(200%) blur(30px);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.06);
}

.lgnewui-tab-template-v6-container.is-open .lgnewui-tab-template-v6-panel {
    transform: translateY(0);
}

.lgnewui-tab-template-v6-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px 0;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: none;
}

.lgnewui-tab-template-v6-grid.is-few {
    justify-content: space-around;
}

.lgnewui-tab-template-v6-grid::-webkit-scrollbar {
    display: none;
}

.lgnewui-tab-template-v6-grid .lgnewui-base-nav-item {
    width: 25%;
    flex-shrink: 0;
}

.lgnewui-tab-template-v6-grid-item i {
    font-size: 28px;
}

.lgnewui-tab-template-v6-grid-item span {
    font-size: 12px;
    margin-top: 8px;
}

.lgnewui-tab-template-v6-grid.is-few .lgnewui-base-nav-item {
    width: auto;
    flex: 1;
}

.lgnewui-tab-template-v6-close-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
