/* ════ SIDE DRAWER (Responsive) ════ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    display: block;
    opacity: 1;
}

.drawer-content {
    width: 280px;
    height: 100%;
    background: var(--bg);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer-overlay.active .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    padding: 40px 24px;
    background: var(--card);
    display: flex;
    align-items: center;
    gap: 16px;
}

.drawer-logo-icon {
    font-size: 32px;
    color: var(--dim);
}

.drawer-logo-text {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 1px;
}

.drawer-menu {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}

.drawer-footer {
    margin-top: auto;
}

.menu-item {
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item i {
    width: 24px;
    text-align: center;
    color: var(--dim);
    font-size: 18px;
}

.menu-item.pro i {
    color: #FFD700;
}

.menu-item.pro {
    color: #FFD700;
    font-weight: 600;
}

.menu-item.ai i {
    color: var(--primary);
}

.menu-item.signout {
    color: #ff4a49;
    margin-top: auto;
}

.menu-item.signout i {
    color: #ff4a49;
}

.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 24px;
}

.menu-section-label {
    padding: 16px 24px 8px;
    font-size: 12px;
    color: var(--dim);
    text-transform: uppercase;
    font-weight: 700;
}

/* ════ BOTTOM NAV (REFINED NOTCHED STYLE) ════ */
@media (max-width: 650px) {
    .bottom-nav-wrap {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(85px + var(--safe-bottom));
        padding-bottom: var(--safe-bottom);
        display: flex;
        justify-content: center;
        align-items: flex-end;
        pointer-events: none;
        z-index: 1000;
        background: linear-gradient(to top, var(--bg) 60%, transparent);
    }

    .bottom-nav {
        width: 100%;
        height: var(--dock-height);
        background: var(--card);
        display: flex;
        justify-content: space-around;
        align-items: center;
        pointer-events: auto;
        border-top: 1px solid var(--border);
        position: relative;
    }

    .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--dim);
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s;
        background: none;
        border: none;
        outline: none;
    }

    .nav-item.active {
        color: var(--primary);
    }

    .nav-item i {
        font-size: 22px;
    }

    .nav-spacer {
        width: 80px;
        flex-shrink: 0;
    }

    .fab-btn {
        width: 65px;
        height: 65px;
        background: var(--primary);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
        border: 4px solid var(--card);
        cursor: pointer;
        z-index: 1001;
        pointer-events: auto;
        transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        margin-top: -25px;
        /* Slight pop out for native feel */
    }

    .fab-btn:active {
        transform: scale(0.9);
    }
}

/* ════ BOTTOM NAV (MOBILE PREVIEW OVERRIDES) ════ */
@media (min-width: 651px) {
    body.mobile-preview .bottom-nav-wrap {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: calc(85px + var(--safe-bottom)) !important;
        padding-bottom: var(--safe-bottom) !important;
        display: flex !important;
        justify-content: center;
        align-items: flex-end;
        pointer-events: none;
        z-index: 9999 !important;
        background: linear-gradient(to top, var(--bg) 60%, transparent);
    }

    body.mobile-preview .bottom-nav {
        width: 100%;
        height: var(--dock-height);
        background: var(--card);
        display: flex;
        justify-content: space-around;
        align-items: center;
        pointer-events: auto;
        border-top: 1px solid var(--border);
        position: relative;
    }

    body.mobile-preview .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--dim);
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s;
        background: none;
        border: none;
        outline: none;
    }

    body.mobile-preview .nav-item.active {
        color: var(--primary);
    }

    body.mobile-preview .nav-item i {
        font-size: 22px;
    }

    body.mobile-preview .nav-spacer {
        width: 80px;
        flex-shrink: 0;
    }

    body.mobile-preview .fab-btn {
        width: 65px;
        height: 65px;
        background: var(--primary);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
        border: 4px solid var(--card);
        cursor: pointer;
        z-index: 2001;
        pointer-events: auto;
        transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        margin-top: -25px;
        /* Slight pop out for native feel */
    }

    body.mobile-preview .fab-btn:active {
        transform: scale(0.9);
    }
}


/* ════ PRO TAG ════ */
.pro-tag {
    background: var(--primary);
    padding: 6px 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    transition: 0.3s;
}

.pro-tag:active {
    transform: scale(0.95);
}

/* ════ ACTIVE NAVIGATION STATES ════ */
.fab-btn.active {
    background: var(--primary);
    box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.6);
    transform: scale(1.1);
}

.bottom-nav .nav-item.active {
    color: var(--primary);
    transform: translateY(-2px);
}