:root {
    --lgn-bg: rgba(255, 255, 255, 0.08);
    /* Reduced opacity for more transparency */
    --lgn-blur: 15px;
    --lgn-border-outer: rgba(255, 255, 255, 0.25);
    --lgn-border-inner: rgba(255, 255, 255, 0.35);
    --lgn-active-bg: rgba(255, 255, 255, 0.2);
    --lgn-text: #ffffff;
    --lgn-accent: #bf5af2;
    --lgn-transition: cubic-bezier(0.19, 1, 0.22, 1);
    /* Physics-based feel */
}

/* Wrapper to isolate styles */
.lgn-wrapper-outer {
    display: flex;
    justify-content: center;
    padding: 30px;
    background: #111;
    /* Mock background for development, user will see their own */
}

.lgn-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lgn-navbar {
    position: relative;
    display: flex;
    background: var(--lgn-bg);
    backdrop-filter: blur(var(--lgn-blur)) brightness(1.2);
    -webkit-backdrop-filter: blur(var(--lgn-blur)) brightness(1.2);
    border: 0.5px solid var(--lgn-border-outer);
    border-radius: 50px;
    padding: 6px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px var(--lgn-border-inner);
    /* Inner border for premium look */
    z-index: 10;
}

.lgn-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    background: var(--lgn-active-bg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 40px;
    transition: all 0.6s var(--lgn-transition);
    z-index: -1;
    pointer-events: none;
}

.lgn-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 28px;
    text-decoration: none;
    color: var(--lgn-text);
    transition: color 0.4s var(--lgn-transition);
    min-width: 90px;
    -webkit-tap-highlight-color: transparent;
}

.lgn-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
    transition: transform 0.4s var(--lgn-transition), color 0.3s;
    opacity: 0.9;
}

.lgn-icon svg {
    width: 100%;
    height: 100%;
}

.lgn-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.3s;
    letter-spacing: 0.2px;
}

/* Active State */
.lgn-item.active {
    color: var(--lgn-accent);
}

.lgn-item.active .lgn-icon {
    transform: scale(1.15) translateY(-1px);
    opacity: 1;
}

.lgn-item.active .lgn-label {
    opacity: 1;
}

/* Hover effects */
.lgn-item:not(.active):hover .lgn-icon {
    transform: translateY(-2px);
    opacity: 1;
}

/* Search Ball Redesign */
.lgn-search-btn {
    width: 68px;
    /* Slightly larger based on visual weight */
    height: 68px;
    border-radius: 50%;
    background: var(--lgn-bg);
    backdrop-filter: blur(var(--lgn-blur)) brightness(1.2);
    -webkit-backdrop-filter: blur(var(--lgn-blur)) brightness(1.2);
    border: 0.5px solid var(--lgn-border-outer);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--lgn-transition);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px var(--lgn-border-inner);
}

.lgn-search-btn:hover {
    transform: scale(1.08);
    background: var(--lgn-active-bg);
    box-shadow:
        0 12px 40px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.lgn-search-btn svg {
    transition: transform 0.4s var(--lgn-transition);
}

.lgn-search-btn:active svg {
    transform: scale(0.9);
}

/* Search Input Container */
.lgn-search-input-container {
    position: absolute;
    right: 0;
    bottom: calc(100% + 15px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.4s var(--lgn-transition);
    transform-origin: bottom right;
}

.lgn-search-input-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lgn-search-input {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--lgn-border-outer);
    padding: 12px 25px;
    border-radius: 30px;
    color: white;
    outline: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 250px;
    font-size: 14px;
}